bsp/altera-cyclone-v: Add BSP_USE_UART_INTERRUPTS

This commit is contained in:
Sebastian Huber
2014-09-10 10:42:47 +02:00
parent 90f44cd2dd
commit 0cd13bce67
2 changed files with 12 additions and 3 deletions

View File

@@ -46,6 +46,9 @@ RTEMS_BSPOPTS_HELP([CYCLONE_V_CONFIG_UART_1],[configuration for UART 1])
RTEMS_BSPOPTS_SET([CYCLONE_V_UART_BAUD],[*],[115200U])
RTEMS_BSPOPTS_HELP([CYCLONE_V_UART_BAUD],[baud for UARTs])
RTEMS_BSPOPTS_SET([BSP_USE_UART_INTERRUPTS],[*],[1])
RTEMS_BSPOPTS_HELP([BSP_USE_UART_INTERRUPTS],[enable usage of interrupts for the UART modules])
RTEMS_BSPOPTS_SET([CYCLONE_V_NO_I2C],[*],[1])
RTEMS_BSPOPTS_HELP([CYCLONE_V_NO_I2C],
[Number of configured I2C buses. Note that each bus has to be configured in an

View File

@@ -26,7 +26,13 @@
#include "socal/alt_uart.h"
#include "socal/hps.h"
bool altera_cyclone_v_uart_probe( int minor );
#ifdef BSP_USE_UART_INTERRUPTS
#define DEVICE_FNS &ns16550_fns
#else
#define DEVICE_FNS &ns16550_fns_polled
#endif
static bool altera_cyclone_v_uart_probe( int minor );
static uint8_t altera_cyclone_v_uart_get_register(uintptr_t addr, uint8_t i)
{
@@ -47,7 +53,7 @@ console_tbl Console_Configuration_Ports[] = {
{
.sDeviceName = "/dev/ttyS0",
.deviceType = SERIAL_NS16550,
.pDeviceFns = &ns16550_fns,
.pDeviceFns = DEVICE_FNS,
.deviceProbe = altera_cyclone_v_uart_probe,
.pDeviceFlow = NULL,
.ulMargin = 16,
@@ -68,7 +74,7 @@ console_tbl Console_Configuration_Ports[] = {
{
.sDeviceName = "/dev/ttyS1",
.deviceType = SERIAL_NS16550,
.pDeviceFns = &ns16550_fns,
.pDeviceFns = DEVICE_FNS,
.deviceProbe = altera_cyclone_v_uart_probe,
.pDeviceFlow = NULL,
.ulMargin = 16,