BSP and Device Driver Development Guide
The driver initialization is called once during the RTEMS initialization
process and returns RTEMS_SUCCESSFUL when the device driver is successfully
initialized. During the initialization, a name is assigned to the frame
buffer device. If the graphics hardware supports console text output,
as is the case with the pc386 VGA hardware, initialization into graphics
mode may be deferred until the device is open()
ed.
The frame_buffer_initialize()
function may look like this:
rtems_device_driver frame_buffer_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *arg) { rtems_status_code status; printk( "frame buffer driver initializing..\n" ); /* * Register the device */ status = rtems_io_register_name("/dev/fb0", major, 0); if (status != RTEMS_SUCCESSFUL) { printk("Error registering frame buffer device!\n"); rtems_fatal_error_occurred( status ); } /* * graphics hardware initialization goes here for non-console * devices */ return RTEMS_SUCCESSFUL; }
BSP and Device Driver Development Guide
Copyright © 1988-2008 OAR Corporation