[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help: *_DRIVER_TABLE_ENTRY ???



On Wed, Feb 09, 2005 at 02:49:12PM +0000, Alex 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) ???

look at existing code for console or serial drivers.

initialize gets called during RTEMS initialization.  it does power-on
initialization (if necessary) and registers a device driver name with
RTEMS.

open, close, read, write, and control are called for the registered
device on open(), close(), read(), write(), and ioctl(), respectively.

> 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.

it seems like this should be in the BSP and Device Driver guide, but I
couldn't find any specifics either.  I'll see if I can't get a patch
generated for the documentation.

-- 
  Aaron J. Grier  |   Frye Electronics, Tigard, OR   |  aaron@frye.com
  "Note that many bands' backline amps produce levels exceeding OSHA
   standards for industrial facilities.  Yet this is considered normal
   working conditions for musicians.  That's showbiz." -- Scott Dorsey