This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Splitting driver code between I/O layer and driver layer
- From: "Samie Hassan Ghauri" <samiehg at hotmail dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Tue, 24 Aug 2004 14:13:54 +0000
- Subject: [ECOS] Splitting driver code between I/O layer and driver layer
- Bcc:
I am developing device driver for an LCD device. I have implemented the I/O
APIs (eg write, read etc) in a separate file and stored in packages/io/lcd.
The device specific code is stored in another file in devs directory. I have
included the devtab_entry () in the the file that contains device specific
code which contains the pointer to I/O functions. But I try to build the
library, it gives the following errors:
/ecos-c/ecos/packages/devs/lcd/leon/current/src/lcd_leon.c:108:
`lcdio_devio' undeclared here (not in a function)
make: Leaving directory `/ecos-c/project/lcd/lcd_build'
/ecos-c/ecos/packages/devs/lcd/leon/current/src/lcd_leon.c:108: initializer
element is not constant
/ecos-c/ecos/packages/devs/lcd/leon/current/src/lcd_leon.c:108: (near
initialization for `lcdio_label.handlers')
/ecos-c/ecos/packages/devs/lcd/leon/current/src/lcd_leon.c:109: `lcdio_init'
undeclared here (not in a function)
/ecos-c/ecos/packages/devs/lcd/leon/current/src/lcd_leon.c:109: initializer
element is not constant
/ecos-c/ecos/packages/devs/lcd/leon/current/src/lcd_leon.c:109: (near
initialization for `lcdio_label.init')
/ecos-c/ecos/packages/devs/lcd/leon/current/src/lcd_leon.c:115: warning:
`lcdio_init' defined but not used
It is quite strange as the other file (lcdio.c) in which the I/O API were
implemented DOES get compiled, but somehow the code in hardware specific
file (lcd_leon) is not able to detect lcdio_devio. Any comments/
Samie
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss