mirror of
https://github.com/micropython/micropython.git
synced 2026-01-09 13:40:31 +01:00
qemu/uart: Fix UART0 address for MPS3.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
This commit is contained in:
committed by
Damien George
parent
0cf1a58c3d
commit
debac3e3bd
@@ -108,7 +108,7 @@ void uart_tx_strn(const char *buf, size_t len) {
|
||||
}
|
||||
}
|
||||
|
||||
#elif defined(QEMU_SOC_MPS2)
|
||||
#elif defined(QEMU_SOC_MPS2) || defined(QEMU_SOC_MPS3)
|
||||
|
||||
#define UART_STATE_TXFULL (1 << 0)
|
||||
#define UART_STATE_RXFULL (1 << 1)
|
||||
@@ -124,7 +124,11 @@ typedef struct _UART_t {
|
||||
volatile uint32_t BAUDDIV;
|
||||
} UART_t;
|
||||
|
||||
#if defined(QEMU_SOC_MPS3)
|
||||
#define UART0 ((UART_t *)(0x49303000))
|
||||
#else
|
||||
#define UART0 ((UART_t *)(0x40004000))
|
||||
#endif
|
||||
|
||||
void uart_init(void) {
|
||||
UART0->BAUDDIV = 16;
|
||||
|
||||
Reference in New Issue
Block a user