5
Last change
on this file since 3eed4f3 was
c499856,
checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47
|
Change all references of rtems.com to rtems.org.
|
-
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.org/license/LICENSE. |
---|
8 | */ |
---|
9 | |
---|
10 | #include <stdio.h> |
---|
11 | #include <stdlib.h> |
---|
12 | #include <bsp.h> |
---|
13 | #include <sys/types.h> |
---|
14 | #include <sys/stat.h> |
---|
15 | #include <fcntl.h> |
---|
16 | |
---|
17 | #include "libchip/serial.h" |
---|
18 | #include "../../../shared/console_private.h" |
---|
19 | |
---|
20 | /* select which serial port the mouse is connected to */ |
---|
21 | #if defined(SERIAL_MOUSE_COM2) |
---|
22 | #define MOUSE_DEVICE "/dev/com2" |
---|
23 | #else |
---|
24 | #define MOUSE_DEVICE "/dev/com1" |
---|
25 | #endif |
---|
26 | |
---|
27 | static const char *SerialMouseDevice = MOUSE_DEVICE; |
---|
28 | |
---|
29 | bool bsp_get_serial_mouse_device( |
---|
30 | const char **name, |
---|
31 | const char **type |
---|
32 | ) |
---|
33 | { |
---|
34 | const char *consname; |
---|
35 | |
---|
36 | *name = SerialMouseDevice; |
---|
37 | *type = "ms"; |
---|
38 | |
---|
39 | /* Check if this port is not been used as console */ |
---|
40 | consname = Console_Port_Tbl[ Console_Port_Minor ]->sDeviceName; |
---|
41 | if ( !strcmp(MOUSE_DEVICE, consname) ) { |
---|
42 | printk( "SERIAL MOUSE: port selected as console.(%s)\n", *name ); |
---|
43 | rtems_fatal_error_occurred( -1 ); |
---|
44 | } |
---|
45 | |
---|
46 | printk("Mouse Device: %s\n", *name ); |
---|
47 | return name; |
---|
48 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.