Skip to content

Commit 4765554

Browse files
committed
Update IDF to 1e0710f
1 parent 4b47402 commit 4765554

Some content is hidden

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

60 files changed

+4819
-149
lines changed

tools/sdk/bin/bootloader.bin

-3.11 KB
Binary file not shown.

tools/sdk/include/config/sdkconfig.h

+4-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#define CONFIG_PHY_ENABLED 1
1010
#define CONFIG_TRACEMEM_RESERVE_DRAM 0x0
1111
#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 16
12-
#define CONFIG_FOUR_MAC_ADDRESS_FROM_EFUSE 1
1312
#define CONFIG_SW_COEXIST_ENABLE 1
1413
#define CONFIG_ESPTOOLPY_FLASHSIZE_4MB 1
1514
#define CONFIG_ESPTOOLPY_FLASHFREQ "80m"
@@ -24,7 +23,6 @@
2423
#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1
2524
#define CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM 10
2625
#define CONFIG_BT_RESERVE_DRAM 0x10000
27-
#define CONFIG_LOG_BOOTLOADER_LEVEL_ERROR 1
2826
#define CONFIG_CONSOLE_UART_BAUDRATE 115200
2927
#define CONFIG_LWIP_MAX_SOCKETS 10
3028
#define CONFIG_EMAC_TASK_PRIORITY 20
@@ -40,8 +38,10 @@
4038
#define CONFIG_CONSOLE_UART_NUM 0
4139
#define CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC 1
4240
#define CONFIG_LWIP_THREAD_LOCAL_STORAGE_INDEX 0
41+
#define CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS 1
4342
#define CONFIG_CONSOLE_UART_DEFAULT 1
4443
#define CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN 16384
44+
#define CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS 4
4545
#define CONFIG_ESPTOOLPY_FLASHSIZE_DETECT 1
4646
#define CONFIG_AUTOSTART_ARDUINO 1
4747
#define CONFIG_LOG_DEFAULT_LEVEL_ERROR 1
@@ -73,10 +73,8 @@
7373
#define CONFIG_PARTITION_TABLE_FILENAME "partitions_singleapp.csv"
7474
#define CONFIG_LWIP_DHCP_MAX_NTP_SERVERS 1
7575
#define CONFIG_PARTITION_TABLE_SINGLE_APP 1
76-
#define CONFIG_NUMBER_OF_MAC_ADDRESS_GENERATED_FROM_EFUSE 4
7776
#define CONFIG_WIFI_ENABLED 1
7877
#define CONFIG_FLASHMODE_QIO 1
79-
#define CONFIG_BASE_MAC_STORED_DEFAULT_EFUSE 1
8078
#define CONFIG_ESPTOOLPY_FLASHFREQ_80M 1
8179
#define CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE 2048
8280
#define CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY 2000
@@ -90,11 +88,12 @@
9088
#define CONFIG_FREERTOS_ASSERT_FAIL_ABORT 1
9189
#define CONFIG_ESP32_XTAL_FREQ 0
9290
#define CONFIG_MONITOR_BAUD_115200B 1
93-
#define CONFIG_LOG_BOOTLOADER_LEVEL 1
91+
#define CONFIG_LOG_BOOTLOADER_LEVEL 0
9492
#define CONFIG_SMP_ENABLE 1
9593
#define CONFIG_ESPTOOLPY_BEFORE_RESET 1
9694
#define CONFIG_ESPTOOLPY_BAUD_OTHER_VAL 115200
9795
#define CONFIG_ENABLE_ARDUINO_DEPENDS 1
96+
#define CONFIG_LOG_BOOTLOADER_LEVEL_NONE 1
9897
#define CONFIG_ESP32_DEFAULT_CPU_FREQ_240 1
9998
#define CONFIG_ESP32_XTAL_FREQ_AUTO 1
10099
#define CONFIG_TCP_MAXRTX 12

tools/sdk/include/driver/driver/dac.h

+48-3
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,31 @@ typedef enum {
2828
DAC_CHANNEL_MAX,
2929
} dac_channel_t;
3030

31+
32+
/**
33+
* @brief Set DAC output voltage.
34+
*
35+
* @note Function has been deprecated, please use dac_output_voltage instead.
36+
* This name will be removed in a future release.
37+
* The difference is that before calling dac_output_voltage, we need to initialize the dac pad by dac_output_enable
38+
*
39+
*
40+
* @param channel DAC channel
41+
* @param dac_value DAC output value
42+
*
43+
* @return
44+
* - ESP_OK success
45+
* - ESP_ERR_INVALID_ARG Parameter error
46+
*/
47+
esp_err_t dac_out_voltage(dac_channel_t channel, uint8_t dac_value) __attribute__ ((deprecated));
48+
3149
/**
3250
* @brief Set DAC output voltage.
3351
*
3452
* DAC output is 8-bit. Maximum (255) corresponds to VDD.
3553
*
36-
* @note When this function is called, function for the DAC
37-
* channel's GPIO pin is reconfigured for RTC DAC function.
54+
* @note Need to configure DAC pad before calling this function.
55+
* DAC channel 1 is attached to GPIO25, DAC channel 2 is attached to GPIO26
3856
*
3957
* @param channel DAC channel
4058
* @param dac_value DAC output value
@@ -43,8 +61,35 @@ typedef enum {
4361
* - ESP_OK success
4462
* - ESP_ERR_INVALID_ARG Parameter error
4563
*/
46-
esp_err_t dac_out_voltage(dac_channel_t channel, uint8_t dac_value);
64+
esp_err_t dac_output_voltage(dac_channel_t channel, uint8_t dac_value);
65+
66+
/**
67+
* @brief DAC pad output enable
68+
*
69+
* @param channel DAC channel
70+
* @note DAC channel 1 is attached to GPIO25, DAC channel 2 is attached to GPIO26
71+
* I2S left channel will be mapped to DAC channel 2
72+
* I2S right channel will be mapped to DAC channel 1
73+
*/
74+
esp_err_t dac_output_enable(dac_channel_t channel);
75+
76+
/**
77+
* @brief DAC pad output disable
78+
*
79+
* @param channel DAC channel
80+
* @note DAC channel 1 is attached to GPIO25, DAC channel 2 is attached to GPIO26
81+
*/
82+
esp_err_t dac_output_disable(dac_channel_t channel);
4783

