[PATCH 1/3] Fixed ability to enable polling on the console using configure for Zynq

Lou Woods irnhorse4 at gmail.com
Tue Mar 26 13:56:05 UTC 2019


From: Lou Woods <Lou.Woods at OARCorp.com>

---
 bsps/arm/xilinx-zynq/console/zynq-uart.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/bsps/arm/xilinx-zynq/console/zynq-uart.c b/bsps/arm/xilinx-zynq/console/zynq-uart.c
index 9c21f6f..0230664 100644
--- a/bsps/arm/xilinx-zynq/console/zynq-uart.c
+++ b/bsps/arm/xilinx-zynq/console/zynq-uart.c
@@ -129,7 +129,7 @@ void zynq_uart_initialize(rtems_termios_device_context *base)
     | ZYNQ_UART_CONTROL_RSTTO;
 }
 
-#ifdef ZYNQ_CONSOLE_USE_INTERRUPTS
+#if ZYNQ_CONSOLE_USE_INTERRUPTS
 static void zynq_uart_interrupt(void *arg)
 {
   rtems_termios_tty *tty = arg;
@@ -164,7 +164,7 @@ static bool zynq_uart_first_open(
   rtems_libio_open_close_args_t *args
 )
 {
-#ifdef ZYNQ_CONSOLE_USE_INTERRUPTS
+#if ZYNQ_CONSOLE_USE_INTERRUPTS
   zynq_uart_context *ctx = (zynq_uart_context *) base;
   volatile zynq_uart *regs = ctx->regs;
   rtems_status_code sc;
@@ -173,7 +173,7 @@ static bool zynq_uart_first_open(
   rtems_termios_set_initial_baud(tty, ZYNQ_UART_DEFAULT_BAUD);
   zynq_uart_initialize(base);
 
-#ifdef ZYNQ_CONSOLE_USE_INTERRUPTS
+#if ZYNQ_CONSOLE_USE_INTERRUPTS
   regs->rx_timeout = 32;
   regs->rx_fifo_trg_lvl = ZYNQ_UART_FIFO_DEPTH / 2;
   regs->irq_dis = 0xffffffff;
@@ -194,7 +194,7 @@ static bool zynq_uart_first_open(
   return true;
 }
 
-#ifdef ZYNQ_CONSOLE_USE_INTERRUPTS
+#if ZYNQ_CONSOLE_USE_INTERRUPTS
 static void zynq_uart_last_close(
   rtems_termios_tty *tty,
   rtems_termios_device_context *base,
@@ -240,7 +240,7 @@ static void zynq_uart_write_support(
   size_t len
 )
 {
-#ifdef ZYNQ_CONSOLE_USE_INTERRUPTS
+#if ZYNQ_CONSOLE_USE_INTERRUPTS
   zynq_uart_context *ctx = (zynq_uart_context *) base;
   volatile zynq_uart *regs = ctx->regs;
 
@@ -298,7 +298,7 @@ const rtems_termios_device_handler zynq_uart_handler = {
   .set_attributes = NULL,
 #endif
   .write = zynq_uart_write_support,
-#ifdef ZYNQ_CONSOLE_USE_INTERRUPTS
+#if ZYNQ_CONSOLE_USE_INTERRUPTS
   .last_close = zynq_uart_last_close,
   .mode = TERMIOS_IRQ_DRIVEN
 #else
-- 
1.8.3.1




More information about the devel mailing list