forked from espressif/esp-idf
feat(example): support esp32p4 timer/gpio/uart sleep wakeup
This commit is contained in:
@@ -15,6 +15,8 @@
|
|||||||
#if CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32H2 \
|
#if CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32H2 \
|
||||||
|| CONFIG_IDF_TARGET_ESP32C6
|
|| CONFIG_IDF_TARGET_ESP32C6
|
||||||
#define BOOT_BUTTON_NUM 9
|
#define BOOT_BUTTON_NUM 9
|
||||||
|
#elif CONFIG_IDF_TARGET_ESP32P4
|
||||||
|
#define BOOT_BUTTON_NUM 35
|
||||||
#else
|
#else
|
||||||
#define BOOT_BUTTON_NUM 0
|
#define BOOT_BUTTON_NUM 0
|
||||||
#endif
|
#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
|
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||||
*/
|
*/
|
||||||
@@ -102,7 +102,11 @@ static esp_err_t uart_initialization(void)
|
|||||||
.parity = UART_PARITY_DISABLE,
|
.parity = UART_PARITY_DISABLE,
|
||||||
.stop_bits = UART_STOP_BITS_1,
|
.stop_bits = UART_STOP_BITS_1,
|
||||||
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
|
.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.
|
//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),
|
ESP_RETURN_ON_ERROR(uart_driver_install(EXAMPLE_UART_NUM, EXAMPLE_UART_BUF_SIZE, EXAMPLE_UART_BUF_SIZE, 20, &uart_evt_que, 0),
|
||||||
|
Reference in New Issue
Block a user