84+
/**
85+
* @brief Enable DAC output data from I2S
86+
*/
87+
esp_err_t dac_i2s_enable();
88+
89+
/**
90+
* @brief Disable DAC output data from I2S
91+
*/
92+
esp_err_t dac_i2s_disable();
4893
#ifdef __cplusplus
4994
}
5095
#endif

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

+37-1
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,17 @@ typedef enum {
109109
/**
110110
* @brief I2S Mode, defaut is I2S_MODE_MASTER | I2S_MODE_TX
111111
*
112+
* @note PDM and built-in DAC functions are only supported on I2S0 for current ESP32 chip.
113+
*
112114
*/
113115
typedef enum {
114116
I2S_MODE_MASTER = 1,
115117
I2S_MODE_SLAVE = 2,
116118
I2S_MODE_TX = 4,
117119
I2S_MODE_RX = 8,
118-
I2S_MODE_DAC_BUILT_IN = 16
120+
I2S_MODE_DAC_BUILT_IN = 16, /*!< Output I2S data to built-in DAC, no matter the data format is 16bit or 32 bit, the DAC module will only take the 8bits from MSB*/
121+
//I2S_MODE_ADC_BUILT_IN = 32, /*!< Currently not supported yet, will be added for the next version*/
122+
I2S_MODE_PDM = 64,
119123
} i2s_mode_t;
120124

121125
/**
@@ -144,6 +148,19 @@ typedef enum {
144148
I2S_EVENT_MAX, /*!< I2S event max index*/
145149
} i2s_event_type_t;
146150

151+
/**
152+
* @brief I2S DAC mode for i2s_set_dac_mode.
153+
*
154+
* @note PDM and built-in DAC functions are only supported on I2S0 for current ESP32 chip.
155+
*/
156+
typedef enum {
157+
I2S_DAC_CHANNEL_DISABLE = 0, /*!< Disable I2S built-in DAC signals*/
158+
I2S_DAC_CHANNEL_RIGHT_EN = 1, /*!< Enable I2S built-in DAC right channel, maps to DAC channel 1 on GPIO25*/
159+
I2S_DAC_CHANNEL_LEFT_EN = 2, /*!< Enable I2S built-in DAC left channel, maps to DAC channel 2 on GPIO26*/
160+
I2S_DAC_CHANNEL_BOTH_EN = 0x3, /*!< Enable both of the I2S built-in DAC channels.*/
161+
I2S_DAC_CHANNEL_MAX = 0x4, /*!< I2S built-in DAC mode max index*/
162+
} i2s_dac_mode_t;
163+
147164
/**
148165
* @brief Event structure used in I2S event queue
149166
*
@@ -166,6 +183,7 @@ typedef struct {
166183
int data_in_num; /*!< DATA in pin*/
167184
} i2s_pin_config_t;
168185

186+
169187
typedef intr_handle_t i2s_isr_handle_t;
170188
/**
171189
* @brief Set I2S pin number
@@ -181,12 +199,30 @@ typedef intr_handle_t i2s_isr_handle_t;
181199
* Inside the pin configuration structure, set I2S_PIN_NO_CHANGE for any pin where
182200
* the current configuration should not be changed.
183201
*
202+
* @note if *pin is set as NULL, this function will initialize both of the built-in DAC channels by default.
203+
* if you don't want this to happen and you want to initialize only one of the DAC channels, you can call i2s_set_dac_mode instead.
204+
*
184205
* @return
185206
* - ESP_OK Success
186207
* - ESP_FAIL Parameter error
187208
*/
188209
esp_err_t i2s_set_pin(i2s_port_t i2s_num, const i2s_pin_config_t *pin);
189210

211+
/**
212+
* @brief Set I2S dac mode, I2S built-in DAC is disabled by default
213+
*
214+
* @param dac_mode DAC mode configurations - see i2s_dac_mode_t
215+
*
216+
* @note Built-in DAC functions are only supported on I2S0 for current ESP32 chip.
217+
* If either of the built-in DAC channel are enabled, the other one can not
218+
* be used as RTC DAC function at the same time.
219+
*
220+
* @return
221+
* - ESP_OK Success
222+
* - ESP_ERR_INVALID_ARG Parameter error
223+
*/
224+
esp_err_t i2s_set_dac_mode(i2s_dac_mode_t dac_mode);
225+
190226
/**
191227
* @brief Install and start I2S driver.
192228
*

0 commit comments

Comments
 (0)