source: rtems/c/src/lib/libbsp/i386/pc386/console/console_control.c @ 1c0b8d7

4.115
Last change on this file since 1c0b8d7 was 1c0b8d7, checked in by Jennifer Averett <Jennifer.Averett@…>, on Nov 18, 2011 at 8:11:08 PM

2011-11-18 Jennifer Averett <Jennifer.Averett@…>

PR 1925

  • Makefile.am, preinstall.am, console/serial_mouse_config.c, include/bsp.h, start/start.S: Converted 1386 console to the libchip style console
  • console/conscfg.c, console/console_control.c, console/printk_support.c, console/vgacons.c, console/vgacons.h: New files.
  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 *  This file is an extension of the generic console driver
3 *  shell used by all console drivers using libchip, it contains
4 *  the console_control routine,  This bsp needs its own version
5 *  of this method to handle the keyboard and mouse as a single
6 *  device.
7 */
8
9/*
10 *  COPYRIGHT (c) 1989-2011.
11 *  On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.com/license/LICENSE.
16 *
17 *  $Id$
18 */
19
20#include <bsp.h>
21#include <rtems/libio.h>
22#include <stdlib.h>
23#include <assert.h>
24#include <termios.h>
25
26#include <bsp/irq.h>
27
28#include <rtems/termiostypes.h>
29#include <libchip/serial.h>
30#include <rtems/mouse_parser.h>
31#include "keyboard.h"
32#include "../../../shared/console_private.h"
33
34/*
35 *  console_control
36 *
37 *  this routine uses the termios driver to process io
38 */
39rtems_device_driver console_control(
40  rtems_device_major_number major,
41  rtems_device_minor_number minor,
42  void                    * arg
43)
44{
45  rtems_libio_ioctl_args_t *args = arg;
46
47  switch (args->command) {
48    default:
49      if( vt_ioctl( args->command, (unsigned long)args->buffer ) != 0 )
50        return rtems_termios_ioctl (arg);
51      break;
52
53    case MW_UID_REGISTER_DEVICE:
54      printk( "SerialMouse: reg=%s\n", args->buffer );
55      register_kbd_msg_queue( args->buffer, 0 );
56      break;
57
58    case MW_UID_UNREGISTER_DEVICE:
59      unregister_kbd_msg_queue( 0 );
60      break;
61  }
62 
63  args->ioctl_return = 0;
64  return RTEMS_SUCCESSFUL;
65}
Note: See TracBrowser for help on using the repository browser.