Skip to content

Commit 70293c4

Browse files
committed
IDF master 316988bd2d
1 parent 9896bba commit 70293c4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+986
-194
lines changed

platform.txt

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

tools/platformio-build-esp32.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@
298298
"UNITY_INCLUDE_CONFIG_H",
299299
"WITH_POSIX",
300300
"_GNU_SOURCE",
301-
("IDF_VER", '\\"v4.4-dev-2928-gd5f58ab135\\"'),
301+
("IDF_VER", '\\"v4.4-dev-2944-g316988bd2d\\"'),
302302
"ESP_PLATFORM",
303303
"ARDUINO_ARCH_ESP32",
304304
"ESP32",

tools/platformio-build-esp32c3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@
281281
"UNITY_INCLUDE_CONFIG_H",
282282
"WITH_POSIX",
283283
"_GNU_SOURCE",
284-
("IDF_VER", '\\"v4.4-dev-2928-gd5f58ab135\\"'),
284+
("IDF_VER", '\\"v4.4-dev-2944-g316988bd2d\\"'),
285285
"ESP_PLATFORM",
286286
"ARDUINO_ARCH_ESP32",
287287
"ESP32",

tools/platformio-build-esp32s2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@
285285
"UNITY_INCLUDE_CONFIG_H",
286286
"WITH_POSIX",
287287
"_GNU_SOURCE",
288-
("IDF_VER", '\\"v4.4-dev-2928-gd5f58ab135\\"'),
288+
("IDF_VER", '\\"v4.4-dev-2944-g316988bd2d\\"'),
289289
"ESP_PLATFORM",
290290
"ARDUINO_ARCH_ESP32",
291291
"ESP32",

tools/sdk/esp32/include/config/sdkconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,5 +695,5 @@
695695
#define CONFIG_ULP_COPROC_ENABLED CONFIG_ESP32_ULP_COPROC_ENABLED
696696
#define CONFIG_ULP_COPROC_RESERVE_MEM CONFIG_ESP32_ULP_COPROC_RESERVE_MEM
697697
#define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS
698-
#define CONFIG_ARDUINO_IDF_COMMIT "d5f58ab135"
698+
#define CONFIG_ARDUINO_IDF_COMMIT "316988bd2d"
699699
#define CONFIG_ARDUINO_IDF_BRANCH "master"

tools/sdk/esp32/include/driver/include/driver/i2s.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "driver/periph_ctrl.h"
1818
#include "esp_intr_alloc.h"
1919

20-
#if SOC_I2S_SUPPORTS_ADC_DAC
20+
#if SOC_I2S_SUPPORTS_ADC
2121
#include "driver/adc.h"
2222
#endif
2323

