forked from Imagelibrary/rtems
mouse: Add shared bsp_get_serial_mouse_device()
This commit is contained in:
@@ -113,6 +113,7 @@ libbsp_a_SOURCES += ../../shared/console_control.c
|
||||
libbsp_a_SOURCES += ../../shared/console_read.c
|
||||
libbsp_a_SOURCES += ../../shared/console_select.c
|
||||
libbsp_a_SOURCES += ../../shared/console_write.c
|
||||
libbsp_a_SOURCES += ../../shared/get-serial-mouse-ps2.c
|
||||
libbsp_a_SOURCES += ../shared/arm-pl011.c
|
||||
libbsp_a_SOURCES += ../shared/arm-pl050.c
|
||||
libbsp_a_SOURCES += console/console-config.c
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
#include <bsp/arm-pl011.h>
|
||||
#include <bsp/arm-pl050.h>
|
||||
|
||||
static const char psaux[] = "/dev/psaux";
|
||||
|
||||
console_tbl Console_Configuration_Ports[] = {
|
||||
{
|
||||
.sDeviceName = "/dev/ttyS0",
|
||||
@@ -43,7 +41,7 @@ console_tbl Console_Configuration_Ports[] = {
|
||||
.ulClock = 0,
|
||||
.ulIntVector = RVPBXA9_IRQ_UART_0
|
||||
}, {
|
||||
.sDeviceName = &psaux[0],
|
||||
.sDeviceName = SERIAL_MOUSE_DEVICE_PS2,
|
||||
.deviceType = SERIAL_CUSTOM,
|
||||
.pDeviceFns = &arm_pl050_fns,
|
||||
.deviceProbe = NULL,
|
||||
@@ -96,14 +94,3 @@ static void output_char_init(char c)
|
||||
BSP_output_char_function_type BSP_output_char = output_char_init;
|
||||
|
||||
BSP_polling_getchar_function_type BSP_poll_char = NULL;
|
||||
|
||||
bool bsp_get_serial_mouse_device(
|
||||
const char **name,
|
||||
const char **type
|
||||
)
|
||||
{
|
||||
*name = &psaux[0];
|
||||
*type = "ps2";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
26
c/src/lib/libbsp/shared/get-serial-mouse-ps2.c
Normal file
26
c/src/lib/libbsp/shared/get-serial-mouse-ps2.c
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (c) 2013 embedded brains GmbH. All rights reserved.
|
||||
*
|
||||
* embedded brains GmbH
|
||||
* Dornierstr. 4
|
||||
* 82178 Puchheim
|
||||
* Germany
|
||||
* <info@embedded-brains.de>
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*/
|
||||
|
||||
#include <rtems/serial_mouse.h>
|
||||
|
||||
bool bsp_get_serial_mouse_device(
|
||||
const char **name,
|
||||
const char **type
|
||||
)
|
||||
{
|
||||
*name = SERIAL_MOUSE_DEVICE_PS2;
|
||||
*type = "ps2";
|
||||
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user