summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/soc/uart.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2025-07-28 23:27:12 +0200
committerUros Majstorovic <majstor@majstor.org>2025-07-28 23:27:12 +0200
commit58f41971b1e801ad2fbcea08e5152afa2b18ca73 (patch)
tree51793b55b350f7807d5d1b7e1401b50f402ccc48 /fw/fe310/eos/soc/uart.c
parentdab5a1fbd188f8f9436df1b3dff6e344c444fc23 (diff)
sys logging added; power management reimplemented; bugfixes;
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;
}