@@ -355,7 +355,7 @@ esp_err_t i2s_stop(i2s_port_t i2s_num);
355355
*
356356
* @param i2s_num I2S port number
357357
*
358-
* @return
358+
* @return
359359
* - ESP_OK Success
360360
* - ESP_ERR_INVALID_ARG Parameter error
361361
*/
@@ -430,7 +430,7 @@ esp_err_t i2s_set_clk(i2s_port_t i2s_num, uint32_t rate, uint32_t bits_cfg, i2s_
430430
*/
431431
float i2s_get_clk(i2s_port_t i2s_num);
432432

433-
#if SOC_I2S_SUPPORTS_ADC_DAC
433+
#if SOC_I2S_SUPPORTS_ADC
434434
/**
435435
* @brief Set built-in ADC mode for I2S DMA, this function will initialize ADC pad,
436436
* and set ADC parameters.
@@ -466,7 +466,9 @@ esp_err_t i2s_adc_enable(i2s_port_t i2s_num);
466466
* - ESP_ERR_INVALID_STATE Driver state error
467467
*/
468468
esp_err_t i2s_adc_disable(i2s_port_t i2s_num);
469+
#endif // SOC_I2S_SUPPORTS_ADC
469470

471+
#if SOC_I2S_SUPPORTS_DAC
470472
/**
471473
* @brief Set I2S dac mode, I2S built-in DAC is disabled by default
472474
*
@@ -481,7 +483,7 @@ esp_err_t i2s_adc_disable(i2s_port_t i2s_num);
481483
* - ESP_ERR_INVALID_ARG Parameter error
482484
*/
483485
esp_err_t i2s_set_dac_mode(i2s_dac_mode_t dac_mode);
484-
#endif //SOC_I2S_SUPPORTS_ADC_DAC
486+
#endif //SOC_I2S_SUPPORTS_DAC
485487

486488

487489
#ifdef __cplusplus
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#pragma once
8+
#include <stdint.h>
9+
#include "sdkconfig.h"
10+
11+
#ifdef __cplusplus
12+
extern "C" {
13+
#endif
14+
15+
/**
16+
* @file sleep_gpio.h
17+
*
18+
* This file contains declarations of GPIO related functions in light sleep mode.
19+
*/
20+
21+
#if SOC_GPIO_SUPPORT_SLP_SWITCH && CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL
22+
23+
/**
24+
* @brief Save GPIO pull-up and pull-down configuration information in the wake-up state
25+
*
26+
* In light sleep mode, the pull-up and pull-down resistors of GPIO will cause
27+
* leakage current when the system sleeps. In order to reduce the power
28+
* consumption of system sleep, it needs to save the configuration information
29+
* of all GPIO pull-up and pull-down resistors and disable the pull-up and
30+
* pull-down resistors of GPIO before the system enters sleep.
31+
*/
32+
void gpio_sleep_mode_config_apply(void);
33+
34+
/**
35+
* @brief Restore GPIO pull-up and pull-down configuration information in the wake-up state
36+
*
37+
* In light sleep mode, after the system wakes up, it needs to restore all GPIO
38+
* pull-up and pull-down configurations before the last sleep.
39+
*/
40+
void gpio_sleep_mode_config_unapply(void);
41+
42+
#endif // SOC_GPIO_SUPPORT_SLP_SWITCH && CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL
43+
44+
#ifdef __cplusplus
45+
}
46+
#endif
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#pragma once
8+
#include <stdint.h>
9+
#include "sdkconfig.h"
10+
11+
#ifdef __cplusplus
12+
extern "C" {
13+
#endif
14+
15+
/**
16+
* @file sleep_mac_bb.h
17+
*
18+
* This file contains declarations of MAC and baseband power consumption related functions in light sleep mode.
19+
*/
20+
21+
#if CONFIG_MAC_BB_PD
22+
23+
/**
24+
* @brief A callback function completes MAC and baseband power down operation
25+
*
26+
* In light sleep mode, execute Wi-Fi and Bluetooth module MAC and baseband
27+
* power down and backup register configuration information operations.
28+
*/
29+
void mac_bb_power_down_cb_execute(void);
30+
31+
/**
32+
* @brief A callback function completes MAC and baseband power up operation
33+
*
34+
* In light sleep mode, execute Wi-Fi and Bluetooth module MAC and baseband
35+
* power up and restore register configuration information operations.
36+
*/
37+
void mac_bb_power_up_cb_execute(void);
38+
39+
#endif // CONFIG_MAC_BB_PD
40+
41+
#ifdef __cplusplus
42+
}
43+
#endif
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#pragma once
8+
#include <stdint.h>
9+
#include "sdkconfig.h"
10+
11+
#ifdef __cplusplus
12+
extern "C" {
13+
#endif
14+
15+
/**
16+
* @file sleep_retention.h
17+
*
18+
* This file contains declarations of memory retention related functions in light sleeo mode.
19+
*/
20+
21+
#if SOC_PM_SUPPORT_CPU_PD
22+
23+
/**
24+
* @brief Whether to allow the cpu power domain to be powered off.
25+
*
26+
* In light sleep mode, only when the system can provide enough memory
27+
* for cpu retention, the cpu power domain can be powered off.
28+
*/
29+
bool cpu_domain_pd_allowed(void);
30+
31+
#endif
32+
33+
#if SOC_PM_SUPPORT_CPU_PD || SOC_PM_SUPPORT_TAGMEM_PD
34+
35+
/**
36+
* @brief Enable memory retention of some modules.
37+
*
38+
* In light sleep mode, before the system goes to sleep, enable the memory
39+
* retention of modules such as CPU and I/D-cache tag memory.
40+
*/
41+
void sleep_enable_memory_retention(void);
42+
43+
/**
44+
* @brief Disable memory retention of some modules.
45+
*
46+
* In light sleep mode, after the system exits sleep, disable the memory
47+
* retention of moudles such as CPU and I/D-cache tag memory.
48+
*/
49+
void sleep_disable_memory_retention(void);
50+
51+
#endif // SOC_PM_SUPPORT_CPU_PD || SOC_PM_SUPPORT_TAGMEM_PD
52+
53+
#ifdef __cplusplus
54+
}
55+
#endif

tools/sdk/esp32/include/esp_hw_support/include/esp_sleep.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ typedef enum {
4141
ESP_PD_DOMAIN_RTC_SLOW_MEM, //!< RTC slow memory
4242
ESP_PD_DOMAIN_RTC_FAST_MEM, //!< RTC fast memory
4343
ESP_PD_DOMAIN_XTAL, //!< XTAL oscillator
44+
#if SOC_PM_SUPPORT_CPU_PD
4445
ESP_PD_DOMAIN_CPU, //!< CPU core
46+
#endif
4547
ESP_PD_DOMAIN_VDDSDIO, //!< VDD_SDIO
4648
ESP_PD_DOMAIN_MAX //!< Number of domains
4749
} esp_sleep_pd_domain_t;

tools/sdk/esp32/include/hal/esp32/include/hal/i2s_ll.h

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ typedef struct {
5050
uint16_t mclk_div; // I2S module clock devider, Fmclk = Fsclk /(mclk_div+b/a)
5151
uint16_t a;
5252
uint16_t b; // The decimal part of module clock devider, the decimal is: b/a
53-
} i2s_ll_clk_cal_t;
53+
} i2s_ll_mclk_div_t;
5454

