diff --git a/components/driver/include/driver/i2c.h b/components/driver/include/driver/i2c.h index feb1d78bd..0bd0e2aae 100644 --- a/components/driver/include/driver/i2c.h +++ b/components/driver/include/driver/i2c.h @@ -384,7 +384,7 @@ int i2c_slave_write_buffer(i2c_port_t i2c_num, uint8_t* data, int size, TickType * Only call this function in I2C slave mode * * @param i2c_num I2C port number - * @param data data pointer to write into internal buffer + * @param data data pointer to accept data from internal buffer * @param max_size Maximum data size to read * @param ticks_to_wait Maximum waiting ticks * diff --git a/components/driver/include/driver/spi_master.h b/components/driver/include/driver/spi_master.h index 3b1723381..01348d01a 100644 --- a/components/driver/include/driver/spi_master.h +++ b/components/driver/include/driver/spi_master.h @@ -133,11 +133,11 @@ struct spi_transaction_t { void *user; ///< User-defined variable. Can be used to store eg transaction ID. union { const void *tx_buffer; ///< Pointer to transmit buffer, or NULL for no MOSI phase - uint8_t tx_data[4]; ///< If SPI_USE_TXDATA is set, data set here is sent directly from this variable. + uint8_t tx_data[4]; ///< If SPI_TRANS_USE_TXDATA is set, data set here is sent directly from this variable. }; union { void *rx_buffer; ///< Pointer to receive buffer, or NULL for no MISO phase. Written by 4 bytes-unit if DMA is used. - uint8_t rx_data[4]; ///< If SPI_USE_RXDATA is set, data is received directly to this variable + uint8_t rx_data[4]; ///< If SPI_TRANS_USE_RXDATA is set, data is received directly to this variable }; } ; //the rx data should start from a 32-bit aligned address to get around dma issue. diff --git a/components/mbedtls/Kconfig b/components/mbedtls/Kconfig index 5ad419cec..4d1d527fe 100644 --- a/components/mbedtls/Kconfig +++ b/components/mbedtls/Kconfig @@ -330,13 +330,20 @@ menu "mbedTLS" help Disabling this option will save some code size if it is not needed. - config MBEDTLS_SSL_SESSION_TICKETS - bool "TLS: Support RFC 5077 SSL session tickets" + config MBEDTLS_CLIENT_SSL_SESSION_TICKETS + bool "TLS: Client Support for RFC 5077 SSL session tickets" default y depends on MBEDTLS_TLS_ENABLED help - Support RFC 5077 session tickets. See mbedTLS documentation for more details. + Client support for RFC 5077 session tickets. See mbedTLS documentation for more details. + Disabling this option will save some code size. + config MBEDTLS_SERVER_SSL_SESSION_TICKETS + bool "TLS: Server Support for RFC 5077 SSL session tickets" + default y + depends on MBEDTLS_TLS_ENABLED + help + Server support for RFC 5077 session tickets. See mbedTLS documentation for more details. Disabling this option will save some code size. menu "Symmetric Ciphers" diff --git a/components/mbedtls/port/include/mbedtls/esp_config.h b/components/mbedtls/port/include/mbedtls/esp_config.h index 89cdef892..40ae3ae36 100644 --- a/components/mbedtls/port/include/mbedtls/esp_config.h +++ b/components/mbedtls/port/include/mbedtls/esp_config.h @@ -1308,7 +1308,7 @@ * * Comment this macro to disable support for SSL session tickets */ -#ifdef CONFIG_MBEDTLS_SSL_SESSION_TICKETS +#ifdef CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS #define MBEDTLS_SSL_SESSION_TICKETS #endif @@ -2340,7 +2340,9 @@ * * Requires: MBEDTLS_CIPHER_C */ +#ifdef CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS #define MBEDTLS_SSL_TICKET_C +#endif /** * \def MBEDTLS_SSL_CLI_C diff --git a/docs/en/api-guides/app_trace.rst b/docs/en/api-guides/app_trace.rst index c0b0a0bd4..f2e348497 100644 --- a/docs/en/api-guides/app_trace.rst +++ b/docs/en/api-guides/app_trace.rst @@ -384,7 +384,7 @@ Command usage examples: .. highlight:: none -1. Collect SystemView tracing data to files "pro-cpu.SVDat" and "pro-cpu.SVDat". The files will be saved in "openocd-esp32" directory. +1. Collect SystemView tracing data to files "pro-cpu.SVDat" and "app-cpu.SVDat". The files will be saved in "openocd-esp32" directory. :: diff --git a/docs/en/api-guides/freertos-smp.rst b/docs/en/api-guides/freertos-smp.rst index 51752170b..ac3a49ec8 100644 --- a/docs/en/api-guides/freertos-smp.rst +++ b/docs/en/api-guides/freertos-smp.rst @@ -291,7 +291,7 @@ resumed. Scheduler suspension in vanilla FreeRTOS is a common protection method against simultaneous access of data shared between tasks, whilst still allowing ISRs to be serviced. -In ESP-IDF FreeRTOS, :cpp:func:`xTaskResumeAll` will only prevent calls of +In ESP-IDF FreeRTOS, :cpp:func:`xTaskSuspendAll` will only prevent calls of ``vTaskSwitchContext()`` from switching contexts on the core that called for the suspension. Hence if **PRO_CPU** calls :cpp:func:`vTaskSuspendAll`, **APP_CPU** will still be able to switch contexts. If data is shared between tasks that are diff --git a/docs/en/api-reference/peripherals/i2c.rst b/docs/en/api-reference/peripherals/i2c.rst index da3e1def4..2ff332357 100644 --- a/docs/en/api-reference/peripherals/i2c.rst +++ b/docs/en/api-reference/peripherals/i2c.rst @@ -31,7 +31,7 @@ Configure Driver The first step to establishing I2C communication is to configure the driver. This is done by setting several parameters contained in :cpp:type:`i2c_config_t` structure: -* I2C **operation mode** - select either slave or master from :cpp:type:`i2c_opmode_t` +* I2C **mode** - select either slave or master from :cpp:type:`i2c_mode_t` * Settings of the **communication pins**: * GPIO pin numbers assigned to the SDA and SCL signals @@ -56,7 +56,7 @@ Install Driver Having the configuration initialized, the next step is to install the I2C driver by calling :cpp:func:`i2c_driver_install`. This function call requires the following parameters: * The port number, one of the two ports available, selected from :cpp:type:`i2c_port_t` -* The operation mode, slave or master selected from :cpp:type:`i2c_opmode_t` +* The I2C mode, slave or master, selected from :cpp:type:`i2c_mode_t` * Sizes of buffers that will be allocated for sending and receiving data **in the slave mode** * Flags used to allocate the interrupt diff --git a/docs/en/api-reference/peripherals/spi_master.rst b/docs/en/api-reference/peripherals/spi_master.rst index b33faab2a..e02bda151 100644 --- a/docs/en/api-reference/peripherals/spi_master.rst +++ b/docs/en/api-reference/peripherals/spi_master.rst @@ -78,8 +78,8 @@ and/or address. This is reflected in the device configuration: when the ``comman fields are set to zero, no command or address phase is done. Something similar is true for the read and write phase: not every transaction needs both data to be written -as well as data to be read. When ``rx_buffer`` is NULL (and SPI_USE_RXDATA) is not set) the read phase -is skipped. When ``tx_buffer`` is NULL (and SPI_USE_TXDATA) is not set) the write phase is skipped. +as well as data to be read. When ``rx_buffer`` is NULL (and SPI_TRANS_USE_RXDATA) is not set) the read phase +is skipped. When ``tx_buffer`` is NULL (and SPI_TRANS_USE_TXDATA) is not set) the write phase is skipped. The driver offers two different kinds of transactions: the interrupt transactions and the polling transactions. Each device can choose one kind of @@ -205,8 +205,8 @@ Tips 1. Transactions with small amount of data: Sometimes, the amount of data is very small making it less than optimal allocating a separate buffer for it. If the data to be transferred is 32 bits or less, it can be stored in the transaction struct - itself. For transmitted data, use the ``tx_data`` member for this and set the ``SPI_USE_TXDATA`` flag - on the transmission. For received data, use ``rx_data`` and set ``SPI_USE_RXDATA``. In both cases, do + itself. For transmitted data, use the ``tx_data`` member for this and set the ``SPI_TRANS_USE_TXDATA`` flag + on the transmission. For received data, use ``rx_data`` and set ``SPI_TRANS_USE_RXDATA``. In both cases, do not touch the ``tx_buffer`` or ``rx_buffer`` members, because they use the same memory locations as ``tx_data`` and ``rx_data``. diff --git a/docs/en/get-started-cmake/index.rst b/docs/en/get-started-cmake/index.rst index 97a8f37db..0181b25ea 100644 --- a/docs/en/get-started-cmake/index.rst +++ b/docs/en/get-started-cmake/index.rst @@ -283,7 +283,7 @@ Linux and MacOS cd ~/esp/hello_world idf.py menuconfig -If your default version of Python is 3.x, you may need to run ``python2 idf.py`` instead. +If your default version of Python is 3.x, you may need to run ``python2 $(which idf.py) menuconfig`` instead. Windows ~~~~~~~ diff --git a/docs/en/get-started-cmake/linux-setup.rst b/docs/en/get-started-cmake/linux-setup.rst index 1edca98b7..38766a7b7 100644 --- a/docs/en/get-started-cmake/linux-setup.rst +++ b/docs/en/get-started-cmake/linux-setup.rst @@ -21,7 +21,7 @@ To compile with ESP-IDF you need to get the following packages: - Arch:: - sudo pacman -S --needed gcc git make ncurses flex bison gperf python2-pyserial python2-cryptography python2-future python2-pyparsing python2-pyelftools cmake ninja ccache + sudo pacman -S --needed gcc git make ncurses flex bison gperf python2-pip python2-pyserial python2-cryptography python2-future python2-pyparsing python2-pyelftools cmake ninja ccache .. note:: CMake version 3.5 or newer is required for use with ESP-IDF. Older Linux distributions may require updating, enabling of a "backports" repository, or installing of a "cmake3" package rather than "cmake". diff --git a/examples/bluetooth/ble_eddystone/main/esp_eddystone_api.h b/examples/bluetooth/ble_eddystone/main/esp_eddystone_api.h index 946abab54..41ad278e8 100644 --- a/examples/bluetooth/ble_eddystone/main/esp_eddystone_api.h +++ b/examples/bluetooth/ble_eddystone/main/esp_eddystone_api.h @@ -53,7 +53,7 @@ static inline uint16_t big_endian_read_16(const uint8_t *buffer, uint8_t pos) static inline uint32_t big_endian_read_32(const uint8_t *buffer, uint8_t pos) { - return (((uint32_t)buffer[pos]) << 24) | (((uint32_t)buffer[(pos)+1]) >> 16) | (((uint32_t)buffer[(pos)+2]) >> 8) | ((uint32_t)buffer[(pos)+3]); + return (((uint32_t)buffer[pos]) << 24) | (((uint32_t)buffer[(pos)+1]) << 16) | (((uint32_t)buffer[(pos)+2]) << 8) | ((uint32_t)buffer[(pos)+3]); } /* diff --git a/examples/bluetooth/ble_eddystone/main/esp_eddystone_demo.c b/examples/bluetooth/ble_eddystone/main/esp_eddystone_demo.c index 7f6e67b86..525bcd2ae 100644 --- a/examples/bluetooth/ble_eddystone/main/esp_eddystone_demo.c +++ b/examples/bluetooth/ble_eddystone/main/esp_eddystone_demo.c @@ -70,7 +70,7 @@ static void esp_eddystone_show_inform(const esp_eddystone_result_t* res) ESP_LOGI(DEMO_TAG, "battery voltage: %d mV", res->inform.tlm.battery_voltage); ESP_LOGI(DEMO_TAG, "beacon temperature in degrees Celsius: %6.1f", res->inform.tlm.temperature); ESP_LOGI(DEMO_TAG, "adv pdu count since power-up: %d", res->inform.tlm.adv_count); - ESP_LOGI(DEMO_TAG, "time since power-up: %d s", res->inform.tlm.time); + ESP_LOGI(DEMO_TAG, "time since power-up: %d s", (res->inform.tlm.time)/10); break; } default: diff --git a/examples/bluetooth/ble_hid_device_demo/main/ble_hidd_demo_main.c b/examples/bluetooth/ble_hid_device_demo/main/ble_hidd_demo_main.c index ae7e0cac9..e26fa38d9 100644 --- a/examples/bluetooth/ble_hid_device_demo/main/ble_hidd_demo_main.c +++ b/examples/bluetooth/ble_hid_device_demo/main/ble_hidd_demo_main.c @@ -29,19 +29,10 @@ /** * Brief: - * This test code shows how to configure gpio and how to use gpio interrupt. - * - * GPIO status: - * GPIO18: output - * GPIO19: output - * GPIO4: input, pulled up, interrupt from rising edge and falling edge - * GPIO5: input, pulled up, interrupt from rising edge. - * - * Test: - * Connect GPIO18 with GPIO4 - * Connect GPIO19 with GPIO5 - * Generate pulses on GPIO18/19, that triggers interrupt on GPIO4/5 - * + * This example Implemented BLE HID device profile related functions, in which the HID device + * has 4 Reports (1 is mouse, 2 is keyboard and LED, 3 is Consumer Devices, 4 is Vendor devices). + * Users can choose different reports according to their own application scenarios. + * BLE HID profile inheritance and USB HID class. */ /** @@ -58,15 +49,6 @@ #define HID_DEMO_TAG "HID_DEMO" -#define GPIO_OUTPUT_IO_0 18 -#define GPIO_OUTPUT_IO_1 19 -#define GPIO_OUTPUT_PIN_SEL ((1<