4.115
Last change
on this file since 3d4f749 was
1fef02ca,
checked in by Joel Sherrill <joel.sherrill@…>, on 03/14/11 at 14:57:00
|
2011-03-14 Joel Sherrill <joel.sherrill@…>
PR 1762/cpukit
- Makefile.am, preinstall.am, console/console.c, console/keyboard.c,
console/keyboard.h, console/pc_keyb.c, console/ps2_mouse.c,
console/vgainit.c: Made mouse parser engine generic. Now use generic
serial mouse driver. Moved many externs from C to .h.
- console/kbd_parser.c, console/serial_mouse_config.c: New files.
- console/mouse_parser.c, console/mouse_parser.h,
console/serial_mouse.c, console/serial_mouse.h: Removed.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /* |
---|
2 | * COPYRIGHT (c) 1989-2007. |
---|
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 | /* select which serial port the mouse is connected to */ |
---|
20 | /* XXX - Hook these somewhere */ |
---|
21 | #ifdef SERIAL_MOUSE_COM1 |
---|
22 | #define SERIAL_MOUSE_COM 1 |
---|
23 | #elif defined(SERIAL_MOUSE_COM2) |
---|
24 | #define SERIAL_MOUSE_COM 2 |
---|
25 | #else |
---|
26 | /* Select Default to be COM1 */ |
---|
27 | #define SERIAL_MOUSE_COM 1 |
---|
28 | #endif |
---|
29 | |
---|
30 | extern int BSPConsolePort; |
---|
31 | |
---|
32 | bool bsp_get_serial_mouse_device( |
---|
33 | const char **name, |
---|
34 | const char **type |
---|
35 | ) |
---|
36 | { |
---|
37 | #ifdef SERIAL_MOUSE_COM2 |
---|
38 | *name = "/dev/ttyS2"; |
---|
39 | #else |
---|
40 | *name = "/dev/ttyS1"; |
---|
41 | #endif |
---|
42 | |
---|
43 | *type = "ms"; |
---|
44 | |
---|
45 | /* Check if this port is not been used as console */ |
---|
46 | /* XXX configure the serial port, take boot args additionally */ |
---|
47 | if ( BSPConsolePort == SERIAL_MOUSE_COM ) { |
---|
48 | printk( "SERIAL MOUSE: port selected as console.(%s)\n", *name ); |
---|
49 | rtems_fatal_error_occurred( -1 ); |
---|
50 | } |
---|
51 | |
---|
52 | printk("Mouse Device: %s\n", *name ); |
---|
53 | return name; |
---|
54 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.