Changeset 83987a5 in rtems


Ignore:
Timestamp:
Jul 29, 2009, 2:09:34 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
a2b8140
Parents:
7895090
Message:

2009-07-29 Roxana Leontie <roxana.leontie@…>

  • Makefile.am, preinstall.am, console/fb_vga.c: Switch to using frame_buffer_ naming. Joel cleaned up formatting and removed tabs that were there long before Roxana touched this file.
  • console/fb_vga.h: Removed.
Location:
c/src/lib/libbsp/i386/pc386
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/pc386/ChangeLog

    r7895090 r83987a5  
     12009-07-29      Roxana Leontie <roxana.leontie@gmail.com>
     2
     3        * Makefile.am, preinstall.am, console/fb_vga.c: Switch to using
     4        frame_buffer_ naming. Joel cleaned up formatting and removed tabs
     5        that were there long before Roxana touched this file.
     6        * console/fb_vga.h: Removed.
     7
    182009-07-24      Roxana Leontie <roxana.leontie@gmail.com>
    29
  • c/src/lib/libbsp/i386/pc386/Makefile.am

    r7895090 r83987a5  
    6666include_rtemsdir = $(includedir)/rtems
    6767include_rtems_HEADERS = console/keyboard.h console/kd.h \
    68     console/serial_mouse.h console/ps2_drv.h console/fb_vga.h
     68    console/serial_mouse.h console/ps2_drv.h
    6969
    7070include_HEADERS += ../../i386/shared/comm/i386_io.h
  • c/src/lib/libbsp/i386/pc386/console/fb_vga.c

    r7895090 r83987a5  
    3131static struct fb_var_screeninfo fb_var =
    3232{
    33    640, 480,                     /* screen size x, y  */
    34    4                             /* bits per pixel    */
     33  .xres                = 640,
     34  .yres                = 480,
     35  .bits_per_pixel      = 4
    3536};
    3637
    3738static struct fb_fix_screeninfo fb_fix =
    3839{
    39   (volatile char *)0xA0000,     /* buffer pointer    */
    40   0x10000,                      /* buffer size       */
    41   FB_TYPE_VGA_PLANES,           /* type of dsplay    */
    42   FB_VISUAL_PSEUDOCOLOR,        /* color scheme used */
    43   80                            /* chars per line    */
     40  .smem_start          = (volatile char *)0xA0000,     /* buffer pointer    */
     41  .smem_len            = 0x10000,                      /* buffer size       */
     42  .type                = FB_TYPE_VGA_PLANES,           /* type of dsplay    */
     43  .visual              = FB_VISUAL_PSEUDOCOLOR,        /* color scheme used */
     44  .line_length         = 80                            /* chars per line    */
    4445};
    4546
    4647static uint16_t red16[] = {
    47     0x0000, 0x0000, 0x0000, 0x0000, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa,
    48     0x5555, 0x5555, 0x5555, 0x5555, 0xffff, 0xffff, 0xffff, 0xffff
     48   0x0000, 0x0000, 0x0000, 0x0000, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa,
     49   0x5555, 0x5555, 0x5555, 0x5555, 0xffff, 0xffff, 0xffff, 0xffff
    4950};
    5051static uint16_t green16[] = {
    51     0x0000, 0x0000, 0xaaaa, 0xaaaa, 0x0000, 0x0000, 0x5555, 0xaaaa,
    52     0x5555, 0x5555, 0xffff, 0xffff, 0x5555, 0x5555, 0xffff, 0xffff
     52   0x0000, 0x0000, 0xaaaa, 0xaaaa, 0x0000, 0x0000, 0x5555, 0xaaaa,
     53   0x5555, 0x5555, 0xffff, 0xffff, 0x5555, 0x5555, 0xffff, 0xffff
    5354};
    5455static uint16_t blue16[] = {
    55     0x0000, 0xaaaa, 0x0000, 0xaaaa, 0x0000, 0xaaaa, 0x0000, 0xaaaa,
    56     0x5555, 0xffff, 0x5555, 0xffff, 0x5555, 0xffff, 0x5555, 0xffff
     56   0x0000, 0xaaaa, 0x0000, 0xaaaa, 0x0000, 0xaaaa, 0x0000, 0xaaaa,
     57   0x5555, 0xffff, 0x5555, 0xffff, 0x5555, 0xffff, 0x5555, 0xffff
    5758};
    5859
     
    6061 * fbvga device driver INITIALIZE entry point.
    6162 */
    62 rtems_device_driver
    63 fbvga_initialize(  rtems_device_major_number major,
    64                    rtems_device_minor_number minor,
    65                    void                      *arg)
    66 {
    67    rtems_status_code status;
     63rtems_device_driver frame_buffer_initialize(
     64  rtems_device_major_number  major,
     65  rtems_device_minor_number  minor,
     66  void                      *arg
     67)
     68{
     69  rtems_status_code status;
    6870
    6971  printk( "FBVGA -- driver initializing..\n" );
     72
    7073  /*
    7174   * Register the device
    7275   */
    7376  status = rtems_io_register_name ("/dev/fb0", major, 0);
    74   if (status != RTEMS_SUCCESSFUL)
    75   {
    76       printk("Error registering FBVGA device!\n");
    77       rtems_fatal_error_occurred( status );
    78   }
     77  if (status != RTEMS_SUCCESSFUL) {
     78    printk("Error registering FBVGA device!\n");
     79    rtems_fatal_error_occurred( status );
     80  }
     81
    7982  return RTEMS_SUCCESSFUL;
    8083}
     
    8386 * fbvga device driver OPEN entry point
    8487 */
    85 rtems_device_driver
    86 fbvga_open( rtems_device_major_number major,
    87             rtems_device_minor_number minor,
    88             void                      *arg)
    89 {
    90 /*  rtems_status_code status; */
     88rtems_device_driver frame_buffer_open(
     89  rtems_device_major_number  major,
     90  rtems_device_minor_number  minor,
     91  void                      *arg
     92)
     93{
     94  ega_hwinit();
    9195  printk( "FBVGA open called.\n" );
     96
    9297  return RTEMS_SUCCESSFUL;
    9398}
     
    96101 * fbvga device driver CLOSE entry point
    97102 */
    98 rtems_device_driver
    99 fbvga_close(rtems_device_major_number major,
    100             rtems_device_minor_number minor,
    101             void                      *arg)
    102 {
     103rtems_device_driver frame_buffer_close(
     104  rtems_device_major_number  major,
     105  rtems_device_minor_number  minor,
     106  void                      *arg
     107)
     108{
     109  ega_hwterm();
    103110  printk( "FBVGA close called.\n" );
     111
    104112  return RTEMS_SUCCESSFUL;
    105113}
     
    109117 * Read characters from the PS/2 mouse.
    110118 */
    111 rtems_device_driver
    112 fbvga_read( rtems_device_major_number major,
    113             rtems_device_minor_number minor,
    114             void                      *arg)
     119rtems_device_driver frame_buffer_read(
     120  rtems_device_major_number  major,
     121  rtems_device_minor_number  minor,
     122  void                      *arg
     123)
    115124{
    116125  rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *)arg;
     126
    117127  printk( "FBVGA read called.\n" );
     128
    118129  rw_args->bytes_moved = 0;
    119   return RTEMS_SUCCESSFUL;
    120 }
    121 
    122 /*
    123  * fbvga device driver WRITE entry point.
     130
     131  return RTEMS_SUCCESSFUL;
     132}
     133
     134/*
     135 * frame_buffer device driver WRITE entry point.
    124136 * Write characters to the PS/2 mouse.
    125137 */
    126 rtems_device_driver
    127 fbvga_write( rtems_device_major_number major,
    128              rtems_device_minor_number minor,
    129              void                    * arg)
     138rtems_device_driver frame_buffer_write(
     139  rtems_device_major_number  major,
     140  rtems_device_minor_number  minor,
     141  void                      *arg
     142)
    130143{
    131144  rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *)arg;
     145
    132146  printk( "FBVGA write called.\n" );
    133147  rw_args->bytes_moved = 0;
     
    151165  uint32_t i;
    152166
    153   if( cmap->start + cmap->len >= 16 )
    154       return 1;
    155 
    156   for( i = 0; i < cmap->len; i++ )
    157   {
     167  if ( cmap->start + cmap->len >= 16 )
     168    return 1;
     169
     170  for( i = 0; i < cmap->len; i++ ) {
    158171    cmap->red[ cmap->start + i ]   = red16[ cmap->start + i ];
    159172    cmap->green[ cmap->start + i ] = green16[ cmap->start + i ];
     
    167180  uint32_t i;
    168181
    169   if( cmap->start + cmap->len >= 16 )
    170       return 1;
    171 
    172   for( i = 0; i < cmap->len; i++ )
    173   {
     182  if ( cmap->start + cmap->len >= 16 )
     183    return 1;
     184
     185  for( i = 0; i < cmap->len; i++ ) {
    174186    red16[ cmap->start + i ] = cmap->red[ cmap->start + i ];
    175187    green16[ cmap->start + i ] = cmap->green[ cmap->start + i ];
     
    183195 * all services of this interface.
    184196 */
    185 rtems_device_driver
    186 fbvga_control( rtems_device_major_number major,
    187                rtems_device_minor_number minor,
    188                void                      * arg
    189 )
    190 {
    191         rtems_libio_ioctl_args_t *args = arg;
    192    printk( "FBVGA ioctl called, cmd=%x\n", args->command  );
    193    switch( args->command )
    194    {
    195       case FBIOGET_FSCREENINFO:
     197rtems_device_driver frame_buffer_control(
     198  rtems_device_major_number  major,
     199  rtems_device_minor_number  minor,
     200  void                      *arg
     201)
     202{
     203  rtems_libio_ioctl_args_t *args = arg;
     204
     205  printk( "FBVGA ioctl called, cmd=%x\n", args->command  );
     206
     207  switch( args->command ) {
     208    case FBIOGET_FSCREENINFO:
    196209      args->ioctl_return =  get_fix_screen_info( args->buffer );
    197210      break;
    198       case FBIOGET_VSCREENINFO:
     211    case FBIOGET_VSCREENINFO:
    199212      args->ioctl_return =  get_var_screen_info( args->buffer );
    200213      break;
    201       case FBIOPUT_VSCREENINFO:
     214    case FBIOPUT_VSCREENINFO:
    202215      /* not implemented yet*/
    203216      break;
    204       case FBIOGETCMAP:
     217    case FBIOGETCMAP:
    205218      args->ioctl_return =  get_palette( args->buffer );
    206219      break;
    207       case FBIOPUTCMAP:
     220    case FBIOPUTCMAP:
    208221      args->ioctl_return =  set_palette( args->buffer );
    209222      break;
    210223
    211       /* this function would execute one of the routines of the
    212        * interface based on the operation requested
    213        */
    214       case FB_EXEC_FUNCTION:
    215       {
    216          struct fb_exec_function *env = args->buffer;
    217          switch( env->func_no )
    218          {
    219            case FB_FUNC_ENTER_GRAPHICS:
    220            /* enter graphics mode*/
    221            ega_hwinit();
    222            break;
    223 
    224            case FB_FUNC_EXIT_GRAPHICS:
    225            /* leave graphics mode*/
    226            ega_hwterm();
    227            break;
    228 
    229            case FB_FUNC_IS_DIRTY:
    230            break;
    231 
    232            case FB_FUNC_GET_MODE:
    233            break;
    234 
    235            default:
    236            break;
    237          }
    238       }
    239       /* no break on purpose */
    240            default:
    241       args->ioctl_return = 0;
    242                 break;
    243 
    244    }
    245    return RTEMS_SUCCESSFUL;
    246 }
     224    default:
     225     args->ioctl_return = 0;
     226     break;
     227  }
     228  return RTEMS_SUCCESSFUL;
     229}
  • c/src/lib/libbsp/i386/pc386/preinstall.am

    r7895090 r83987a5  
    119119PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/ps2_drv.h
    120120
    121 $(PROJECT_INCLUDE)/rtems/fb_vga.h: console/fb_vga.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
    122         $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/fb_vga.h
    123 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/fb_vga.h
    124 
    125121$(PROJECT_INCLUDE)/i386_io.h: ../../i386/shared/comm/i386_io.h $(PROJECT_INCLUDE)/$(dirstamp)
    126122        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/i386_io.h
Note: See TracChangeset for help on using the changeset viewer.