RTEMS I/O manager

hwulf at et-inf.fho-emden.de hwulf at et-inf.fho-emden.de
Mon Jun 25 14:44:00 UTC 2007


Hi!

So, if I want my driver to implement its own open(), close(), read(),  
write(), init() and ioctl() functions, I have to define  
CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE?
How does it work? Do I have to instantiate an additional struct  
rtems_driver_address_table and fill in the appropriate addresses?
I searched for an example, but I didn't find anythink.

Kind regards,
  Hank

Quoting Joel Sherrill <joel.sherrill at oarcorp.com>:

> hwulf at et-inf.fho-emden.de wrote:
>> Dear ladies and gentlemen,
>>
>> I'm trying to understand the inner workings of the RTEMS I/O manager.
>> In the function rtems_io_initialize() in the source code file io.c
>> there's called an initialization routine. But where is the assignment
>> of this initialization routine (the assignment of
>> _IO_Driver_address_table[major].initialization) ?
>>
> It is part of RTEMS Configuration and is normally done using
> rtems/confdefs.h.  See
>
> http://www.rtems.com/onlinedocs/releases/rtemsdocs-4.7.1/share/rtems/html/c_user/c_user00377.html
>> Thank you very much and kind regards,
>>  Hank
>>
>> Source code for rtems_io_initialize():
>> ======================================
>> rtems_status_code rtems_io_initialize(
>>   rtems_device_major_number  major,
>>   rtems_device_minor_number  minor,
>>   void             *argument
>> )
>> {
>>     rtems_device_driver_entry callout;
>>
>>     if ( major >= _IO_Number_of_drivers )
>>         return RTEMS_INVALID_NUMBER;
>>
>>     callout = _IO_Driver_address_table[major].initialization;
>>     return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
>> }
>> _______________________________________________
>> rtems-users mailing list
>> rtems-users at rtems.com
>> http://rtems.rtems.org/mailman/listinfo/rtems-users
>>






More information about the users mailing list