diff --git a/components/efuse/esp32/esp_efuse_fields.c b/components/efuse/esp32/esp_efuse_fields.c index 2981e7e33a..db7fa933ad 100644 --- a/components/efuse/esp32/esp_efuse_fields.c +++ b/components/efuse/esp32/esp_efuse_fields.c @@ -15,7 +15,6 @@ #include "soc/efuse_periph.h" #include "soc/chip_revision.h" #include "hal/efuse_hal.h" -#include "bootloader_random.h" #include "sys/param.h" #include "soc/syscon_reg.h" diff --git a/components/efuse/esp32c2/esp_efuse_fields.c b/components/efuse/esp32c2/esp_efuse_fields.c index c99799598b..8cec4e17bd 100644 --- a/components/efuse/esp32c2/esp_efuse_fields.c +++ b/components/efuse/esp32c2/esp_efuse_fields.c @@ -14,7 +14,6 @@ #include "esp_err.h" #include "esp_log.h" #include "soc/efuse_periph.h" -#include "bootloader_random.h" #include "sys/param.h" static __attribute__((unused)) const char *TAG = "efuse"; diff --git a/components/efuse/esp32c3/esp_efuse_fields.c b/components/efuse/esp32c3/esp_efuse_fields.c index fce7b743ff..7f34d8984c 100644 --- a/components/efuse/esp32c3/esp_efuse_fields.c +++ b/components/efuse/esp32c3/esp_efuse_fields.c @@ -14,7 +14,6 @@ #include "esp_err.h" #include "esp_log.h" #include "soc/efuse_periph.h" -#include "bootloader_random.h" #include "sys/param.h" static __attribute__((unused)) const char *TAG = "efuse"; diff --git a/components/efuse/esp32c6/esp_efuse_fields.c b/components/efuse/esp32c6/esp_efuse_fields.c index ba55a94411..a485a9e0e7 100644 --- a/components/efuse/esp32c6/esp_efuse_fields.c +++ b/components/efuse/esp32c6/esp_efuse_fields.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -14,7 +14,6 @@ #include "esp_err.h" #include "esp_log.h" #include "soc/efuse_periph.h" -#include "bootloader_random.h" #include "sys/param.h" static __attribute__((unused)) const char *TAG = "efuse"; diff --git a/components/efuse/esp32h2/esp_efuse_fields.c b/components/efuse/esp32h2/esp_efuse_fields.c index 38eaf4ab9a..140a10ceb7 100644 --- a/components/efuse/esp32h2/esp_efuse_fields.c +++ b/components/efuse/esp32h2/esp_efuse_fields.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -14,7 +14,6 @@ #include "esp_err.h" #include "esp_log.h" #include "soc/efuse_periph.h" -#include "bootloader_random.h" #include "sys/param.h" static __attribute__((unused)) const char *TAG = "efuse"; diff --git a/components/efuse/esp32h4/esp_efuse_fields.c b/components/efuse/esp32h4/esp_efuse_fields.c index 6a0a286cf3..a22003560c 100644 --- a/components/efuse/esp32h4/esp_efuse_fields.c +++ b/components/efuse/esp32h4/esp_efuse_fields.c @@ -14,7 +14,6 @@ #include "esp_err.h" #include "esp_log.h" #include "soc/efuse_periph.h" -#include "bootloader_random.h" #include "sys/param.h" static __attribute__((unused)) const char *TAG = "efuse"; diff --git a/components/efuse/esp32s2/esp_efuse_fields.c b/components/efuse/esp32s2/esp_efuse_fields.c index d172ff84d2..618286882a 100644 --- a/components/efuse/esp32s2/esp_efuse_fields.c +++ b/components/efuse/esp32s2/esp_efuse_fields.c @@ -13,7 +13,6 @@ #include "esp_err.h" #include "esp_log.h" #include "soc/efuse_periph.h" -#include "bootloader_random.h" #include "sys/param.h" static __attribute__((unused)) const char *TAG = "efuse"; diff --git a/components/efuse/esp32s3/esp_efuse_fields.c b/components/efuse/esp32s3/esp_efuse_fields.c index a6448ac652..22b16bd6ad 100644 --- a/components/efuse/esp32s3/esp_efuse_fields.c +++ b/components/efuse/esp32s3/esp_efuse_fields.c @@ -13,7 +13,6 @@ #include "esp_err.h" #include "esp_log.h" #include "soc/efuse_periph.h" -#include "bootloader_random.h" #include "sys/param.h" static __attribute__((unused)) const char *TAG = "efuse"; diff --git a/components/efuse/src/esp_efuse_fields.c b/components/efuse/src/esp_efuse_fields.c index 2f21cf7be4..a73ed03915 100644 --- a/components/efuse/src/esp_efuse_fields.c +++ b/components/efuse/src/esp_efuse_fields.c @@ -15,7 +15,6 @@ #include "esp_fault.h" #include "esp_log.h" #include "soc/efuse_periph.h" -#include "bootloader_random.h" #include "sys/param.h" static __attribute__((unused)) const char *TAG = "efuse"; diff --git a/components/efuse/test_apps/main/one_key_block/test_efuse.c b/components/efuse/test_apps/main/one_key_block/test_efuse.c index ed23c1a4fd..c02b387524 100644 --- a/components/efuse/test_apps/main/one_key_block/test_efuse.c +++ b/components/efuse/test_apps/main/one_key_block/test_efuse.c @@ -15,13 +15,11 @@ #include "esp_efuse_table.h" #include "esp_efuse_utility.h" #include "esp_efuse_test_table.h" -#include "bootloader_random.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/semphr.h" #include "sdkconfig.h" #include "esp_rom_efuse.h" -#include "bootloader_common.h" __attribute__((unused)) static const char* TAG = "efuse_test"; diff --git a/components/efuse/test_apps/main/three_key_blocks/test_efuse.c b/components/efuse/test_apps/main/three_key_blocks/test_efuse.c index 68a1216397..6fb28bfa13 100644 --- a/components/efuse/test_apps/main/three_key_blocks/test_efuse.c +++ b/components/efuse/test_apps/main/three_key_blocks/test_efuse.c @@ -15,13 +15,11 @@ #include "esp_efuse_table.h" #include "esp_efuse_utility.h" #include "esp_efuse_test_table.h" -#include "bootloader_random.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/semphr.h" #include "sdkconfig.h" #include "esp_rom_efuse.h" -#include "bootloader_common.h" __attribute__((unused)) static const char* TAG = "efuse_test"; diff --git a/components/efuse/test_apps/main/with_key_purposes/test_efuse.c b/components/efuse/test_apps/main/with_key_purposes/test_efuse.c index 0f276d9e52..9d2600a26d 100644 --- a/components/efuse/test_apps/main/with_key_purposes/test_efuse.c +++ b/components/efuse/test_apps/main/with_key_purposes/test_efuse.c @@ -15,13 +15,11 @@ #include "esp_efuse_table.h" #include "esp_efuse_utility.h" #include "esp_efuse_test_table.h" -#include "bootloader_random.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/semphr.h" #include "sdkconfig.h" #include "esp_rom_efuse.h" -#include "bootloader_common.h" __attribute__((unused)) static const char* TAG = "efuse_test"; diff --git a/components/esp_hw_support/include/esp_private/esp_modem_clock.h b/components/esp_hw_support/include/esp_private/esp_modem_clock.h index 8b406550c6..bc678e039c 100644 --- a/components/esp_hw_support/include/esp_private/esp_modem_clock.h +++ b/components/esp_hw_support/include/esp_private/esp_modem_clock.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -10,6 +10,7 @@ #include #include +#include "soc/soc_caps.h" #include "soc/periph_defs.h" #include "hal/modem_clock_types.h" diff --git a/components/esp_hw_support/periph_ctrl.c b/components/esp_hw_support/periph_ctrl.c index c4e9a36742..032ce8a9ee 100644 --- a/components/esp_hw_support/periph_ctrl.c +++ b/components/esp_hw_support/periph_ctrl.c @@ -7,6 +7,7 @@ #include "hal/clk_gate_ll.h" #include "esp_attr.h" #include "esp_private/periph_ctrl.h" +#include "soc/soc_caps.h" #if SOC_MODEM_CLOCK_IS_INDEPENDENT #include "esp_private/esp_modem_clock.h" diff --git a/components/esp_rom/include/esp32/rom/ets_sys.h b/components/esp_rom/include/esp32/rom/ets_sys.h index 6f9688fcf1..549db8ffc6 100644 --- a/components/esp_rom/include/esp32/rom/ets_sys.h +++ b/components/esp_rom/include/esp32/rom/ets_sys.h @@ -48,7 +48,10 @@ extern "C" { typedef enum { ETS_OK = 0, /**< return successful in ets*/ - ETS_FAILED = 1 /**< return failed in ets*/ + ETS_FAILED = 1, /**< return failed in ets*/ + ETS_PENDING = 2, + ETS_BUSY = 3, + ETS_CANCEL = 4, } ETS_STATUS; typedef uint32_t ETSSignal; @@ -621,13 +624,16 @@ void intr_matrix_set(int cpu_no, uint32_t model_num, uint32_t intr_num); #define ETS_MEM_BAR() asm volatile ( "" : : : "memory" ) +#ifdef ESP_PLATFORM +// Remove in IDF v6.0 (IDF-7044) typedef enum { OK = 0, FAIL, PENDING, BUSY, CANCEL, -} STATUS; +} STATUS __attribute__((deprecated("Use ETS_STATUS instead"))); +#endif /** * @} diff --git a/components/esp_rom/include/esp32/rom/uart.h b/components/esp_rom/include/esp32/rom/uart.h index 3eb59f30f9..3bd0d38f48 100644 --- a/components/esp_rom/include/esp32/rom/uart.h +++ b/components/esp_rom/include/esp32/rom/uart.h @@ -227,7 +227,7 @@ void uart_buff_switch(uint8_t uart_no); * * @return OK. */ -STATUS uart_tx_one_char(uint8_t TxChar); +ETS_STATUS uart_tx_one_char(uint8_t TxChar); /** * @brief Output a char to message exchange channel, wait until fifo not full. @@ -237,7 +237,7 @@ STATUS uart_tx_one_char(uint8_t TxChar); * * @return OK. */ -STATUS uart_tx_one_char2(uint8_t TxChar); +ETS_STATUS uart_tx_one_char2(uint8_t TxChar); /** * @brief Wait until uart tx full empty. @@ -273,7 +273,7 @@ static inline void IRAM_ATTR uart_tx_wait_idle(uint8_t uart_no) { * @return OK for successful. * FAIL for failed. */ -STATUS uart_rx_one_char(uint8_t *pRxChar); +ETS_STATUS uart_rx_one_char(uint8_t *pRxChar); /** * @brief Get an input char from message channel, wait until successful. @@ -295,7 +295,7 @@ char uart_rx_one_char_block(void); * * @return OK. */ -STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen); +ETS_STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen); /** * @brief Process uart received information in the interrupt handler. @@ -318,7 +318,7 @@ void uart_rx_intr_handler(void *para); * @return OK for successful. * FAIL for failed. */ -STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte); +ETS_STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte); /** * @brief Get all chars from receive buffer. @@ -329,7 +329,7 @@ STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte); * @return OK for successful. * FAIL for failed. */ -STATUS UartGetCmdLn(uint8_t *pCmdLn); +ETS_STATUS UartGetCmdLn(uint8_t *pCmdLn); /** * @brief Get uart configuration struct. @@ -379,7 +379,7 @@ int recv_packet(uint8_t *p, int len, uint8_t is_sync); * @return OK for successful. * FAIL for failed. */ -STATUS SendMsg(uint8_t *pData, uint16_t DataLen); +ETS_STATUS SendMsg(uint8_t *pData, uint16_t DataLen); /** * @brief Receive an packet from download tool, with SLIP escaping. @@ -395,7 +395,7 @@ STATUS SendMsg(uint8_t *pData, uint16_t DataLen); * @return OK for successful. * FAIL for failed. */ -STATUS RcvMsg(uint8_t *pData, uint16_t MaxDataLen, uint8_t is_sync); +ETS_STATUS RcvMsg(uint8_t *pData, uint16_t MaxDataLen, uint8_t is_sync); extern UartDevice UartDev; diff --git a/components/esp_rom/include/esp32c2/rom/ets_sys.h b/components/esp_rom/include/esp32c2/rom/ets_sys.h index 6d2e3a4ef4..ad642fcc46 100644 --- a/components/esp_rom/include/esp32c2/rom/ets_sys.h +++ b/components/esp_rom/include/esp32c2/rom/ets_sys.h @@ -43,7 +43,10 @@ extern "C" { typedef enum { ETS_OK = 0, /**< return successful in ets*/ - ETS_FAILED = 1 /**< return failed in ets*/ + ETS_FAILED = 1, /**< return failed in ets*/ + ETS_PENDING = 2, + ETS_BUSY = 3, + ETS_CANCEL = 4, } ETS_STATUS; typedef ETS_STATUS ets_status_t; @@ -438,13 +441,16 @@ void intr_matrix_set(int cpu_no, uint32_t model_num, uint32_t intr_num); #define ETS_MEM_BAR() asm volatile ( "" : : : "memory" ) +#ifdef ESP_PLATFORM +// Remove in IDF v6.0 (IDF-7044) typedef enum { OK = 0, FAIL, PENDING, BUSY, CANCEL, -} STATUS; +} STATUS __attribute__((deprecated("Use ETS_STATUS instead"))); +#endif /** * @} diff --git a/components/esp_rom/include/esp32c2/rom/uart.h b/components/esp_rom/include/esp32c2/rom/uart.h index 8a4507e810..454e0d83a1 100644 --- a/components/esp_rom/include/esp32c2/rom/uart.h +++ b/components/esp_rom/include/esp32c2/rom/uart.h @@ -205,7 +205,7 @@ void uart_tx_switch(uint8_t uart_no); * * @return OK. */ -STATUS uart_tx_one_char(uint8_t TxChar); +ETS_STATUS uart_tx_one_char(uint8_t TxChar); /** * @brief Output a char to message exchange channel, wait until fifo not full. @@ -215,7 +215,7 @@ STATUS uart_tx_one_char(uint8_t TxChar); * * @return OK. */ -STATUS uart_tx_one_char2(uint8_t TxChar); +ETS_STATUS uart_tx_one_char2(uint8_t TxChar); /** * @brief Wait until uart tx full empty. @@ -245,7 +245,7 @@ void uart_tx_wait_idle(uint8_t uart_no); * @return OK for successful. * FAIL for failed. */ -STATUS uart_rx_one_char(uint8_t *pRxChar); +ETS_STATUS uart_rx_one_char(uint8_t *pRxChar); /** * @brief Get an input char from message channel, wait until successful. @@ -267,7 +267,7 @@ char uart_rx_one_char_block(void); * * @return OK. */ -STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen); +ETS_STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen); /** * @brief Get an char from receive buffer. @@ -280,7 +280,7 @@ STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen); * @return OK for successful. * FAIL for failed. */ -STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte); +ETS_STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte); /** * @brief Get all chars from receive buffer. @@ -291,7 +291,7 @@ STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte); * @return OK for successful. * FAIL for failed. */ -STATUS UartGetCmdLn(uint8_t *pCmdLn); +ETS_STATUS UartGetCmdLn(uint8_t *pCmdLn); /** * @brief Get uart configuration struct. diff --git a/components/esp_rom/include/esp32c3/rom/ets_sys.h b/components/esp_rom/include/esp32c3/rom/ets_sys.h index d5489bd835..06b3b47d8c 100644 --- a/components/esp_rom/include/esp32c3/rom/ets_sys.h +++ b/components/esp_rom/include/esp32c3/rom/ets_sys.h @@ -43,7 +43,10 @@ extern "C" { typedef enum { ETS_OK = 0, /**< return successful in ets*/ - ETS_FAILED = 1 /**< return failed in ets*/ + ETS_FAILED = 1, /**< return failed in ets*/ + ETS_PENDING = 2, + ETS_BUSY = 3, + ETS_CANCEL = 4, } ETS_STATUS; typedef ETS_STATUS ets_status_t; @@ -430,13 +433,16 @@ void intr_matrix_set(int cpu_no, uint32_t model_num, uint32_t intr_num); #define ETS_MEM_BAR() asm volatile ( "" : : : "memory" ) +#ifdef ESP_PLATFORM +// Remove in IDF v6.0 (IDF-7044) typedef enum { OK = 0, FAIL, PENDING, BUSY, CANCEL, -} STATUS; +} STATUS __attribute__((deprecated("Use ETS_STATUS instead"))); +#endif /** * @} diff --git a/components/esp_rom/include/esp32c3/rom/uart.h b/components/esp_rom/include/esp32c3/rom/uart.h index 0cd91b06d5..a4fbd52077 100644 --- a/components/esp_rom/include/esp32c3/rom/uart.h +++ b/components/esp_rom/include/esp32c3/rom/uart.h @@ -195,7 +195,7 @@ void uart_div_modify(uint8_t uart_no, uint32_t DivLatchValue); * * @return OK. */ -STATUS uart_tx_one_char(uint8_t TxChar); +ETS_STATUS uart_tx_one_char(uint8_t TxChar); /** * @brief Output a char to message exchange channel, wait until fifo not full. @@ -205,7 +205,7 @@ STATUS uart_tx_one_char(uint8_t TxChar); * * @return OK. */ -STATUS uart_tx_one_char2(uint8_t TxChar); +ETS_STATUS uart_tx_one_char2(uint8_t TxChar); /** * @brief Wait until uart tx full empty. @@ -235,7 +235,7 @@ void uart_tx_wait_idle(uint8_t uart_no); * @return OK for successful. * FAIL for failed. */ -STATUS uart_rx_one_char(uint8_t *pRxChar); +ETS_STATUS uart_rx_one_char(uint8_t *pRxChar); /** * @brief Get an input char from message channel, wait until successful. @@ -257,7 +257,7 @@ char uart_rx_one_char_block(void); * * @return OK. */ -STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen); +ETS_STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen); /** * @brief Get an char from receive buffer. @@ -270,7 +270,7 @@ STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen); * @return OK for successful. * FAIL for failed. */ -STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte); +ETS_STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte); /** * @brief Get uart configuration struct. diff --git a/components/esp_rom/include/esp32c6/rom/ets_sys.h b/components/esp_rom/include/esp32c6/rom/ets_sys.h index 48a724d54b..7c04af3a54 100644 --- a/components/esp_rom/include/esp32c6/rom/ets_sys.h +++ b/components/esp_rom/include/esp32c6/rom/ets_sys.h @@ -43,7 +43,10 @@ extern "C" { typedef enum { ETS_OK = 0, /**< return successful in ets*/ - ETS_FAILED = 1 /**< return failed in ets*/ + ETS_FAILED = 1, /**< return failed in ets*/ + ETS_PENDING = 2, + ETS_BUSY = 3, + ETS_CANCEL = 4, } ETS_STATUS; typedef ETS_STATUS ets_status_t; @@ -407,13 +410,16 @@ void intr_matrix_set(int cpu_no, uint32_t model_num, uint32_t intr_num); #define ETS_MEM_BAR() asm volatile ( "" : : : "memory" ) +#ifdef ESP_PLATFORM +// Remove in IDF v6.0 (IDF-7044) typedef enum { OK = 0, FAIL, PENDING, BUSY, CANCEL, -} STATUS; +} STATUS __attribute__((deprecated("Use ETS_STATUS instead"))); +#endif /** * @} diff --git a/components/esp_rom/include/esp32c6/rom/uart.h b/components/esp_rom/include/esp32c6/rom/uart.h index 380f19a4e5..9045c42f6f 100644 --- a/components/esp_rom/include/esp32c6/rom/uart.h +++ b/components/esp_rom/include/esp32c6/rom/uart.h @@ -205,7 +205,7 @@ void uart_tx_switch(uint8_t uart_no); * * @return OK. */ -STATUS uart_tx_one_char(uint8_t TxChar); +ETS_STATUS uart_tx_one_char(uint8_t TxChar); /** * @brief Output a char to message exchange channel, wait until fifo not full. @@ -215,7 +215,7 @@ STATUS uart_tx_one_char(uint8_t TxChar); * * @return OK. */ -STATUS uart_tx_one_char2(uint8_t TxChar); +ETS_STATUS uart_tx_one_char2(uint8_t TxChar); /** * @brief Wait until uart tx full empty. @@ -245,7 +245,7 @@ void uart_tx_wait_idle(uint8_t uart_no); * @return OK for successful. * FAIL for failed. */ -STATUS uart_rx_one_char(uint8_t *pRxChar); +ETS_STATUS uart_rx_one_char(uint8_t *pRxChar); /** * @brief Get an input char from message channel, wait until successful. @@ -267,7 +267,7 @@ char uart_rx_one_char_block(void); * * @return OK. */ -STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen); +ETS_STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen); /** * @brief Process uart recevied information in the interrupt handler. @@ -290,7 +290,7 @@ void uart_rx_intr_handler(void *para); * @return OK for successful. * FAIL for failed. */ -STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte); +ETS_STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte); /** * @brief Get all chars from receive buffer. @@ -301,7 +301,7 @@ STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte); * @return OK for successful. * FAIL for failed. */ -STATUS UartGetCmdLn(uint8_t *pCmdLn); +ETS_STATUS UartGetCmdLn(uint8_t *pCmdLn); /** * @brief Get uart configuration struct. diff --git a/components/esp_rom/include/esp32h2/rom/ets_sys.h b/components/esp_rom/include/esp32h2/rom/ets_sys.h index b9ac5a13f4..b9247bc3bd 100644 --- a/components/esp_rom/include/esp32h2/rom/ets_sys.h +++ b/components/esp_rom/include/esp32h2/rom/ets_sys.h @@ -43,7 +43,10 @@ extern "C" { typedef enum { ETS_OK = 0, /**< return successful in ets*/ - ETS_FAILED = 1 /**< return failed in ets*/ + ETS_FAILED = 1, /**< return failed in ets*/ + ETS_PENDING = 2, + ETS_BUSY = 3, + ETS_CANCEL = 4, } ETS_STATUS; typedef ETS_STATUS ets_status_t; @@ -406,13 +409,16 @@ void intr_matrix_set(int cpu_no, uint32_t model_num, uint32_t intr_num); #define ETS_MEM_BAR() asm volatile ( "" : : : "memory" ) +#ifdef ESP_PLATFORM +// Remove in IDF v6.0 (IDF-7044) typedef enum { OK = 0, FAIL, PENDING, BUSY, CANCEL, -} STATUS; +} STATUS __attribute__((deprecated("Use ETS_STATUS instead"))); +#endif /** * @} diff --git a/components/esp_rom/include/esp32h2/rom/uart.h b/components/esp_rom/include/esp32h2/rom/uart.h index 380f19a4e5..9045c42f6f 100644 --- a/components/esp_rom/include/esp32h2/rom/uart.h +++ b/components/esp_rom/include/esp32h2/rom/uart.h @@ -205,7 +205,7 @@ void uart_tx_switch(uint8_t uart_no); * * @return OK. */ -STATUS uart_tx_one_char(uint8_t TxChar); +ETS_STATUS uart_tx_one_char(uint8_t TxChar); /** * @brief Output a char to message exchange channel, wait until fifo not full. @@ -215,7 +215,7 @@ STATUS uart_tx_one_char(uint8_t TxChar); * * @return OK. */ -STATUS uart_tx_one_char2(uint8_t TxChar); +ETS_STATUS uart_tx_one_char2(uint8_t TxChar); /** * @brief Wait until uart tx full empty. @@ -245,7 +245,7 @@ void uart_tx_wait_idle(uint8_t uart_no); * @return OK for successful. * FAIL for failed. */ -STATUS uart_rx_one_char(uint8_t *pRxChar); +ETS_STATUS uart_rx_one_char(uint8_t *pRxChar); /** * @brief Get an input char from message channel, wait until successful. @@ -267,7 +267,7 @@ char uart_rx_one_char_block(void); * * @return OK. */ -STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen); +ETS_STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen); /** * @brief Process uart recevied information in the interrupt handler. @@ -290,7 +290,7 @@ void uart_rx_intr_handler(void *para); * @return OK for successful. * FAIL for failed. */ -STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte); +ETS_STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte); /** * @brief Get all chars from receive buffer. @@ -301,7 +301,7 @@ STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte); * @return OK for successful. * FAIL for failed. */ -STATUS UartGetCmdLn(uint8_t *pCmdLn); +ETS_STATUS UartGetCmdLn(uint8_t *pCmdLn); /** * @brief Get uart configuration struct. diff --git a/components/esp_rom/include/esp32h4/rom/ets_sys.h b/components/esp_rom/include/esp32h4/rom/ets_sys.h index 902127abfb..91544de628 100644 --- a/components/esp_rom/include/esp32h4/rom/ets_sys.h +++ b/components/esp_rom/include/esp32h4/rom/ets_sys.h @@ -43,7 +43,10 @@ extern "C" { typedef enum { ETS_OK = 0, /**< return successful in ets*/ - ETS_FAILED = 1 /**< return failed in ets*/ + ETS_FAILED = 1, /**< return failed in ets*/ + ETS_PENDING = 2, + ETS_BUSY = 3, + ETS_CANCEL = 4, } ETS_STATUS; typedef ETS_STATUS ets_status_t; @@ -441,13 +444,16 @@ void intr_matrix_set(int cpu_no, uint32_t model_num, uint32_t intr_num); #define ETS_MEM_BAR() asm volatile ( "" : : : "memory" ) +#ifdef ESP_PLATFORM +// Remove in IDF v6.0 (IDF-7044) typedef enum { OK = 0, FAIL, PENDING, BUSY, CANCEL, -} STATUS; +} STATUS __attribute__((deprecated("Use ETS_STATUS instead"))); +#endif /** * @} diff --git a/components/esp_rom/include/esp32h4/rom/uart.h b/components/esp_rom/include/esp32h4/rom/uart.h index d271893d76..28677ac409 100644 --- a/components/esp_rom/include/esp32h4/rom/uart.h +++ b/components/esp_rom/include/esp32h4/rom/uart.h @@ -205,7 +205,7 @@ void uart_tx_switch(uint8_t uart_no); * * @return OK. */ -STATUS uart_tx_one_char(uint8_t TxChar); +ETS_STATUS uart_tx_one_char(uint8_t TxChar); /** * @brief Output a char to message exchange channel, wait until fifo not full. @@ -215,7 +215,7 @@ STATUS uart_tx_one_char(uint8_t TxChar); * * @return OK. */ -STATUS uart_tx_one_char2(uint8_t TxChar); +ETS_STATUS uart_tx_one_char2(uint8_t TxChar); /** * @brief Wait until uart tx full empty. @@ -245,7 +245,7 @@ void uart_tx_wait_idle(uint8_t uart_no); * @return OK for successful. * FAIL for failed. */ -STATUS uart_rx_one_char(uint8_t *pRxChar); +ETS_STATUS uart_rx_one_char(uint8_t *pRxChar); /** * @brief Get an input char from message channel, wait until successful. @@ -267,7 +267,7 @@ char uart_rx_one_char_block(void); * * @return OK. */ -STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen); +ETS_STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen); /** * @brief Get an char from receive buffer. @@ -280,7 +280,7 @@ STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen); * @return OK for successful. * FAIL for failed. */ -STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte); +ETS_STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte); /** * @brief Get all chars from receive buffer. @@ -291,7 +291,7 @@ STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte); * @return OK for successful. * FAIL for failed. */ -STATUS UartGetCmdLn(uint8_t *pCmdLn); +ETS_STATUS UartGetCmdLn(uint8_t *pCmdLn); /** * @brief Get uart configuration struct. diff --git a/components/esp_rom/include/esp32s2/rom/ets_sys.h b/components/esp_rom/include/esp32s2/rom/ets_sys.h index a2cf1adce3..19c1994de7 100644 --- a/components/esp_rom/include/esp32s2/rom/ets_sys.h +++ b/components/esp_rom/include/esp32s2/rom/ets_sys.h @@ -45,7 +45,10 @@ extern "C" { typedef enum { ETS_OK = 0, /**< return successful in ets*/ - ETS_FAILED = 1 /**< return failed in ets*/ + ETS_FAILED = 1, /**< return failed in ets*/ + ETS_PENDING = 2, + ETS_BUSY = 3, + ETS_CANCEL = 4, } ETS_STATUS; typedef ETS_STATUS ets_status_t; @@ -556,13 +559,16 @@ void intr_matrix_set(int cpu_no, uint32_t model_num, uint32_t intr_num); #define ETS_MEM_BAR() asm volatile ( "" : : : "memory" ) +#ifdef ESP_PLATFORM +// Remove in IDF v6.0 (IDF-7044) typedef enum { OK = 0, FAIL, PENDING, BUSY, CANCEL, -} STATUS; +} STATUS __attribute__((deprecated("Use ETS_STATUS instead"))); +#endif /** * @} diff --git a/components/esp_rom/include/esp32s2/rom/uart.h b/components/esp_rom/include/esp32s2/rom/uart.h index 899413f317..491d2c28fb 100644 --- a/components/esp_rom/include/esp32s2/rom/uart.h +++ b/components/esp_rom/include/esp32s2/rom/uart.h @@ -1,16 +1,8 @@ -// Copyright 2010-2016 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2010-2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef _ROM_UART_H_ #define _ROM_UART_H_ @@ -251,7 +243,7 @@ void uart_buff_switch(uint8_t uart_no); * * @return OK. */ -STATUS uart_tx_one_char(uint8_t TxChar); +ETS_STATUS uart_tx_one_char(uint8_t TxChar); /** * @brief Output a char to message exchange channel, wait until fifo not full. @@ -261,7 +253,7 @@ STATUS uart_tx_one_char(uint8_t TxChar); * * @return OK. */ -STATUS uart_tx_one_char2(uint8_t TxChar); +ETS_STATUS uart_tx_one_char2(uint8_t TxChar); /** * @brief Wait until uart tx full empty. @@ -291,7 +283,7 @@ void uart_tx_wait_idle(uint8_t uart_no); * @return OK for successful. * FAIL for failed. */ -STATUS uart_rx_one_char(uint8_t *pRxChar); +ETS_STATUS uart_rx_one_char(uint8_t *pRxChar); /** * @brief Get an input char from message channel, wait until successful. @@ -313,7 +305,7 @@ char uart_rx_one_char_block(void); * * @return OK. */ -STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen); +ETS_STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen); /** * @brief Process uart recevied information in the interrupt handler. @@ -336,7 +328,7 @@ void uart_rx_intr_handler(void *para); * @return OK for successful. * FAIL for failed. */ -STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte); +ETS_STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte); /** * @brief Get all chars from receive buffer. @@ -347,7 +339,7 @@ STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte); * @return OK for successful. * FAIL for failed. */ -STATUS UartGetCmdLn(uint8_t *pCmdLn); +ETS_STATUS UartGetCmdLn(uint8_t *pCmdLn); /** * @brief Get uart configuration struct. @@ -397,7 +389,7 @@ int recv_packet(uint8_t *p, int len, uint8_t is_sync); * @return OK for successful. * FAIL for failed. */ -STATUS SendMsg(uint8_t *pData, uint16_t DataLen); +ETS_STATUS SendMsg(uint8_t *pData, uint16_t DataLen); /** * @brief Receive an packet from download tool, with SLIP escaping. @@ -413,7 +405,7 @@ STATUS SendMsg(uint8_t *pData, uint16_t DataLen); * @return OK for successful. * FAIL for failed. */ -STATUS RcvMsg(uint8_t *pData, uint16_t MaxDataLen, uint8_t is_sync); +ETS_STATUS RcvMsg(uint8_t *pData, uint16_t MaxDataLen, uint8_t is_sync); /** * @brief Check if this UART is in download connection. diff --git a/components/esp_rom/include/esp32s3/rom/ets_sys.h b/components/esp_rom/include/esp32s3/rom/ets_sys.h index 9047442c36..83c93b2eb6 100644 --- a/components/esp_rom/include/esp32s3/rom/ets_sys.h +++ b/components/esp_rom/include/esp32s3/rom/ets_sys.h @@ -43,7 +43,10 @@ extern "C" { typedef enum { ETS_OK = 0, /**< return successful in ets*/ - ETS_FAILED = 1 /**< return failed in ets*/ + ETS_FAILED = 1, /**< return failed in ets*/ + ETS_PENDING = 2, + ETS_BUSY = 3, + ETS_CANCEL = 4, } ETS_STATUS; typedef ETS_STATUS ets_status_t; @@ -543,13 +546,16 @@ void intr_matrix_set(int cpu_no, uint32_t model_num, uint32_t intr_num); #define ETS_MEM_BAR() asm volatile ( "" : : : "memory" ) +#ifdef ESP_PLATFORM +// Remove in IDF v6.0 (IDF-7044) typedef enum { OK = 0, FAIL, PENDING, BUSY, CANCEL, -} STATUS; +} STATUS __attribute__((deprecated("Use ETS_STATUS instead"))); +#endif /** * @} diff --git a/components/esp_rom/include/esp32s3/rom/uart.h b/components/esp_rom/include/esp32s3/rom/uart.h index 3486886ad5..864563f788 100644 --- a/components/esp_rom/include/esp32s3/rom/uart.h +++ b/components/esp_rom/include/esp32s3/rom/uart.h @@ -203,7 +203,7 @@ void uart_tx_switch(uint8_t uart_no); * * @return OK. */ -STATUS uart_tx_one_char(uint8_t TxChar); +ETS_STATUS uart_tx_one_char(uint8_t TxChar); /** * @brief Output a char to message exchange channel, wait until fifo not full. @@ -213,7 +213,7 @@ STATUS uart_tx_one_char(uint8_t TxChar); * * @return OK. */ -STATUS uart_tx_one_char2(uint8_t TxChar); +ETS_STATUS uart_tx_one_char2(uint8_t TxChar); /** * @brief Wait until uart tx full empty. @@ -243,7 +243,7 @@ void uart_tx_wait_idle(uint8_t uart_no); * @return OK for successful. * FAIL for failed. */ -STATUS uart_rx_one_char(uint8_t *pRxChar); +ETS_STATUS uart_rx_one_char(uint8_t *pRxChar); /** * @brief Get an input char from message channel, wait until successful. @@ -265,7 +265,7 @@ char uart_rx_one_char_block(void); * * @return OK. */ -STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen); +ETS_STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen); /** * @brief Get an char from receive buffer. @@ -278,7 +278,7 @@ STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen); * @return OK for successful. * FAIL for failed. */ -STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte); +ETS_STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte); /** * @brief Get uart configuration struct. diff --git a/components/esp_system/port/soc/esp32c3/clk.c b/components/esp_system/port/soc/esp32c3/clk.c index 87f8b1c04b..21d256617a 100644 --- a/components/esp_system/port/soc/esp32c3/clk.c +++ b/components/esp_system/port/soc/esp32c3/clk.c @@ -23,7 +23,6 @@ #include "hal/wdt_hal.h" #include "esp_private/periph_ctrl.h" #include "esp_private/esp_clk.h" -#include "bootloader_clock.h" #include "soc/syscon_reg.h" #include "esp_rom_uart.h" #include "esp_rom_sys.h" diff --git a/components/hal/esp32c6/include/hal/regi2c_ctrl_ll.h b/components/hal/esp32c6/include/hal/regi2c_ctrl_ll.h index dc96bc1402..597cbdf368 100644 --- a/components/hal/esp32c6/include/hal/regi2c_ctrl_ll.h +++ b/components/hal/esp32c6/include/hal/regi2c_ctrl_ll.h @@ -6,6 +6,7 @@ #pragma once +#include #include #include "soc/soc.h" #include "soc/regi2c_defs.h" diff --git a/components/hal/esp32h2/include/hal/regi2c_ctrl_ll.h b/components/hal/esp32h2/include/hal/regi2c_ctrl_ll.h index 8659673a69..d728e53f67 100644 --- a/components/hal/esp32h2/include/hal/regi2c_ctrl_ll.h +++ b/components/hal/esp32h2/include/hal/regi2c_ctrl_ll.h @@ -6,6 +6,7 @@ #pragma once +#include #include #include "soc/soc.h" #include "soc/regi2c_defs.h" diff --git a/components/log/log_noos.c b/components/log/log_noos.c index 6359e58601..f62131be77 100644 --- a/components/log/log_noos.c +++ b/components/log/log_noos.c @@ -17,7 +17,7 @@ void esp_log_impl_lock(void) s_lock = 1; } -bool esp_log_lock_impl_timeout(void) +bool esp_log_impl_lock_timeout(void) { esp_log_impl_lock(); return true; diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_scan.c b/components/wpa_supplicant/esp_supplicant/src/esp_scan.c index 21f9b1e05e..6abb0e0602 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_scan.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_scan.c @@ -24,7 +24,7 @@ extern struct wpa_supplicant g_wpa_supp; -static void scan_done_event_handler(void *arg, STATUS status) +static void scan_done_event_handler(void *arg, ETS_STATUS status) { struct wpa_supplicant *wpa_s = &g_wpa_supp; @@ -226,7 +226,7 @@ static int issue_scan(struct wpa_supplicant *wpa_s, wpa_s->type |= (1 << WLAN_FC_STYPE_BEACON) | (1 << WLAN_FC_STYPE_PROBE_RESP); esp_wifi_register_mgmt_frame_internal(wpa_s->type, wpa_s->subtype); - typedef void (* scan_done_cb_t)(void *arg, STATUS status); + typedef void (* scan_done_cb_t)(void *arg, ETS_STATUS status); extern int esp_wifi_promiscuous_scan_start(wifi_scan_config_t *config, scan_done_cb_t cb); /* issue scan */ if (esp_wifi_promiscuous_scan_start(params, scan_done_event_handler) < 0) { diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_wps.c b/components/wpa_supplicant/esp_supplicant/src/esp_wps.c index b5d1ac622e..21dd374f1b 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_wps.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_wps.c @@ -56,7 +56,7 @@ static uint8_t s_wps_sig_cnt[SIG_WPS_NUM] = {0}; #endif -void wifi_wps_scan_done(void *arg, STATUS status); +void wifi_wps_scan_done(void *arg, ETS_STATUS status); void wifi_wps_scan(void *data, void *user_ctx); int wifi_station_wps_start(void); int wps_sm_rx_eapol_internal(u8 *src_addr, u8 *buf, u32 len); @@ -1532,7 +1532,7 @@ wps_sm_get(void) } void -wifi_wps_scan_done(void *arg, STATUS status) +wifi_wps_scan_done(void *arg, ETS_STATUS status) { struct wps_sm *sm = gWpsSm; wifi_config_t wifi_config = {0}; @@ -1596,7 +1596,7 @@ wifi_wps_scan_internal(void) sm->scan_cnt++; wpa_printf(MSG_DEBUG, "wifi_wps_scan : %d", sm->scan_cnt); - typedef void (* scan_done_cb_t)(void *arg, STATUS status); + typedef void (* scan_done_cb_t)(void *arg, ETS_STATUS status); extern int esp_wifi_promiscuous_scan_start(wifi_scan_config_t *config, scan_done_cb_t cb); esp_wifi_promiscuous_scan_start(NULL, wifi_wps_scan_done); } diff --git a/tools/ci/check_copyright_ignore.txt b/tools/ci/check_copyright_ignore.txt index 01bbace204..65f2daa5cd 100644 --- a/tools/ci/check_copyright_ignore.txt +++ b/tools/ci/check_copyright_ignore.txt @@ -501,7 +501,6 @@ components/esp_rom/include/esp32s2/rom/libc_stubs.h components/esp_rom/include/esp32s2/rom/opi_flash.h components/esp_rom/include/esp32s2/rom/rsa_pss.h components/esp_rom/include/esp32s2/rom/sha.h -components/esp_rom/include/esp32s2/rom/uart.h components/esp_rom/include/esp32s2/rom/usb/cdc_acm.h components/esp_rom/include/esp32s2/rom/usb/chip_usb_dw_wrapper.h components/esp_rom/include/esp32s2/rom/usb/cpio.h