8000 update idf libs · solutionitNew/arduino-esp32@58ac6fb · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 58ac6fb

Browse files
committed
update idf libs
1 parent 1252f7f commit 58ac6fb

Some content is hidden

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

72 files changed

+4173
-714
lines changed

platform.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ compiler.warning_flags.all=-Wall -Wextra
1313

1414
compiler.path={runtime.tools.xtensa-esp32-elf-gcc.path}/bin/
1515
compiler.sdk.path={runtime.platform.path}/tools/sdk
16-
compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE='"mbedtls/esp_config.h"' -DHAVE_CONFIG_H "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/bt" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/vfs" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/xtensa-debug-module" "-I{compiler.sdk.path}/include/wpa_supplicant" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/lwip"
16+
compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE='"mbedtls/esp_config.h"' -DHAVE_CONFIG_H "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/bt" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/vfs" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/openssl" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/xtensa-debug-module" "-I{compiler.sdk.path}/include/wpa_supplicant" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/lwip"
1717

1818
compiler.c.cmd=xtensa-esp32-elf-gcc
1919
compiler.c.flags=-c {compiler.warning_flags} -Os -g3 -Wpointer-arith -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -ffunction-sections -fdata-sections -mlongcalls -nostdlib -MMD -std=gnu99 -fstrict-volatile-bitfields
@@ -26,7 +26,7 @@ compiler.S.flags=-c -g3 -x assembler-with-cpp -MMD -mlongcalls
2626

2727
compiler.c.elf.cmd=xtensa-esp32-elf-gcc
2828
compiler.c.elf.flags="-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" -nostdlib -T esp32_out.ld -T esp32.common.ld -T esp32.rom.ld -T esp32.peripherals.ld -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority
29-
compiler.c.elf.libs=-lbt -lbtdm_app -lc -lcoexist -lcore -ldriver -lesp32 -lexpat -lfreertos -lg -lhal -ljson -llog -llwip -lm -lmbedtls -lnet80211 -lnewlib -lnghttp -lnvs_flash -lopenssl -lphy -lpp -lrtc -lsmartconfig -lspi_flash -ltcpip_adapter -lvfs -lwpa -lwpa_supplicant -lxtensa-debug-module
29+
compiler.c.elf.libs=-lbt -lbtdm_app -lc -lcoexist -lcore -ldriver -lesp32 -lexpat -lfreertos -lg -lhal -ljson -llog -llwi 10000 p -lm -lmbedtls -lnet80211 -lnewlib -lnghttp -lnvs_flash -lopenssl -lphy -lpp -lrtc -lsmartconfig -lspi_flash -ltcpip_adapter -lvfs -lwpa -lwpa_supplicant -lwps -lxtensa-debug-module
3030

3131
compiler.as.cmd=xtensa-esp32-elf-as
3232

@@ -94,4 +94,4 @@ tools.esptool.network_cmd.windows=python.exe
9494
tools.esptool.upload.protocol=esp32
9595
tools.esptool.upload.params.verbose=
9696
tools.esptool.upload.params.quiet=
97-
tools.esptool.upload.pattern="{cmd}" "{path}" --chip esp32 --port "{serial.port}" --baud {upload.speed} write_flash -z --flash_freq {build.flash_freq} --flash_mode {build.flash_mode} 0x1000 "{runtime.platform.path}/tools/sdk/bin/bootloader.bin" 0x4000 "{runtime.platform.path}/tools/sdk/bin/partitions_singleapp.bin" 0x10000 "{build.path}/{build.project_name}.bin"
97+
tools.esptool.upload.pattern="{cmd}" "{path}" --chip esp32 --port "{serial.port}" --baud {upload.speed} write_flash -z --flash_freq {build.flash_freq} --flash_mode {build.flash_mode} 0x1000 "{runtime.platform.path}/tools/sdk/bin/bootloader.bin" 0x8000 "{runtime.platform.path}/tools/sdk/bin/partitions_singleapp.bin" 0x10000 "{build.path}/{build.project_name}.bin"

tools/esptool.py

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

tools/sdk/bin/bootloader.bin

1.09 KB
Binary file not shown.
2.91 KB
Binary file not shown.

tools/sdk/include/bt/bt.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,10 @@ void bt_controller_init(void);
3232

3333
/** @brief vhci_host_callback
3434
* used for vhci call host function to notify what host need to do
35-
*
36-
* notify_host_send_available: notify host can send packet to controller
37-
* notify_host_recv: notify host that controller has packet send to host
3835
*/
3936
typedef struct vhci_host_callback {
40-
void (*notify_host_send_available)(void);
41-
int (*notify_host_recv)(uint8_t *data, uint16_t len);
37+
void (*notify_host_send_available)(void); /*!< callback used to notify that the host can send packet to controller */
38+
int (*notify_host_recv)(uint8_t *data, uint16_t len); /*!< callback used to notify that the controller has a packet to send to the host*/
4239
} vhci_host_callback_t;
4340

