kopia lustrzana https://github.com/espressif/esp-idf
feat(example): support esp32p4 timer/gpio/uart sleep wakeup
rodzic
65e9d0ddb9
commit
1e17cecd24
|
@ -15,6 +15,8 @@
|
|||
#if CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32H2 \
|
||||
|| CONFIG_IDF_TARGET_ESP32C6
|
||||
#define BOOT_BUTTON_NUM 9
|
||||
#elif CONFIG_IDF_TARGET_ESP32P4
|
||||
#define BOOT_BUTTON_NUM 35
|
||||
#else
|
||||
#define BOOT_BUTTON_NUM 0
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
*/
|
||||
|
@ -102,7 +102,11 @@ static esp_err_t uart_initialization(void)
|
|||
.parity = UART_PARITY_DISABLE,
|
||||
.stop_bits = UART_STOP_BITS_1,
|
||||
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
|
||||
.source_clk = UART_SCLK_DEFAULT,
|
||||
#if SOC_UART_SUPPORT_REF_TICK
|
||||
.source_clk = UART_SCLK_REF_TICK,
|
||||
#elif SOC_UART_SUPPORT_XTAL_CLK
|
||||
.source_clk = UART_SCLK_XTAL
|
||||
#endif
|
||||
};
|
||||
//Install UART driver, and get the queue.
|
||||
ESP_RETURN_ON_ERROR(uart_driver_install(EXAMPLE_UART_NUM, EXAMPLE_UART_BUF_SIZE, EXAMPLE_UART_BUF_SIZE, 20, &uart_evt_que, 0),
|
||||
|
|
Ładowanie…
Reference in New Issue