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

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

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.1 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2011.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.com/license/LICENSE.
8 *
9 *  $Id$
10 */
11
12#include <stdio.h>
13#include <stdlib.h>
14#include <bsp.h>
15#include <sys/types.h>
16#include <sys/stat.h>
17#include <fcntl.h>
18
19#include "libchip/serial.h"
20#include "../../../shared/console_private.h"
21
22/* select which serial port the mouse is connected to */
23#if defined(SERIAL_MOUSE_COM2)
24  #define MOUSE_DEVICE "/dev/com2"
25#else
26  #define MOUSE_DEVICE "/dev/com1"
27#endif
28
29static const char *SerialMouseDevice = MOUSE_DEVICE;
30
31bool bsp_get_serial_mouse_device(
32  const char **name,
33  const char **type
34)
35{
36  const char *consname;
37
38  *name = SerialMouseDevice;
39  *type = "ms";
40
41  /* Check if this port is not been used as console */
42  consname = Console_Port_Tbl[ Console_Port_Minor ]->sDeviceName;
43  if ( !strcmp(MOUSE_DEVICE, consname) ) {
44    printk( "SERIAL MOUSE: port selected as console.(%s)\n", *name );
45    rtems_fatal_error_occurred( -1 );
46  }
47
48  printk("Mouse Device: %s\n", *name );
49  return name;
50}
Note: See TracBrowser for help on using the repository browser.