Merge branch 'bugfix/minor_prs_github' into 'master'
Minor bugfixes and corrections from github See merge request !1181
This commit is contained in:
commit
96f9ae3e30
17
README.md
17
README.md
|
@ -1,6 +1,6 @@
|
||||||
# Espressif IoT Development Framework
|
# Espressif IoT Development Framework
|
||||||
|
|
||||||
[![alt text](https://readthedocs.org/projects/docs/badge/?version=latest "Documentation Status")](http://esp-idf.readthedocs.io/en/latest/?badge=latest)
|
[![alt text](https://readthedocs.org/projects/docs/badge/?version=latest "Documentation Status")](https://esp-idf.readthedocs.io/en/latest/?badge=latest)
|
||||||
|
|
||||||
ESP-IDF is the official development framework for the [ESP32](https://espressif.com/en/products/hardware/esp32/overview) chip.
|
ESP-IDF is the official development framework for the [ESP32](https://espressif.com/en/products/hardware/esp32/overview) chip.
|
||||||
|
|
||||||
|
@ -10,9 +10,9 @@ ESP-IDF is the official development framework for the [ESP32](https://espressif.
|
||||||
|
|
||||||
See setup guides for detailed instructions to set up the ESP-IDF:
|
See setup guides for detailed instructions to set up the ESP-IDF:
|
||||||
|
|
||||||
* [Windows Setup Guide](http://esp-idf.readthedocs.io/en/latest/get-started/windows-setup.html)
|
* [Windows Setup Guide](https://esp-idf.readthedocs.io/en/latest/get-started/windows-setup.html)
|
||||||
* [Mac OS Setup Guide](http://esp-idf.readthedocs.io/en/latest/get-started/macos-setup.html)
|
* [Mac OS Setup Guide](https://esp-idf.readthedocs.io/en/latest/get-started/macos-setup.html)
|
||||||
* [Linux Setup Guide](http://esp-idf.readthedocs.io/en/latest/get-started/linux-setup.html)
|
* [Linux Setup Guide](https://esp-idf.readthedocs.io/en/latest/get-started/linux-setup.html)
|
||||||
|
|
||||||
## Finding a Project
|
## Finding a Project
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ You don't need to run `make all` before running `make flash`, `make flash` will
|
||||||
|
|
||||||
## Viewing Serial Output
|
## Viewing Serial Output
|
||||||
|
|
||||||
The `make monitor` target uses the [idf_monitor tool](http://esp-idf.readthedocs.io/en/latest/get-started/idf-monitor.html) to display serial output from the ESP32. idf_monitor also has a range of features to decode crash output and interact with the device. [Check the documentation page for details](http://esp-idf.readthedocs.io/en/latest/get-started/idf-monitor.html).
|
The `make monitor` target uses the [idf_monitor tool](https://esp-idf.readthedocs.io/en/latest/get-started/idf-monitor.html) to display serial output from the ESP32. idf_monitor also has a range of features to decode crash output and interact with the device. [Check the documentation page for details](https://esp-idf.readthedocs.io/en/latest/get-started/idf-monitor.html).
|
||||||
|
|
||||||
Exit the monitor by typing Ctrl-].
|
Exit the monitor by typing Ctrl-].
|
||||||
|
|
||||||
|
@ -106,11 +106,12 @@ This can be combined with other targets, ie `make erase_flash flash` will erase
|
||||||
|
|
||||||
# Resources
|
# Resources
|
||||||
|
|
||||||
* Documentation for the latest version: http://esp-idf.readthedocs.io/. This documentation is built from the [docs directory](docs) of this repository.
|
* Documentation for the latest version: https://esp-idf.readthedocs.io/. This documentation is built from the [docs directory](docs) of this repository.
|
||||||
|
|
||||||
* The [esp32.com forum](http://esp32.com/) is a place to ask questions and find community resources.
|
* The [esp32.com forum](https://esp32.com/) is a place to ask questions and find community resources.
|
||||||
|
|
||||||
* [Check the Issues section on github](https://github.com/espressif/esp-idf/issues) if you find a bug or have a feature request. Please check existing Issues before opening a new one.
|
* [Check the Issues section on github](https://github.com/espressif/esp-idf/issues) if you find a bug or have a feature request. Please check existing Issues before opening a new one.
|
||||||
|
|
||||||
* If you're interested in contributing to ESP-IDF, please check the [Contributions Guide](http://esp-idf.readthedocs.io/en/latest/contribute/index.html).
|
* If you're interested in contributing to ESP-IDF, please check the [Contributions Guide](https://esp-idf.readthedocs.io/en/latest/contribute/index.html).
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,7 @@ esp_err_t esp_avrc_ct_deinit(void);
|
||||||
* @param[in] tl : transaction label, 0 to 15, consecutive commands should use different values.
|
* @param[in] tl : transaction label, 0 to 15, consecutive commands should use different values.
|
||||||
* @param[in] key_code : passthrough command code, e.g. ESP_AVRC_PT_CMD_PLAY, ESP_AVRC_PT_CMD_STOP, etc.
|
* @param[in] key_code : passthrough command code, e.g. ESP_AVRC_PT_CMD_PLAY, ESP_AVRC_PT_CMD_STOP, etc.
|
||||||
* @param[in] key_state : passthrough command key state, ESP_AVRC_PT_CMD_STATE_PRESSED or
|
* @param[in] key_state : passthrough command key state, ESP_AVRC_PT_CMD_STATE_PRESSED or
|
||||||
* ESP_AVRC_PT_CMD_STATE_PRESSED
|
* ESP_AVRC_PT_CMD_STATE_RELEASED
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
* - ESP_OK: success
|
* - ESP_OK: success
|
||||||
|
|
|
@ -298,7 +298,7 @@ static void btc_to_bta_adv_data(esp_ble_adv_data_t *p_adv_data, tBTA_BLE_ADV_DAT
|
||||||
bta_adv_data->p_services_128b =
|
bta_adv_data->p_services_128b =
|
||||||
osi_malloc(sizeof(tBTA_BLE_128SERVICE));
|
osi_malloc(sizeof(tBTA_BLE_128SERVICE));
|
||||||
if (NULL != bta_adv_data->p_services_128b) {
|
if (NULL != bta_adv_data->p_services_128b) {
|
||||||
LOG_ERROR("%s - In 128-UUID_data", __FUNCTION__);
|
LOG_DEBUG("%s - In 128-UUID_data", __FUNCTION__);
|
||||||
mask |= BTM_BLE_AD_BIT_SERVICE_128;
|
mask |= BTM_BLE_AD_BIT_SERVICE_128;
|
||||||
memcpy(bta_adv_data->p_services_128b->uuid128,
|
memcpy(bta_adv_data->p_services_128b->uuid128,
|
||||||
bt_uuid.uu.uuid128, LEN_UUID_128);
|
bt_uuid.uu.uuid128, LEN_UUID_128);
|
||||||
|
|
|
@ -162,7 +162,7 @@ typedef enum {
|
||||||
GPIO_NUM_27 = 27, /*!< GPIO27, input and output */
|
GPIO_NUM_27 = 27, /*!< GPIO27, input and output */
|
||||||
|
|
||||||
GPIO_NUM_32 = 32, /*!< GPIO32, input and output */
|
GPIO_NUM_32 = 32, /*!< GPIO32, input and output */
|
||||||
GPIO_NUM_33 = 33, /*!< GPIO32, input and output */
|
GPIO_NUM_33 = 33, /*!< GPIO33, input and output */
|
||||||
GPIO_NUM_34 = 34, /*!< GPIO34, input mode only */
|
GPIO_NUM_34 = 34, /*!< GPIO34, input mode only */
|
||||||
GPIO_NUM_35 = 35, /*!< GPIO35, input mode only */
|
GPIO_NUM_35 = 35, /*!< GPIO35, input mode only */
|
||||||
GPIO_NUM_36 = 36, /*!< GPIO36, input mode only */
|
GPIO_NUM_36 = 36, /*!< GPIO36, input mode only */
|
||||||
|
|
|
@ -616,7 +616,6 @@ static void uart_rx_intr_handler_default(void *param)
|
||||||
uart_reg->int_clr.rxfifo_tout = 1;
|
uart_reg->int_clr.rxfifo_tout = 1;
|
||||||
uart_reg->int_clr.rxfifo_full = 1;
|
uart_reg->int_clr.rxfifo_full = 1;
|
||||||
UART_EXIT_CRITICAL_ISR(&uart_spinlock[uart_num]);
|
UART_EXIT_CRITICAL_ISR(&uart_spinlock[uart_num]);
|
||||||
uart_event.type = UART_DATA;
|
|
||||||
uart_event.size = rx_fifo_len;
|
uart_event.size = rx_fifo_len;
|
||||||
//If we fail to push data to ring buffer, we will have to stash the data, and send next time.
|
//If we fail to push data to ring buffer, we will have to stash the data, and send next time.
|
||||||
//Mainly for applications that uses flow control or small ring buffer.
|
//Mainly for applications that uses flow control or small ring buffer.
|
||||||
|
|
|
@ -327,7 +327,7 @@ uint64_t esp_deep_sleep_get_ext1_wakeup_status()
|
||||||
if ((status & BIT(rtc_pin)) == 0) {
|
if ((status & BIT(rtc_pin)) == 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
gpio_mask |= BIT(gpio);
|
gpio_mask |= 1ULL << gpio;
|
||||||
}
|
}
|
||||||
return gpio_mask;
|
return gpio_mask;
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ typedef intr_handle_data_t* intr_handle_t ;
|
||||||
esp_err_t esp_intr_mark_shared(int intno, int cpu, bool is_in_iram);
|
esp_err_t esp_intr_mark_shared(int intno, int cpu, bool is_in_iram);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Reserve an interrupt to be used outside of this framewoek
|
* @brief Reserve an interrupt to be used outside of this framework
|
||||||
*
|
*
|
||||||
* This will mark a certain interrupt on the specified CPU as
|
* This will mark a certain interrupt on the specified CPU as
|
||||||
* reserved, not to be allocated for any reason.
|
* reserved, not to be allocated for any reason.
|
||||||
|
|
|
@ -16,6 +16,11 @@
|
||||||
*/
|
*/
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
|
/* If BT is not built at all */
|
||||||
|
#ifndef CONFIG_BT_RESERVE_DRAM
|
||||||
|
#define CONFIG_BT_RESERVE_DRAM 0
|
||||||
|
#endif
|
||||||
|
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
/* All these values assume the flash cache is on, and have the blocks this uses subtracted from the length
|
/* All these values assume the flash cache is on, and have the blocks this uses subtracted from the length
|
||||||
|
|
|
@ -1501,6 +1501,7 @@ lwip_socket(int domain, int type, int protocol)
|
||||||
i = alloc_socket(conn, 0);
|
i = alloc_socket(conn, 0);
|
||||||
|
|
||||||
if (i == -1) {
|
if (i == -1) {
|
||||||
|
LWIP_DEBUGF(SOCKETS_DEBUG, ("-1 / ENFILE (could not allocate socket)\n"));
|
||||||
netconn_delete(conn);
|
netconn_delete(conn);
|
||||||
set_errno(ENFILE);
|
set_errno(ENFILE);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -15,7 +15,7 @@ install the given interrupt handler and ISR to it.
|
||||||
|
|
||||||
This code has two different types of interrupts it handles differently: Shared interrupts and non-shared interrupts. The simplest
|
This code has two different types of interrupts it handles differently: Shared interrupts and non-shared interrupts. The simplest
|
||||||
of the two are non-shared interrupts: a separate interrupt is allocated per esp_intr_alloc call and this interrupt is solely used for
|
of the two are non-shared interrupts: a separate interrupt is allocated per esp_intr_alloc call and this interrupt is solely used for
|
||||||
the peripheral attached to it, with only one ISR that will get called. Non-shared interrupts can have multiple peripherals triggering
|
the peripheral attached to it, with only one ISR that will get called. Shared interrupts can have multiple peripherals triggering
|
||||||
it, with multiple ISRs being called when one of the peripherals attached signals an interrupt. Thus, ISRs that are intended for shared
|
it, with multiple ISRs being called when one of the peripherals attached signals an interrupt. Thus, ISRs that are intended for shared
|
||||||
interrupts should check the interrupt status of the peripheral they service in order to see if any action is required.
|
interrupts should check the interrupt status of the peripheral they service in order to see if any action is required.
|
||||||
|
|
||||||
|
|
|
@ -46,11 +46,11 @@ ESP32 toolchain for Linux is available for download from Espressif website:
|
||||||
|
|
||||||
To use it, you will need to update your ``PATH`` environment variable in ``~/.profile`` file. To make ``xtensa-esp32-elf`` available for all terminal sessions, add the following line to your ``~/.profile`` file::
|
To use it, you will need to update your ``PATH`` environment variable in ``~/.profile`` file. To make ``xtensa-esp32-elf`` available for all terminal sessions, add the following line to your ``~/.profile`` file::
|
||||||
|
|
||||||
export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin
|
export PATH="$PATH:$HOME/esp/xtensa-esp32-elf/bin"
|
||||||
|
|
||||||
Alternatively, you may create an alias for the above command. This way you can get the toolchain only when you need it. To do this, add different line to your ``~/.profile`` file::
|
Alternatively, you may create an alias for the above command. This way you can get the toolchain only when you need it. To do this, add different line to your ``~/.profile`` file::
|
||||||
|
|
||||||
alias get_esp32="export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin"
|
alias get_esp32='export PATH="$PATH:$HOME/esp/xtensa-esp32-elf/bin"'
|
||||||
|
|
||||||
Then when you need the toolchain you can type ``get_esp32`` on the command line and the toolchain will be added to your ``PATH``.
|
Then when you need the toolchain you can type ``get_esp32`` on the command line and the toolchain will be added to your ``PATH``.
|
||||||
|
|
||||||
|
|
|
@ -194,7 +194,7 @@ failed1:
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void openssl_client_init(void)
|
static void openssl_server_init(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
xTaskHandle openssl_handle;
|
xTaskHandle openssl_handle;
|
||||||
|
@ -219,7 +219,7 @@ static esp_err_t wifi_event_handler(void *ctx, system_event_t *event)
|
||||||
break;
|
break;
|
||||||
case SYSTEM_EVENT_STA_GOT_IP:
|
case SYSTEM_EVENT_STA_GOT_IP:
|
||||||
xEventGroupSetBits(wifi_event_group, CONNECTED_BIT);
|
xEventGroupSetBits(wifi_event_group, CONNECTED_BIT);
|
||||||
openssl_client_init();
|
openssl_server_init();
|
||||||
break;
|
break;
|
||||||
case SYSTEM_EVENT_STA_DISCONNECTED:
|
case SYSTEM_EVENT_STA_DISCONNECTED:
|
||||||
/* This is a workaround as ESP32 WiFi libs don't currently
|
/* This is a workaround as ESP32 WiFi libs don't currently
|
||||||
|
|
Loading…
Reference in a new issue