esp32: Add initial support for ESP32S2 SoCs.

Builds against IDF v4.3-beta2.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2021-02-18 21:24:34 +11:00
parent 8459f538eb
commit 66a86a0615
18 changed files with 125 additions and 20 deletions

View File

@@ -49,7 +49,11 @@ STATIC void IRAM_ATTR uart_irq_handler(void *arg) {
uart->int_clr.frm_err = 1;
uart->int_clr.rxfifo_tout = 1;
while (uart->status.rxfifo_cnt) {
#if CONFIG_IDF_TARGET_ESP32
uint8_t c = uart->fifo.rw_byte;
#elif CONFIG_IDF_TARGET_ESP32S2
uint8_t c = READ_PERI_REG(UART_FIFO_AHB_REG(0)); // UART0
#endif
if (c == mp_interrupt_char) {
mp_keyboard_interrupt();
} else {