RTEMS Logo

RTEMS 4.10.0 On-Line Library


Frame Buffer Driver Frame Buffer IO Control

PREV UP next Bookshelf BSP and Device Driver Development Guide

17.2.6: Frame Buffer IO Control

The frame buffer driver allows several ioctls, partially compatible with the Linux kernel, to obtain information about the hardware.

All ioctl() operations on the frame buffer device invoke frame_buffer_control().

Ioctls supported:

rtems_device_driver frame_buffer_control(
  rtems_device_major_number  major,
  rtems_device_minor_number  minor,
  void                      *arg
)
{
  rtems_libio_ioctl_args_t *args = arg;

  printk( "FBVGA ioctl called, cmd=%x\n", args->command  );

  switch( args->command ) {
    case FBIOGET_FSCREENINFO:
      args->ioctl_return =  get_fix_screen_info( ( struct fb_fix_screeninfo * ) args->buffer );
      break;
    case FBIOGET_VSCREENINFO:
      args->ioctl_return =  get_var_screen_info( ( struct fb_var_screeninfo * ) args->buffer );
      break;
    case FBIOPUT_VSCREENINFO:
      /* not implemented yet*/
      args->ioctl_return = -1;
      return RTEMS_UNSATISFIED;
    case FBIOGETCMAP:
      args->ioctl_return =  get_palette( ( struct fb_cmap * ) args->buffer );
      break;
    case FBIOPUTCMAP:
      args->ioctl_return =  set_palette( ( struct fb_cmap * ) args->buffer );
      break;

    default:
     args->ioctl_return = 0;
     break;
  }
  return RTEMS_SUCCESSFUL;
}

See rtems/fb.h for more information on the list of ioctls and data structures they work with.


PREV UP next Bookshelf BSP and Device Driver Development Guide

Copyright © 1988-2008 OAR Corporation