5555
/**
5656
* @brief Enable DMA descriptor owner check
@@ -98,6 +98,18 @@ static inline void i2s_ll_enable_clock(i2s_dev_t *hw)
9898
}
9999
}
100100

101+
/**
102+
* @brief I2S module disable clock.
103+
*
104+
* @param hw Peripheral I2S hardware instance address.
105+
*/
106+
static inline void i2s_ll_disable_clock(i2s_dev_t *hw)
107+
{
108+
if (hw->clkm_conf.clk_en == 1) {
109+
hw->clkm_conf.clk_en = 0;
110+
}
111+
}
112+
101113
/**
102114
* @brief I2S tx msb right enable
103115
*
@@ -272,7 +284,7 @@ static inline void i2s_ll_tx_set_bck_div_num(i2s_dev_t *hw, uint32_t val)
272284
* @param hw Peripheral I2S hardware instance address.
273285
* @param set Pointer to I2S clock devider configuration paramater
274286
*/
275-
static inline void i2s_ll_tx_set_clk(i2s_dev_t *hw, i2s_ll_clk_cal_t *set)
287+
static inline void i2s_ll_tx_set_clk(i2s_dev_t *hw, i2s_ll_mclk_div_t *set)
276288
{
277289
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->clkm_conf, clkm_div_num, set->mclk_div);
278290
hw->clkm_conf.clkm_div_b = set->b;
@@ -296,7 +308,7 @@ static inline void i2s_ll_rx_set_bck_div_num(i2s_dev_t *hw, uint32_t val)
296308
* @param hw Peripheral I2S hardware instance address.
297309
* @param set Pointer to I2S clock devider configuration paramater
298310
*/
299-
static inline void i2s_ll_rx_set_clk(i2s_dev_t *hw, i2s_ll_clk_cal_t *set)
311+
static inline void i2s_ll_rx_set_clk(i2s_dev_t *hw, i2s_ll_mclk_div_t *set)
300312
{
301313
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->clkm_conf, clkm_div_num, set->mclk_div);
302314
hw->clkm_conf.clkm_div_b = set->b;
@@ -713,9 +725,9 @@ static inline void i2s_ll_rx_enable_mono_mode(i2s_dev_t *hw, bool mono_ena)
713725
* @brief Enable I2S loopback mode
714726
*
715727
* @param hw Peripheral I2S hardware instance address.
716-
* @param loopback_en Set true to enable loopback mode.
728+
* @param loopback_en Set true to share BCK and WS signal for tx module and rx module.
717729
*/
718-
static inline void i2s_ll_enable_loop_back(i2s_dev_t *hw, bool loopback_en)
730+
static inline void i2s_ll_share_bck_ws(i2s_dev_t *hw, bool loopback_en)
719731
{
720732
hw->conf.sig_loopback = loopback_en;
721733
}

0 commit comments

Comments
 (0)