Help: *_DRIVER_TABLE_ENTRY ??? [2]

Alex kbyte at iol.pt
Thu Feb 10 12:20:45 UTC 2005


My question/doubt is to know when and in what circumnstancies each function member is called
and by who? Automaticlly by the kernel? In general how everything works inside rtems, from the interrupt ocurrency to the invocation of routines...

this is the specific information I am looking for. Sorry it it is a beginner question, but I am really a beginner.

Many thanks

alex


----- Mensagem Original -----
De: Mark Mussetter <mark at link-comm.com>
Data: Quarta-Feira, 9 de Fevereiro de 2005, 15:53
Assunto: Re: Help: *_DRIVER_TABLE_ENTRY ???

> At 07:49 AM 2/9/2005, you wrote:
> >Hi all,
> >
> >I am still trying to write my first interrupt driven device 
> driver for 
> >printer port.
> >I am studing the console driver and others like serial, ata, etc...
> >
> >All of them have a define wich defines a macro containing 6 
> "members".>
> >For example,
> >
> >
> >#define CONSOLE_DRIVER_TABLE_ENTRY \
> >   { console_initialize, console_open, console_close, \
> >     console_read, console_write, console_control }
> >
> >My question is: Where do I get information about each member of 
> these 
> >define(s) ???
> >
> >I already searched in 
> >http://www.rtems.com/onlinedocs/releases/rtemsdocs-
> 4.6.2/share/rtems/html/c_user/>
> >but I cant find information about this.
> >
> >Env: i686
> >
> >Many thanks
> >
> >Alex
> >
> >By the way, why rtems mailling list search doenst work for some 
> days? is 
> >this a problem of my browser or anyone else has this problem?
> >
> >
> >______________________________________________________________________
> >O IOL aumentou a caixa de correio para 100 MB!
> >Saiba mais - http://www.iol.pt/correio/rodape.php?dst=0501181
> 
> I'm not sure if I understand your question, but...
> 
> each member corresponds to a function in the form of:
> 
> rtems_device_driver  xxx_initialize( rtems_device_major_number 
> major, 
> rtems_device_minor_number minor, void *args );
> 
>  ==============================
> 
> For example, my display's framebuffer driver initialization 
> routine looks 
> like this:
> 
> rtems_device_driver  FB_Initialize( rtems_device_major_number 
> major, 
> rtems_device_minor_number minor, void *args )
> {
>   rtems_status_code sc = RTEMS_SUCCESSFUL;
> 
>   sc = rtems_io_register_name( 
> "/dev/fb0",  major,  (rtems_device_minor_number)0 );
>   if ( sc != RTEMS_SUCCESSFUL )
>     rtems_fatal_error_occurred( sc );
> 
>   memset((void *)the_frame_buffer, 0, sizeof(the_frame_buffer) );
> 
>   return ( sc );
> }
> 
> We also needed to define CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE, 
> add 
> xxx_DRIVER_TABLE_ENTRY to Device_drivers[], and increase 
> CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS if needed.
> 
> 
> Mark Mussetter
> Link Communications, Inc.
> 1035 Cerise Rd
> Billings, MT 59101-7378
> phone: (406) 245-5002 ext 105
> Fax:    (406) 245-4889
> WWW: http://www.link-comm.com
> mark at link-comm.com
> 
> 
> 

______________________________________________________________________
O IOL aumentou a caixa de correio para 100 MB!
Saiba mais - http://www.iol.pt/correio/rodape.php?dst=0501181




More information about the users mailing list