File indexing completed on 2025-05-11 08:23:51
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #include <rtems/bspIo.h>
0018
0019 #include <libchip/serial.h>
0020
0021 #include <bspopts.h>
0022 #include <bsp/uart.h>
0023 #include <bsp/generic_or1k.h>
0024
0025 console_tbl Console_Configuration_Ports [] = {
0026 {
0027 .sDeviceName = "/dev/ttyS0",
0028 .deviceType = SERIAL_CUSTOM,
0029 .pDeviceFns = &generic_or1k_uart_fns,
0030 .deviceProbe = NULL,
0031 .pDeviceFlow = NULL,
0032 .ulCtrlPort1 = OR1K_BSP_UART_BASE,
0033 .ulCtrlPort2 = 0,
0034 .ulClock = OR1K_UART_DEFAULT_BAUD,
0035 .ulIntVector = OR1K_BSP_UART_IRQ
0036 }
0037 };
0038
0039 #define PORT_COUNT \
0040 (sizeof(Console_Configuration_Ports) \
0041 / sizeof(Console_Configuration_Ports [0]))
0042
0043 unsigned long Console_Configuration_Count = PORT_COUNT;
0044
0045 static void output_char(char c)
0046 {
0047 const console_fns *con =
0048 Console_Configuration_Ports [Console_Port_Minor].pDeviceFns;
0049
0050 con->deviceWritePolled((int) Console_Port_Minor, c);
0051 }
0052
0053 BSP_output_char_function_type BSP_output_char = output_char;
0054
0055 BSP_polling_getchar_function_type BSP_poll_char = NULL;