This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: typecasting (cyg_io_handle_t) to (cyg_devtab_entry_t)
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Samie Hassan Ghauri <samiehg at hotmail dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Mon, 30 Aug 2004 18:09:17 +0200
- Subject: Re: [ECOS] typecasting (cyg_io_handle_t) to (cyg_devtab_entry_t)
- References: <BAY12-F11qhTIuRVFvf00016116@hotmail.com>
On Mon, Aug 30, 2004 at 03:52:04PM +0000, Samie Hassan Ghauri wrote:
> Hi
> I am implementing the cyg_io_write() routine for the I/O layer of an LCD
> device driver. When I try to cast the first argument 'handle' to a pointer
> of type cyg_devtab_entry_t, it gives error, which is understandable becuase
> thats the way other drivers access data in the device table entry. The code
> and the error as listed below:
>
> Code:
> static Cyg_ErrNo
> lcdio_write(cyg_io_handle_t handle, const void *_buf, cyg_uint32 *len)
> {
> cyg_devtab_entry_t *ptrDevTab;
> ptrDevTab = (cyg_devtab_entry_t *)handle;
>
> int err;
> .....
> .....
> }
>
> Error:
> /ecos-c/ecos/packages/io/lcd/current/src/lcdio.c:114: parse error before
> `int'
Which is line 114? I don't see an int anywhere. Maybe you should pass
-E to gcc and see what is going on.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss