From 32e090356190593cf3f479b49d49530bd7bf1f4c Mon Sep 17 00:00:00 2001 From: Daniel Miller Date: Sat, 31 Mar 2018 15:13:52 -0700 Subject: [PATCH 1/6] doc: Spelling Merges https://github.com/espressif/esp-idf/pull/1798 --- docs/en/get-started/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/get-started/index.rst b/docs/en/get-started/index.rst index 4c509cdf2..dffffb929 100644 --- a/docs/en/get-started/index.rst +++ b/docs/en/get-started/index.rst @@ -299,7 +299,7 @@ Updating ESP-IDF After some time of using ESP-IDF, you may want to update it to take advantage of new features or bug fixes. The simplest way to do so is by deleting existing ``esp-idf`` folder and cloning it again, exactly as when doing initial installation described in sections :ref:`get-started-get-esp-idf`. -Another solution is to update only what has changed. This method is useful if you have slow connection to the GiHub. To do the update run the following commands:: +Another solution is to update only what has changed. This method is useful if you have a slow connection to GitHub. To do the update run the following commands:: cd ~/esp/esp-idf git pull From 9acebb08fe42353378faaecee53668939e804cd7 Mon Sep 17 00:00:00 2001 From: Daniel Miller Date: Sat, 31 Mar 2018 20:24:41 -0700 Subject: [PATCH 2/6] doc: spelling Merges https://github.com/espressif/esp-idf/pull/1800 --- docs/en/api-reference/system/power_management.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/api-reference/system/power_management.rst b/docs/en/api-reference/system/power_management.rst index 581d42b00..28263477d 100644 --- a/docs/en/api-reference/system/power_management.rst +++ b/docs/en/api-reference/system/power_management.rst @@ -31,7 +31,7 @@ Power Management Locks As mentioned in the overview, applications can acquire/release locks to control the power management algorithm. When application takes a lock, power management algorithm operation is restricted in a way described below, for each lock. When the lock is released, such restriction is removed. -Different parts of the application can take the same lock. In this case, lock mush be released the same number of times as it was acquired, in order for power managment algorithm to resume. +Different parts of the application can take the same lock. In this case, the lock must be released the same number of times as it was acquired, in order for power managment algorithm to resume. In ESP32, three types of locks are supported: From 97c6a94a030adf29fc0a80d3b84082bf32d38b92 Mon Sep 17 00:00:00 2001 From: Fredrik Date: Sat, 31 Mar 2018 16:41:03 +0200 Subject: [PATCH 3/6] Bugfix GPIO_DIS_OUTPUT to work with pin 32 and up Merges https://github.com/espressif/esp-idf/pull/1796 --- components/esp32/include/rom/gpio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esp32/include/rom/gpio.h b/components/esp32/include/rom/gpio.h index bd1777c60..2ce7aef6e 100644 --- a/components/esp32/include/rom/gpio.h +++ b/components/esp32/include/rom/gpio.h @@ -57,8 +57,8 @@ typedef enum { #define GPIO_OUTPUT_SET(gpio_no, bit_value) \ ((gpio_no < 32) ? gpio_output_set(bit_value<>gpio_no)&BIT0) : ((gpio_input_get_high()>>(gpio_no - 32))&BIT0)) +#define GPIO_DIS_OUTPUT(gpio_no) ((gpio_no < 32) ? gpio_output_set(0,0,0, 1<>gpio_no)&BIT0) : ((gpio_input_get_high()>>(gpio_no - 32))&BIT0)) /* GPIO interrupt handler, registered through gpio_intr_handler_register */ typedef void (* gpio_intr_handler_fn_t)(uint32_t intr_mask, bool high, void *arg); From 9f39411e80bb1b2e331b25b382ebe55561bccf87 Mon Sep 17 00:00:00 2001 From: Mixerito Date: Thu, 22 Mar 2018 12:55:52 +0100 Subject: [PATCH 4/6] esp32: get_chip_info_esp32() return correct model number out_info->model was zeroed by memset Merges https://github.com/espressif/esp-idf/pull/1760 --- components/esp32/system_api.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/esp32/system_api.c b/components/esp32/system_api.c index 0c267c6c3..9b242c789 100644 --- a/components/esp32/system_api.c +++ b/components/esp32/system_api.c @@ -379,9 +379,10 @@ const char* esp_get_idf_version(void) static void get_chip_info_esp32(esp_chip_info_t* out_info) { - out_info->model = CHIP_ESP32; uint32_t reg = REG_READ(EFUSE_BLK0_RDATA3_REG); memset(out_info, 0, sizeof(*out_info)); + + out_info->model = CHIP_ESP32; if ((reg & EFUSE_RD_CHIP_VER_REV1_M) != 0) { out_info->revision = 1; } From 3d89c8ba749db2643040ffac9291ef96dbedda5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ing=2E=20Jaroslav=20=C5=A0afka?= Date: Fri, 2 Mar 2018 22:56:41 +0100 Subject: [PATCH 5/6] rmt: Fix LoadProhibited on RX END Fixes exceptions LoadProhibited, when rmt tries read variable p_rmt on RX END which can be 0. It happens after esp_reset() (OTA) and the rmt is not probably stopped by it. In other words the routine rmt_driver_isr_default was called before second rx channel was registered. scenario: register tx channel register rx channel reboot register tx channel -> exception (because rx channel is accessed) Merges https://github.com/espressif/esp-idf/pull/1671 --- components/driver/rmt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/driver/rmt.c b/components/driver/rmt.c index 8e7b2a1d0..046b634ca 100644 --- a/components/driver/rmt.c +++ b/components/driver/rmt.c @@ -540,6 +540,10 @@ static void IRAM_ATTR rmt_driver_isr_default(void* arg) if(intr_st & BIT(i)) { channel = i / 3; rmt_obj_t* p_rmt = p_rmt_obj[channel]; + if(NULL == p_rmt) { + RMT.int_clr.val = BIT(i); + continue; + } switch(i % 3) { //TX END case 0: From 046ff2e628d1628533b16d36d8c2564bf2004778 Mon Sep 17 00:00:00 2001 From: Anton Maklakov Date: Mon, 6 Nov 2017 18:22:45 +0800 Subject: [PATCH 6/6] Make error codes looks like literals in the code of them (easy for searching). Minor fixes, typos --- components/bt/bt.c | 2 +- components/esp32/event_default_handlers.c | 2 +- components/esp32/include/rom/uart.h | 5 ++--- components/heap/include/esp_heap_caps.h | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/components/bt/bt.c b/components/bt/bt.c index 0d848e214..0a69d40b4 100644 --- a/components/bt/bt.c +++ b/components/bt/bt.c @@ -85,7 +85,7 @@ extern uint32_t _data_end_btdm_rom; do{\ esp_err_t __err = (api_call);\ if ((ret) != __err) {\ - BT_DEBUG("%s %d %s ret=%d\n", __FUNCTION__, __LINE__, (info), __err);\ + BT_DEBUG("%s %d %s ret=0x%X\n", __FUNCTION__, __LINE__, (info), __err);\ return __err;\ }\ } while(0) diff --git a/components/esp32/event_default_handlers.c b/components/esp32/event_default_handlers.c index 6b127e609..7de0cbb74 100644 --- a/components/esp32/event_default_handlers.c +++ b/components/esp32/event_default_handlers.c @@ -41,7 +41,7 @@ static const char* TAG = "event"; do{\ esp_err_t __err = (api_call);\ if ((ret) != __err) {\ - ESP_LOGE(TAG, "%s %d %s ret=%d", __FUNCTION__, __LINE__, (info), __err);\ + ESP_LOGE(TAG, "%s %d %s ret=0x%X", __FUNCTION__, __LINE__, (info), __err);\ return __err;\ }\ } while(0) diff --git a/components/esp32/include/rom/uart.h b/components/esp32/include/rom/uart.h index 8f075392c..0a3e1aeb6 100644 --- a/components/esp32/include/rom/uart.h +++ b/components/esp32/include/rom/uart.h @@ -128,7 +128,6 @@ typedef enum { } RcvMsgBuffState; typedef struct { -// uint32_t RcvBuffSize; uint8_t *pRcvMsgBuff; uint8_t *pWritePos; uint8_t *pReadPos; @@ -248,7 +247,7 @@ STATUS uart_tx_one_char(uint8_t TxChar); * * @return OK. */ -STATUS uart_tx_one_char2(uint8_t TxChar);//for send message +STATUS uart_tx_one_char2(uint8_t TxChar); /** * @brief Wait until uart tx full empty. @@ -285,7 +284,7 @@ static inline void IRAM_ATTR uart_tx_wait_idle(uint8_t uart_no) { STATUS uart_rx_one_char(uint8_t *pRxChar); /** - * @brief Get an input char to message channel, wait until successful. + * @brief Get an input char from message channel, wait until successful. * Please do not call this function in SDK. * * @param None diff --git a/components/heap/include/esp_heap_caps.h b/components/heap/include/esp_heap_caps.h index c9a983dba..5a7aa6bc2 100644 --- a/components/heap/include/esp_heap_caps.h +++ b/components/heap/include/esp_heap_caps.h @@ -67,7 +67,7 @@ void *heap_caps_malloc(size_t size, uint32_t caps); void heap_caps_free( void *ptr); /** - * @brief Reallocate memory previously allocated via heap_caps_malloc() or heaps_caps_realloc(). + * @brief Reallocate memory previously allocated via heap_caps_malloc() or heap_caps_realloc(). * * Equivalent semantics to libc realloc(), for capability-aware memory. * @@ -90,7 +90,7 @@ void *heap_caps_realloc( void *ptr, size_t size, int caps); * * Equivalent semantics to libc calloc(), for capability-aware memory. * - * In IDF, ``calloc(p)`` is equivalent to ``heaps_caps_calloc(p, MALLOC_CAP_8BIT)``. + * In IDF, ``calloc(p)`` is equivalent to ``heap_caps_calloc(p, MALLOC_CAP_8BIT)``. * * @param n Number of continuing chunks of memory to allocate * @param size Size, in bytes, of a chunk of memory to allocate