summaryrefslogtreecommitdiff
path: root/chip/g/uartn.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/g/uartn.c')
-rw-r--r--chip/g/uartn.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/chip/g/uartn.c b/chip/g/uartn.c
index 343f5dc981..eac35d1577 100644
--- a/chip/g/uartn.c
+++ b/chip/g/uartn.c
@@ -12,6 +12,9 @@
#include "uart.h"
#include "util.h"
+#define USE_UART_INTERRUPTS (!(defined(CONFIG_CUSTOMIZED_RO) && \
+ defined(SECTION_IS_RO)))
+
struct uartn_interrupts {
int tx_int;
int rx_int;
@@ -134,4 +137,9 @@ void uartn_init(int uart)
/* Note: doesn't do anything unless turned on in NVIC */
GR_UART_ICTRL(uart) = 0x02;
+#if USE_UART_INTERRUPTS
+ /* Enable interrupts for UART */
+ uartn_enable_interrupt(uart);
+#endif
+
}