4441
/** @brief API_vhci_host_check_send_available

tools/sdk/include/config/sdkconfig.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77
#define CONFIG_TRACEMEM_RESERVE_DRAM 0x0
88
#define CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE 1
9+
#define CONFIG_SECURE_BOOTLOADER_DISABLED 1
910
#define CONFIG_ESPTOOLPY_FLASHSIZE_4MB 1
1011
#define CONFIG_ESPTOOLPY_FLASHFREQ "80m"
1112
#define CONFIG_NEWLIB_STDOUT_ADDCR 1
@@ -22,6 +23,7 @@
2223
#define CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC 1
2324
#define CONFIG_LWIP_THREAD_LOCAL_STORAGE_INDEX 0
2425
#define CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN 16384
26+
#define CONFIG_AUTOSTART_ARDUINO 1
2527
#define CONFIG_ESP32_ENABLE_STACK_WIFI 1
2628
#define CONFIG_LOG_DEFAULT_LEVEL_ERROR 1
2729
#define CONFIG_MAIN_TASK_STACK_SIZE 4096
@@ -41,9 +43,11 @@
4143
#define CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ 160
4244
#define CONFIG_FREERTOS_HZ 1000
4345
#define CONFIG_FREERTOS_ASSERT_FAIL_ABORT 1
46+
#define CONFIG_MONITOR_BAUD_115200B 1
4447
#define CONFIG_LOG_BOOTLOADER_LEVEL 1
4548
#define CONFIG_ESPTOOLPY_BAUD_OTHER_VAL 115200
4649
#define CONFIG_LWIP_SO_REUSE 1
50+
#define CONFIG_MONITOR_BAUD 115200
4751
#define CONFIG_FREERTOS_CORETIMER_0 1
4852
#define CONFIG_PARTITION_TABLE_CUSTOM_FILENAME "partitions.csv"
4953
#define CONFIG_FREERTOS_ISR_STACKSIZE 1536
@@ -52,6 +56,7 @@
5256
#define CONFIG_ESPTOOLPY_BAUD_921600B 1
5357
#define CONFIG_APP_OFFSET 0x10000
5458
#define CONFIG_MEMMAP_SMP 1
59+
#define CONFIG_MONITOR_BAUD_OTHER_VAL 115200
5560
#define CONFIG_ESPTOOLPY_PORT "/dev/tty.SLAB_USBtoUART"
5661
#define CONFIG_ESP32_PANIC_PRINT_HALT 1
5762
#define CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_ERROR 1

tools/sdk/include/driver/driver/gpio.h

Lines changed: 84 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,32 @@ extern const uint32_t GPIO_PIN_MUX_REG[GPIO_PIN_COUNT];
117117
#define GPIO_IS_VALID_GPIO(gpio_num) ((gpio_num < GPIO_PIN_COUNT && GPIO_PIN_MUX_REG[gpio_num] != 0)) //to decide whether it is a valid GPIO number
118118
#define GPIO_IS_VALID_OUTPUT_GPIO(gpio_num) ((GPIO_IS_VALID_GPIO(gpio_num)) && (gpio_num < 34)) //to decide whether it can be a valid GPIO number of output mode
119119

120+
/**
121+
* @brief Pullup/pulldown information for a single GPIO pad
122+
*/
123+
typedef struct {
124+
uint32_t reg; /*!< Register to modify to enable or disable pullups or pulldowns */
125+
uint32_t pu; /*!< Bit to set or clear in the above register to enable or disable the pullup, respectively */
126+
uint32_t pd; /*!< Bit to set or clear in the above register to enable or disable the pulldown, respectively */
127+
} gpio_pu_pd_desc_t;
128+
129+
130+
/**
131+
* Per-GPIO pullup/pulldown information
132+
* On the ESP32, some GPIOs need their pullups and pulldowns enabled and disabled in the RTC
133+
* peripheral instead of in the GPIO peripheral. This array documents for every GPIO what bit
134+
* to set or clear.
135+
*
136+
* This array is non-static, so if you need a very quick way of toggling the pull-up/downs, you can just
137+
* do e.g. REG_SET_BIT(gpio_pu_pd_desc[gpio_num].reg, gpio_pu_pd_desc[gpio_num].pu); inline.
138+
*
139+
* ToDo: Functions using the contents of this array will do a read/modify/write on GPIO as well as RTC
140+
* registers. We may need to look into muxes/locks for other code that accesses these RTC registers when we
141+
* write drivers for the RTC stuff.
142+
*/
143+
extern const gpio_pu_pd_desc_t gpio_pu_pd_desc[GPIO_PIN_COUNT];
144+
145+
120146
typedef enum {
121147
GPIO_NUM_0 = 0, /*!< GPIO0, input and output */
122148
GPIO_NUM_1 = 1, /*!< GPIO1, input and output */
@@ -185,6 +211,9 @@ typedef enum {
185211
GPIO_PULLDOWN_ENABLE = 0x1, /*!< Enable GPIO pull-down resistor */
186212
} gpio_pulldown_t;
187213

214+
/**
215+
* @brief Configuration parameters of GPIO pad for gpio_config function
216+
*/
188217
typedef struct {
189218
uint64_t pin_bit_mask; /*!< GPIO pin: set with bit mask, each bit maps to a GPIO */
190219
gpio_mode_t mode; /*!< GPIO mode: set input/output mode */
@@ -220,7 +249,7 @@ esp_err_t gpio_config(gpio_config_t *pGPIOConfig);
220249
/**
221250
* @brief GPIO set interrupt trigger type
222251
*
223-
* @param gpio_num GPIO number. If you want to set output level of GPIO16, gpio_num should be GPIO_NUM_16 (16);
252+
* @param gpio_num GPIO number. If you want to set the trigger type of e.g. of GPIO16, gpio_num should be GPIO_NUM_16 (16);
224253
* @param intr_type Interrupt type, select from gpio_int_type_t
225254
*
226255
* @return
@@ -233,7 +262,7 @@ esp_err_t gpio_set_intr_type(gpio_num_t gpio_num, gpio_int_type_t intr_type);
233262
/**
234263
* @brief Enable GPIO module interrupt signal
235264
*
236-
* @param gpio_num GPIO number. If you want to set output level of GPIO16, gpio_num should be GPIO_NUM_16 (16);
265+
* @param gpio_num GPIO number. If you want to enable an interrupt on e.g. GPIO16, gpio_num should be GPIO_NUM_16 (16);
237266
*
238267
* @return
239268
* - ESP_OK Success
@@ -245,7 +274,7 @@ esp_err_t gpio_intr_enable(gpio_num_t gpio_num);
245274
/**
246275
* @brief Disable GPIO module interrupt signal
247276
*
248-
* @param gpio_num GPIO number. If you want to set output level of GPIO16, gpio_num should be GPIO_NUM_16 (16);
277+
* @param gpio_num GPIO number. If you want to disable the interrupt of e.g. GPIO16, gpio_num should be GPIO_NUM_16 (16);
249278
*
250279
* @return
251280
* - ESP_OK success
@@ -257,7 +286,7 @@ esp_err_t gpio_intr_disable(gpio_num_t gpio_num);
257286
/**
258287
* @brief GPIO set output level
259288
*
260-
* @param gpio_num GPIO number. If you want to set output level of GPIO16, gpio_num should be GPIO_NUM_16 (16);
289+
* @param gpio_num GPIO number. If you want to set the output level of e.g. GPIO16, gpio_num should be GPIO_NUM_16 (16);
261290
* @param level Output level. 0: low ; 1: high
262291
*
263292
* @return
@@ -270,7 +299,7 @@ esp_err_t gpio_set_level(gpio_num_t gpio_num, uint32_t level);
270299
/**
271300
* @brief GPIO get input level
272301
*
273-
* @param gpio_num GPIO number. If you want to get level of pin GPIO16, gpio_num should be GPIO_NUM_16 (16);
302+
* @param gpio_num GPIO number. If you want to get the logic level of e.g. pin GPIO16, gpio_num should be GPIO_NUM_16 (16);
274303
*
275304
* @return
276305
* - 0 the GPIO input level is 0
@@ -284,7 +313,7 @@ int gpio_get_level(gpio_num_t gpio_num);
284313
*
285314
* Configure GPIO direction,such as output_only,input_only,output_and_input
286315
*
287-
* @param gpio_num Configure GPIO pins number, it should be GPIO number. If you want to set direction of GPIO16, gpio_num should be GPIO_NUM_16 (16);
316+
* @param gpio_num Configure GPIO pins number, it should be GPIO number. If you want to set direction of e.g. GPIO16, gpio_num should be GPIO_NUM_16 (16);
288317
* @param mode GPIO direction
289318
*
290319
* @return
@@ -299,7 +328,7 @@ esp_err_t gpio_set_direction(gpio_num_t gpio_num, gpio_mode_t mode);
299328
*
300329
* User this Function,configure GPIO pull mode,such as pull-up,pull-down
301330
*
302-
* @param gpio_num GPIO number. If you want to set pull up or down mode for GPIO16,gpio_num should be GPIO_NUM_16 (16);
331+
* @param gpio_num GPIO number. If you want to set pull up or down mode for e.g. GPIO16, gpio_num should be GPIO_NUM_16 (16);
303332
* @param pull GPIO pull up/down mode.
304333
*
305334
* @return
@@ -314,7 +343,7 @@ esp_err_t gpio_set_pull_mode(gpio_num_t gpio_num, gpio_pull_mode_t pull);
314343
*
315344
* @param gpio_num GPIO number.
316345
*
317-
* @param intr_type GPIO wake-up type. Only GPIO_INTR_LOW_LEVEL\GPIO_INTR_HIGH_LEVEL can be used.
346+
* @param intr_type GPIO wake-up type. Only GPIO_INTR_LOW_LEVEL or GPIO_INTR_HIGH_LEVEL can be used.
318347
*
319348
* @return
320349
* - ESP_OK Success
@@ -354,6 +383,53 @@ esp_err_t gpio_wakeup_disable(gpio_num_t gpio_num);
354383
*/
355384
esp_err_t gpio_isr_register(uint32_t gpio_intr_num, void (*fn)(void*), void * arg);
356385

386+
387+
388+
/**
389+
* @brief Enable pull-up on GPIO.
390+
*
391+
* @param gpio_num GPIO number
392+
*
393+
* @return
394+
* - ESP_OK Success
395+
* - ESP_ERR_INVALID_ARG Parameter error
396+
*/
397+
esp_err_t gpio_pullup_en(gpio_num_t gpio_num);
398+
399+
/**
400+
* @brief Disable pull-up on GPIO.
401+
*
402+
* @param gpio_num GPIO number
403+
*
404+
* @return
405+
* - ESP_OK Success
406+
* - ESP_ERR_INVALID_ARG Parameter error
407+
*/
408+
esp_err_t gpio_pullup_dis(gpio_num_t gpio_num);
409+
410+
/**
411+
* @brief Enable pull-down on GPIO.
412+
*
413+
* @param gpio_num GPIO number
414+
*
415+
* @return
416+
* - ESP_OK Success
417+
* - ESP_ERR_INVALID_ARG Parameter error
418+
*/
419+
esp_err_t gpio_pulldown_en(gpio_num_t gpio_num);
420+
421+
/**
422+
* @brief Disable pull-down on GPIO.
423+
*
424+
* @param gpio_num GPIO number
425+
*
426+
* @return
427+
* - ESP_OK Success
428+
* - ESP_ERR_INVALID_ARG Parameter error
429+
*/
430+
esp_err_t gpio_pulldown_dis(gpio_num_t gpio_num);
431+
432+
357433
/**
358434
* *************** ATTENTION ********************/
359435
/**

tools/sdk/include/driver/driver/ledc.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ typedef enum {
7878
LEDC_TIMER_15_BIT = 15, /*!< LEDC PWM depth 15Bit */
7979
} ledc_timer_bit_t;
8080

81+
/**
82+
* @brief Configuration parameters of LEDC channel for ledc_channel_config function
83+
*/
8184
typedef struct {
8285
int gpio_num; /*!< the LEDC output gpio_num, if you want to use gpio16, gpio_num = 16*/
8386
ledc_mode_t speed_mode; /*!< LEDC speed speed_mode, high-speed mode or low-speed mode*/
@@ -87,6 +90,9 @@ typedef struct {
8790
uint32_t duty; /*!< LEDC channel duty, the duty range is [0, (2**bit_num) - 1], */
8891
} ledc_channel_config_t;
8992

93+
/**
94+
* @brief Configuration parameters of LEDC Timer timer for ledc_timer_config function
95+
*/
9096
typedef struct {
9197
ledc_mode_t speed_mode; /*!< LEDC speed speed_mode, high-speed mode or low-speed mode*/
9298
ledc_timer_bit_t bit_num; /*!< LEDC channel duty depth*/
@@ -150,6 +156,8 @@ esp_err_t ledc_update_duty(ledc_mode_t speed_mode, ledc_channel_t channel);
150156
*
151157
* @param channel LEDC channel(0-7), select from ledc_channel_t
152158
*
159+
* @param idle_level Set output idle level after LEDC stops.
160+
*
153161
* @return
154162
* - ESP_OK Success
155163
* - ESP_ERR_INVALID_ARG Parameter error

0 commit comments

Comments
 (0)
0