summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/soc/uart.c
diff options
context:
space:
mode:
Diffstat (limited to 'fw/fe310/eos/soc/uart.c')
-rw-r--r--fw/fe310/eos/soc/uart.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fw/fe310/eos/soc/uart.c b/fw/fe310/eos/soc/uart.c
index 1cff781..44c9a52 100644
--- a/fw/fe310/eos/soc/uart.c
+++ b/fw/fe310/eos/soc/uart.c
@@ -36,7 +36,12 @@ static void uart_handle_intr(void) {
}
}
-int eos_uart_init(uint8_t wakeup_cause) {
+void eos_uart_preinit(void) {
+ eos_uart_speed(EOS_UART_SPEED);
+ eos_uart_enable();
+}
+
+int eos_uart_init(void) {
int i;
for (i=0; i<EOS_UART_MAX_ETYPE; i++) {
@@ -45,10 +50,6 @@ int eos_uart_init(uint8_t wakeup_cause) {
eos_evtq_set_handler(EOS_EVT_UART, uart_handle_evt);
eos_intr_set(INT_UART0_BASE, IRQ_PRIORITY_UART, uart_handle_intr);
- eos_uart_speed(EOS_UART_SPEED);
-
- eos_uart_enable();
-
return EOS_OK;
}