BSP and Device Driver Development Guide
The frame_buffer_close() is invoked when the frame buffer device
is closed. It frees up any resources allocated in
frame_buffer_open(), and should restore previous hardware state.
The entry point corresponds to the device driver close entry point.
Returns RTEMS_SUCCESSFUL when the device driver is successfully closed:
rtems_device_driver frame_buffer_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg)
{
pthread_mutex_unlock(&mutex);
/* TODO check mutex return value, RTEMS_UNSATISFIED if it failed. we
* don't want to unconditionally call ega_hwterm()... */
/* restore previous state. for VGA this means return to text mode.
* leave out if graphics hardware has been initialized in
* frame_buffer_initialize() */
ega_hwterm();
printk( "frame buffer close called.\n" );
return RTEMS_SUCCESSFUL;
}
BSP and Device Driver Development Guide
Copyright © 1988-2008 OAR Corporation