Add New Drivers Problem.
Joel Sherrill
joel.sherrill at OARcorp.com
Fri Nov 17 15:10:20 UTC 2000
Ralf Corsepius wrote:
>
> Dmitry Kargapolov wrote:
> >
> > Thursday, November 16, 2000, 10:29:01 PM, Fernando RUIZ CASAS wrote:
> >
> > FRC> Hi,
> >
> > FRC> Adding a new drivers in my bsp and avoiding to create a new configuration
> > FRC> table
> > FRC> after several tries my solution is a patch in 'confdefs.h'.
> > FRC> This makes that my BSP tree needs a external file.
> > FRC> Is it possible include this litle patch in the new versions of file?
> >
> > Great idea!
> >
> Actually not -- confdefs.h is supposed not to contain anything
> BSP-specific.
Maybe I am missing something but I don't see how this patch adds
anything BSP specific. It is a neat way to include an arbitrary
list of device drivers.
In the interest of paranoia, it would be better to have some error
check. The following will not compile if
CONFIGURE_APPLICATION_NEEDS_CUSTOM_DRIVER
is defined and CUSTOM_DRIVER_TABLE_ENTRY is not.
+ #ifdef CONFIGURE_APPLICATION_NEEDS_CUSTOM_DRIVER
+ CUSTOM_DRIVER_TABLE_ENTRY,
+ #endif
How about this?
#ifdef CONFIGURE_APPLICATION_NEEDS_CUSTOM_DRIVER
#if defined(CUSTOM_DRIVER_TABLE_ENTRY)
CUSTOM_DRIVER_TABLE_ENTRY,
#else
#error "CUSTOM_DRIVER_TABLE_ENTRY is NOT defined!"
#endif
#endif
> Ralf.
>
> --
> Ralf Corsepius
> Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung
> (FAW)
> Helmholtzstr. 16, 89081 Ulm, Germany Tel: +49/731/501-8690
> mailto:corsepiu at faw.uni-ulm.de FAX: +49/731/501-999
> http://www.faw.uni-ulm.de
--
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list