RTEMS Logo

RTEMS 4.10.0 On-Line Library


Frame Buffer Driver Closing the Frame Buffer Device

PREV UP NEXT Bookshelf BSP and Device Driver Development Guide

17.2.3: Closing the Frame Buffer Device

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;
}


PREV UP NEXT Bookshelf BSP and Device Driver Development Guide

Copyright © 1988-2008 OAR Corporation