Device driver initialization sequence

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Nov 9 10:32:52 UTC 2018


Hello Yaroslav,

the initialization sequence is documented here:

https://docs.rtems.org/branches/master/c-user/initialization.html#initializing-rtems

I would not use the I/O Manager. Working with major/minor numbers is 
quite painful. I would initialize custom devices in the initialization 
task. If you need the POSIX file descriptor API for your devices, then I 
would use IMFS_make_generic_node() to register them.

On 09/11/2018 11:25, Ярослав Лещинский wrote:
> Hello,
>
> I read the documentation about I/O Manager, found different source 
> codes where mentioning not only rtems_io_* functionality but also 
> drvmgr*, rtems_libio* and another mechanisms which are referred to 
> device driver topic and I have a feeling that I'm missing something.
>
> Could you please correct me if I'm wrong in the following steps of 
> initialization of device driver:
>
> 1. define *CONFIGURE_MAXIMUM_DRIVERS* macro
> 1. Create *rtems_driver_address_table *and register it via 
> *register_io_register_driver*
> 2. Write all necessary functions for *rtems_io_initialize, 
> rtems_io_open, etc*
> 3. Associate name with major:minor pair using *rtems_register_name*
> *
> *
> As I understood there are can be a lot of different device drivers 
> tables and I should somehow get the right major:minor driver from the 
> right table. How I can do this?
>
> -- 
> --
> Kind regards,
> *Yaroslav Leshchinsky*
>
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.




More information about the users mailing list