text stringlengths 1 3.82k | __index_level_0__ int64 0 366 |
|---|---|
Migration Guides
ESP-IDF 5.x Migration Guide
.. toctree::
:maxdepth: 1
release-5.x/5.0/index
release-5.x/5.1/index
release-5.x/5.2/index
release-5.x/5.3/index
| 0 |
Migration from 5.0 to 5.1
.. toctree::
:maxdepth: 1
gcc
:SOC_IEEE802154_SUPPORTED: ieee802154
peripherals
storage
networking
system
| 1 |
Networking
SNTP
SNTP module now provides thread safe APIs to access lwIP functionality. It is recommended to use :doc:`ESP_NETIF ` API. Please refer to the chapter :ref:`esp_netif-sntp-api` for more details.
| 2 |
GCC
***
GCC Version
The previous GCC version was GCC 11.2.0. This has now been upgraded to GCC 12.2.0 on all targets. Users that need to port their code from GCC 11.2.0 to 12.2.0 should refer to the series of official GCC porting guides listed below:
Warnings
The upgrade to GCC 12.2.0 has resulted in the addi... | 3 |
There is an example of how it was fixed in ESP-IDF's ``test_realloc.c``.
.. code-block:: c
void *x = malloc(64);
void *y = realloc(x, 48);
TEST_ASSERT_EQUAL_PTR(x, y);
Pointers may be converted to int to avoid warning ``-Wuse-after-free``.
.. code-block:: c
int x = (int) malloc(64);
int y = (i... | 3 |
GCC 12 reflects this change, and as a result, when building for RISC-V ESP32 chips outside of the ESP-IDF framework, you must include the ``_zicsr_zifencei`` postfix when specifying the -march option in your build system.
Example:
.. code-block:: bash
riscv32-esp-elf-gcc main.c -march=rv32imac
Now is replaced wi... | 3 |
System
FreeRTOS
.. only:: SOC_SPIRAM_SUPPORTED
Dynamic Memory Allocation
In the past, FreeRTOS commonly utilized the function ``malloc()`` to allocate dynamic memory. As a result, if an application allowed ``malloc()`` to allocate memory from external RAM (by configuring the :ref:`CONFIG_SPIRAM_US... | 4 |
Therefore, FreeRTOS has been updated to always use internal memory (i.e., DRAM) for dynamic memory allocation. Calling FreeRTOS creation functions (e.g., :cpp:func:`xTaskCreate`, :cpp:func:`xQueueCreate`) guarantees that the memory allocated for those tasks/objects is from internal memory (see :ref:`freertos-heap... | 4 |
..CreateStatic()`` FreeRTOS functions.
Power Management
| 4 |
Storage
FatFs
``esp_vfs_fat_sdmmc_unmount()`` is now deprecated, and you can use :cpp:func:`esp_vfs_fat_sdcard_unmount()` instead. This API is deprecated in previous ESP-IDF versions, but without a deprecation warning or migration guide. Since ESP-IDF v5.1, calling this ``esp_vfs_fat_sdmmc_unmount()`` API will ge... | 5 |
Peripherals
.. only:: SOC_DAC_SUPPORTED
DAC
---
DAC driver has been redesigned (see :doc:`DAC API Reference `), which aims to unify the interface and extend the usage of DAC peripheral. Although it is recommended to use the new driver APIs, the legacy driver is still available in the previous include ... | 6 |
And these channels can be allocated in a same channel group which is represented by :cpp:type:`dac_channels_handle_t`.
- ``dac_cw_scale_t`` is replaced by :cpp:type:`dac_cosine_atten_t` to decouple the legacy driver and the new driver.
- ``dac_cw_phase_t`` is replaced by :cpp:type:`dac_cosine_phase_t`. The enu... | 6 |
- ``dac_output_enable`` is removed. For oneshot mode, it will be enabled after the channel is allocated.
- ``dac_output_disable`` is removed. For oneshot mode, it will be disabled before the channel is deleted.
- ``dac_cw_generator_enable`` is replaced by :cpp:func:`dac_cosine_start`.
- ``dac_cw_genera... | 6 |
- ``dac_digi_stop`` is replaced by :cpp:func:`dac_continuous_disable`.
.. only:: SOC_GPSPI_SUPPORTED
GPSPI
Following items are deprecated. Since ESP-IDF v5.1, GPSPI clock source is configurable.
- ``spi_get_actual_clock`` is deprecated, you should use :cpp:func:`spi_device_get_actual_freq... | 6 |
IEEE 802.15.4
Receive Handle Done
.. note::
It is required since IDF v5.1.3 release.
User must call the function :cpp:func:`esp_ieee802154_receive_handle_done` to notify 802.15.4 driver after the received frame is handled. Otherwise the frame buffer will not be freed for future use.
| 7 |
Migration from 4.4 to 5.0
.. toctree::
:maxdepth: 1
:SOC_BT_CLASSIC_SUPPORTED: bluetooth-classic
:SOC_BLE_SUPPORTED: bluetooth-low-energy
build-system
gcc
networking
peripherals
protocols
provisioning
removed-components
storage
system
tools
| 8 |
Build System
Migrating from GNU Make Build System
ESP-IDF v5.0 no longer supports GNU make-based projects. Please follow the :ref:`build system ` guide for migration.
Update Fragment File Grammar
The former grammar, supported in ESP-IDF v3.x, was dropped in ESP-IDF v5.0. Here are a few notes on how to migrate pr... | 9 |
This can be done by adding ``REQUIRES `` or ``PRIV_REQUIRES `` in ``idf_component_register`` call inside component's ``CMakeLists.txt``. See :ref:`Component Requirements ` for more information on specifying requirements.
Setting ``COMPONENT_DIRS`` and ``EXTRA_COMPONENT_DIRS`` Variables
.. highlight:: cmake
ESP-IDF... | 9 |
Update Usage of ``target_link_libraries`` with ``project_elf``
ESP-IDF v5.0 fixes CMake variable propagation issues for components. This issue caused compiler flags and definitions that were supposed to apply to one component to be applied to every component in the project.
As a side effect of this, user projects ... | 9 |
This affects ESP-IDF users who use system-provided CMake and custom CMake.
Reorder the Applying of the Target-Specific Config Files
.. highlight:: none
ESP-IDF v5.0 reorders the applying order of target-specific config files and other files listed in SDKCONFIG_DEFAULTS. Now, target-specific files will be applied ... | 9 |
g., ``sdkconfig_devkit1.esp32``).
| 9 |
Networking
Wi-Fi
Callback Function Type ``esp_now_recv_cb_t``
Previously, the first parameter of ``esp_now_recv_cb_t`` was of type ``const uint8_t *mac_addr``, which only included the address of ESP-NOW peer device.
This now changes. The first parameter is of type ``esp_now_recv_info_t``, which has members ``s... | 10 |
c`
Ethernet
``esp_eth_ioctl()`` API
Previously, the :cpp:func:`esp_eth_ioctl` API had the following issues:
- The third parameter (which is of type ``void *``) would accept an ``int``/``bool`` type arguments (i.e., not pointers) as input in some cases. However, these cases were not documented properly.
- ... | 10 |
. code-block:: c
eth_duplex_t new_duplex_mode = ETH_DUPLEX_HALF;
esp_eth_ioctl(eth_handle, ETH_CMD_S_DUPLEX_MODE, &new_duplex_mode);
Usage example to get Ethernet configuration:
.. code-block:: c
eth_duplex_t duplex_mode;
esp_eth_ioctl(eth_handle, ETH_CMD_G_DUPLEX_MODE, &duplex_mode);
KSZ8041/81 an... | 10 |
Otherwise, you may start the Ethernet driver right after they register the user event handler.
PHY Address Auto-detect
The Ethernet PHY address auto-detect function ``esp_eth_detect_phy_addr()`` is renamed to :cpp:func:`esp_eth_phy_802_3_detect_phy_addr` and its header declaration is moved to :component_file:`esp_e... | 10 |
Refer to :doc:`Ethernet API Reference Guide ` for an example of SPI-Ethernet Module initialization.
Ethernet Driver
APIs for creating MAC instances (`esp_eth_mac_new_*()`) have been reworked to accept two parameters, instead of one common configuration. Now, the configuration includes
This is applicable to interna... | 10 |
See :doc:`/api-reference/network/esp_netif` for more details.
- The ``esp_netif_deinit()`` function is provided to de-initialize the network stack.
- You should also replace ``#include "tcpip_adapter.h"`` with ``#include "esp_netif.h"``.
Network Interface Creation
Previously, the TCP/IP Adapter defined the followi... | 10 |
c`
- Ethernet: :example_file:`ethernet/basic/main/ethernet_example_main.c`
Other ``tcpip_adapter`` API Replacement
All the ``tcpip_adapter`` functions have their ``esp-netif`` counter-part. Please refer to the ``esp_netif.h`` grouped into these sections:
Default Event Handlers
Event handlers are moved from ``tcpi... | 10 |
However, the above method using ``IP2STR()`` is generally preferred.
IP Addresses
You are advised to use ``esp-netif`` defined IP structures. Please note that with default compatibility enabled, the LwIP structs still work.
| 10 |
GCC
***
GCC Version
The previous GCC version was GCC 8.4.0. This has now been upgraded to GCC 11.2.0 on all targets. Users that need to port their code from GCC 8.4.0 to 11.2.0 should refer to the series of official GCC porting guides listed below:
Warnings
The upgrade to GCC 11.2.0 has resulted in the additi... | 11 |
The examples below demonstrate code that triggers these warnings and how to suppress them.
.. code-block:: c
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-overflow"
#pragma GCC diagnostic ignored "-Warray-bounds"
memset(RTC_SLOW_MEM, 0, CONFIG_ULP_COPROC_RESERVE_MEM); // ... | 11 |
.. code-block:: c
#pragma GCC diagnostic push
#if __GNUC__ >= 9
#pragma GCC diagnostic ignored "-Waddress-of-packed-member" ``. When using these fixed-width types (e.g., ``uint32_t``), users will need to replace placeholders such as ``%i`` and ``%x`` with ``PRIi32`` and ``PRIx32`` respectively. Types... | 11 |
However, enough time has passed to allow for the warnings to be fixed, thus this option has been removed.
For now in GCC 11, users are advised to review their code and fix the compiler warnings where possible.
| 11 |
Tools
ESP-IDF Monitor
ESP-IDF Monitor makes the following changes regarding baud-rate:
- ESP-IDF monitor now uses the custom console baud-rate (:ref:`CONFIG_ESP_CONSOLE_UART_BAUDRATE`) by default instead of 115200.
- Setting a custom baud from menuconfig is no longer supported.
- A custom baud-rate can be specif... | 12 |
New and existing projects migrated to ESP-IDF v5.0 have to set :ref:`CONFIG_ESPTOOLPY_FLASHSIZE`. If this is not possible due to an unknown flash size at build time, then :ref:`CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE` can be enabled. However, once enabled, to keep the digest valid, an SHA256 digest is no longer appen... | 12 |
System
Inter-Processor Call
IPC (Inter-Processor Call) feature is no longer a stand-alone component and has been integrated into the ``esp_system`` component.
Thus, any project presenting a ``CMakeLists.txt`` file with the parameters ``PRIV_REQUIRES esp_ipc`` or ``REQUIRES esp_ipc`` should be modified to simply ... | 13 |
Cache Error Interrupt
The Cache Error Interrupt API (functions/types/macros prefixed with ``esp_cache_err``) has been made into a private API. Thus, the previous include path ``#include "{IDF_TARGET_NAME}/cache_err_int.h"`` has been removed. If users still require usage of the Cache Error Interrupt API (though this... | 13 |
h"``.
ROM
---
The previously deprecated ROM-related header files located in ``components/esp32/rom/`` (old include path: ``rom/*.h``) have been moved. Please use the new target-specific path from ``components/esp_rom/include/{IDF_TARGET_NAME}/`` (new include path: ``{IDF_TARGET_NAME}/rom/*.h``).
``esp_hw_support``
... | 13 |
h``. ESP-IDF developers should use respectively ``esp_cpu_get_cycle_count()``, ``esp_cpu_set_cycle_count()`` and ``esp_cpu_dbgr_is_attached()`` instead.
- The header file ``esp_intr.h`` has been deleted. Please include ``esp_intr_alloc.h`` to allocate and manipulate interrupts.
- The Panic API (functions/types/macros p... | 13 |
For example, ``#include "spinlock.h"``.
- ``esp_chip_info()`` returns the chip version in the format = 100 * ``major eFuse version`` + ``minor eFuse version``. Thus, the ``revision`` in the ``esp_chip_info_t`` structure is expanded to ``uint16_t`` to fit the new format.
PSRAM
- The target-specific header file ``sp... | 13 |
The latter was always set to ``true`` in current code, not providing additional information.
- Added eFuse wafer revisions: major and minor. The ``esp_efuse_get_chip_ver()`` API is not compatible with these changes, so it was removed. Instead, please use the following APIs: ``efuse_hal_get_major_chip_version()``, ``ef... | 13 |
h"``.
- The Interrupt Watchdog API (functions/types/macros prefixed with ``esp_int_wdt_``) has been made into a private API. Thus, the previous include path ``#include "esp_int_wdt.h"`` has been removed. If users still require usage of the Interrupt Watchdog API (though this is not recommended), it can be included via ... | 13 |
Kconfig choices like ``APPTRACE_SV_TS_SOURCE_TIMER00`` has been changed to ``APPTRACE_SV_TS_SOURCE_GPTIMER``. User no longer need to choose the group and timer ID.
``esp_timer``
The FRC2-based legacy implementation of ``esp_timer`` available on ESP32 has been removed. The simpler and more efficient implementation b... | 13 |
- The former ``CONFIG_ESP_TASK_WDT`` configuration option has been renamed to :ref:`CONFIG_ESP_TASK_WDT_INIT` and a new :ref:`CONFIG_ESP_TASK_WDT_EN` option has been introduced.
FreeRTOS
Legacy API and Data Types
Previously, the ``configENABLE_BACKWARD_COMPATIBILITY`` option was set by default, thus allowing pre... | 13 |
Return value shall be ``pdTRUE`` on success and ``pdFALSE`` otherwise.
FreeRTOS Asserts
Previously, FreeRTOS asserts were configured separately from the rest of the system using the ``FREERTOS_ASSERT`` kconfig option. This option has now been removed and the configuration is now done through ``COMPILER_OPTIMIZATION... | 13 |
- ``vPortCPUAcquireMutexTimeout()`` is removed. Users should use the ``spinlock_acquire()`` function instead.
- ``vPortCPUReleaseMutex()`` is removed. Users should use the ``spinlock_release()`` function instead.
App Update
- The functions :cpp:func:`esp_ota_get_app_description` and :cpp:func:`esp_ota_get_app_elf_s... | 13 |
Note that this function takes :cpp:type:`esp_partition_t` as its first argument instead of :cpp:type:`esp_partition_pos_t`.
Chip Revision
The bootloader checks the chip revision at the beginning of the application loading. The application can only be loaded if the version is ``>=`` :ref:`CONFIG_{IDF_TARGET_CFG_PREF... | 13 |
Bluetooth Classic
Bluedroid
- :component_file:`bt/host/bluedroid/api/include/api/esp_hf_defs.h`
- In :cpp:enum:`esp_hf_cme_err_t`
- ``ESP_HF_CME_MEMEORY_FULL`` renamed to ``ESP_HF_CME_MEMORY_FULL``
- ``ESP_HF_CME_MEMEORY_FAILURE`` renamed to ``ESP_HF_CME_MEMORY_FAILURE``
... | 14 |
Removed or Deprecated Components
Components Moved to ESP-IDF Component Registry
Following components are removed from ESP-IDF and moved to `ESP-IDF Component Registry `_:
.. note::
Please note that http parser functionality which was previously part of ``nghttp`` component is now part of :component:`http_pa... | 15 |
It is not available in the IDF Component Registry, either. Please use :doc:`ESP-TLS ` or :component:`mbedtls` API directly.
.. note::
``esp_adc_cal`` component is no longer supported. New adc calibration driver is in ``esp_adc`` component. Legacy adc calibration driver has been moved into ``esp_adc`` component. ... | 15 |
Protocols
.. _migration_guide_mbedtls:
Mbed TLS
For ESP-IDF v5.0, `Mbed TLS `_ has been updated from v2.x to v3.1.0.
For more details about Mbed TLS's migration from version 2.x to version 3.0 or greater, please refer to the `official guide `__.
Breaking Changes (Summary)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Most Str... | 16 |
- For more details, refer to the `official guide `__.
Deprecated Config Options
Following are some of the important config options deprecated by this update. The configs related to and/or dependent on these have also been deprecated.
- ``MBEDTLS_SSL_PROTO_SSL3`` : Support for SSL 3.0
- ``MBEDTLS_SSL_PROTO_TLS1``... | 16 |
Related configs are given below:
- ``MBEDTLS_DHM_C`` : Support for the Diffie-Hellman-Merkle module
- ``MBEDTLS_KEY_EXCHANGE_DHE_PSK`` : Support for Diffie-Hellman PSK (pre-shared-key) TLS authentication modes
- ``MBEDTLS_KEY_EXCHANGE_DHE_RSA`` : Support for cipher suites with the prefix ``TLS-DHE-R... | 16 |
1. Most applications can safely remove it from the list of includes.
Breaking Change for ``esp_crt_bundle_set`` API
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- The :cpp:func:`esp_crt_bundle_set()` API now requires one additional argument named ``bundle_size``. The return type of the API has also been changed to ... | 16 |
ESP-TLS
Breaking Changes (Summary)
~~~~~~~~~~~~~~~~~~~~~~~~~~
``esp_tls_t`` Structure Is Now Private
The :cpp:type:`esp_tls_t` has now been made completely private. You cannot access its internal structures directly. Any necessary data that needs to be obtained from the ESP-TLS handle can be done through respec... | 16 |
Note that the alternatives need an additional parameter :cpp:type:`esp_tls_t`, which has to be initialized using the :cpp:func:`esp_tls_init` function.
HTTP Server
Breaking Changes (Summary)
~~~~~~~~~~~~~~~~~~~~~~~~~~
- ``http_server.h`` header is no longer available in ``esp_http_server``. Please use ``esp_http_s... | 16 |
0"
The ``esp-modbus`` component can be found in `component manager registry `__. Refer to `component manager documentation `__ for more information on how to set up the component manager.
For applications targeting v4.x releases of ESP-IDF that need to use new ``esp-modbus`` component, adding the component manager ma... | 16 |
Storage
New Component for the Partition APIs
Breaking change: all the Partition API code has been moved to a new component :component:`esp_partition`. For the complete list of affected functions and data-types, see header file :component_file:`esp_partition.h `.
These API functions and data-types were previously a... | 17 |
. note::
Please update relevant ``REQUIRES`` or ``PRIV_REQUIRES`` section according to your project. The above-presented code snippet is just an example.
If the issue persists, please let us know and we will assist you with your code migration.
SDMMC/SDSPI
SD card frequency on SDMMC/SDSPI interface can be now ... | 17 |
To check the frequency value calculated and actually applied, use ``void sdmmc_card_print_info(FILE* stream, const sdmmc_card_t* card)`` function.
FatFs
FatFs is now updated to v0.14. As a result, the function signature of ``f_mkfs()`` has changed. The new signature is ``FRESULT f_mkfs (const TCHAR* path, const MKF... | 17 |
Function Signature Changes
The following functions now return ``esp_err_t`` instead of ``void`` or ``nvs_iterator_t``. Previously, when parameters were invalid or when something goes wrong internally, these functions would ``assert()`` or return a ``nullptr``. With an ``esp_err_t`` returned, you can get better erro... | 17 |
. code-block:: c
nvs_iterator_t it = nullptr;
esp_err_t res = nvs_entry_find(, , NVS_TYPE_ANY, &it);
while(res == ESP_OK) {
nvs_entry_info_t info;
nvs_entry_info(it, &info); // Can omit error check if parameters are guaranteed to be non-NULL
printf("key '%s', type '%d'", info.key, i... | 17 |
ROM SPI Flash
In versions before v5.0, ROM SPI flash functions were included via ``esp32**/rom/spi_flash.h``. Thus, code written to support different ESP chips might be filled with ROM headers of different targets. Furthermore, not all of the APIs could be used on all ESP chips.
Now, the common APIs are extracted ... | 17 |
. code-block:: c
esp_flash_spi_device_config_t dev_cfg = {
// Other members
.freq_mhz = 80,
// Other members
};
Legacy SPI Flash Driver
To make SPI flash drivers more stable, the legacy SPI flash driver is removed from v5.0. The legacy SPI flash driver refers to default spi_flash dri... | 17 |
. note::
New functions with prefix ``esp_flash`` accept an additional ``esp_flash_t*`` parameter. You can simply set it to NULL. This will make the function to run the main flash (``esp_flash_default_chip``).
The ``esp_spi_flash.h`` header is deprecated as system functions are no longer public. To use flash memor... | 17 |
Peripherals
Peripheral Clock Gating
As usual, peripheral clock gating is still handled by driver itself, users do not need to take care of the peripheral module clock gating.
However, for advanced users who implement their own drivers based on ``hal`` and ``soc`` components, the previous clock gating include pat... | 18 |
h`` of either driver triggers the build warning below by default. However, the warning can be suppressed by enabling the :ref:`CONFIG_ADC_SUPPRESS_DEPRECATE_WARN` Kconfig option.
.. code-block:: text
legacy adc driver is deprecated, please migrate to use esp_adc/adc_oneshot.h and esp_adc/adc_continuous.h for ones... | 18 |
.. code-block:: text
legacy adc calibration driver is deprecated, please migrate to use esp_adc/adc_cali.h and esp_adc/adc_cali_scheme.h
API Changes
- The ADC power management APIs ``adc_power_acquire`` and ``adc_power_release`` have made private and moved to ``esp_private/adc_share_hw_ctrl.h``.
- The tw... | 18 |
Hall sensor is no longer supported on ESP32.
- API ``adc_set_i2s_data_source`` and ``adc_i2s_mode_init`` have been deprecated. Related enum ``adc_i2s_source_t`` has been deprecated. Please migrate to use ``esp_adc/adc_continuous.h``.
- API ``adc_digi_filter_reset``, ``adc_digi_filter_set_config``, ``adc_digi_filter_ge... | 18 |
Please use ``rtc_io_desc`` array instead.
- The user callback of a GPIO interrupt should no longer read the GPIO interrupt status register to get the GPIO's pin number of triggering the interrupt. You should use the callback argument to determine the GPIO's pin number instead.
- Previously, when a GPIO interrupt... | 18 |
Thus, users can no longer read the GPIO interrupt status register to determine which pin has triggered the interrupt. Instead, users should use the callback argument to pass the pin number.
.. only:: SOC_SDM_SUPPORTED
Sigma-Delta Modulator
The Sigma-Delta Modulator driver has been redesigned into :doc:... | 18 |
- SDM channel configurations are stored in :cpp:type:`sdm_config_t` now, instead the previous ``sigmadelta_config_t``.
- In the legacy driver, users do not have to set the clock source for SDM channel. But in the new driver, users need to set a proper one in the :cpp:member:`sdm_config_t::clk_src`. The availab... | 18 |
Other parameters like ``gpio number`` and ``prescale`` are only allowed to set during channel allocation.
- Before further channel operations, users should **enable** the channel in advance, by calling :cpp:func:`sdm_channel_enable`. This function helps to manage some system level services, like **Power Management... | 18 |
In the new driver, a timer is represented by :cpp:type:`gptimer_handle_t`.
- Definition of timer clock source is moved to :cpp:type:`gptimer_clock_source_t`, the previous ``timer_src_clk_t`` is not used.
- Definition of timer count direction is moved to :cpp:type:`gptimer_count_direction_t`, the previous ``timer_cou... | 18 |
- Setting and getting count value are done by :cpp:func:`gptimer_get_raw_count` and :cpp:func:`gptimer_set_raw_count`. The driver does not help convert the raw value into UTC time-stamp. Instead, the conversion should be done from user's side as the timer resolution is also known to the user.
- The driver will insta... | 18 |
UART
.. list-table::
:width: 700 px
:header-rows: 1
- Replacement
- Remarks
- None
- UART interrupt handling is implemented by driver itself.
- None
- UART interrupt handling is implemented by driver itself.
- :cpp:member:`uart_config_t::source_clk`
- Select t... | 18 |
h``.
.. only:: SOC_SDMMC_HOST_SUPPORTED
SDMMC
.. list-table::
:width: 700 px
:header-rows: 1
- Replacement
- Remarks
- set ``SDMMC_SLOT_FLAG_INTERNAL_PULLUP`` flag in :cpp:member:`sdmmc_slot_config_t::flags`
- Enable internal pull up.
LEDC
.. li... | 18 |
.. code-block:: text
legacy pcnt driver is deprecated, please migrate to use driver/pulse_cnt.h
The major breaking changes in concept and usage are listed as follows:
Breaking Changes in Concepts
- ``pcnt_port_t``, ``pcnt_unit_t`` and ``pcnt_channel_t`` which used to identify the hard... | 18 |
They are now split into the two factory APIs: :cpp:func:`pcnt_new_unit` and :cpp:func:`pcnt_new_channel` respectively.
- Only the count range is necessary for initializing a PCNT unit. GPIO number assignment has been moved to :cpp:func:`pcnt_new_channel`.
- High/Low control mode and positive/negative ... | 18 |
In the new driver, the PCNT events are enabled/disabled by adding/removing watch points :cpp:func:`pcnt_unit_add_watch_point`, :cpp:func:`pcnt_unit_remove_watch_point`.
- ``pcnt_set_event_value`` is removed. In the new driver, event value is also set when adding watch point by :cpp:func:`pcnt_unit_add_watch_point`... | 18 |
- ``pcnt_filter_enable``, ``pcnt_filter_disable`` and ``pcnt_set_filter_value`` are replaced by :cpp:func:`pcnt_unit_set_glitch_filter`. Meanwhile, ``pcnt_get_filter_value`` has been removed.
- ``pcnt_set_mode`` is replaced by :cpp:func:`pcnt_channel_set_edge_action` and :cpp:func:`pcnt_channel_set_level_actio... | 18 |
h``. However, including ``driver/temp_sensor.h`` triggers the build warning below by default. The warning can be suppressed by enabling the menuconfig option :ref:`CONFIG_TEMP_SENSOR_SUPPRESS_DEPRECATE_WARN`.
.. code-block:: text
legacy temperature sensor driver is deprecated, please migrate to driver/tem... | 18 |
Although it is recommended to use the new driver APIs, the legacy driver is still available in the previous include path ``driver/rmt.h``. However, including ``driver/rmt.h`` triggers the build warning below by default. The warning can be suppressed by the Kconfig option :ref:`CONFIG_RMT_SUPPRESS_DEPRECATE_WARN`.... | 18 |
k.an RMTMEM) directly. Direct access to RMTMEM does not make sense but make mistakes, especially when the RMT channel also connected with a DMA channel.
- ``rmt_mem_owner_t`` is removed, as the ownership is controlled by driver, not by user anymore.
- ``rmt_source_clk_t`` is replaced by :cpp:type:`rmt_clock_sou... | 18 |
Breaking Changes in Usage
- Channel installation has been separated for TX and RX channels into :cpp:func:`rmt_new_tx_channel` and :cpp:func:`rmt_new_rx_channel`.
- ``rmt_set_clk_div`` and ``rmt_get_clk_div`` are removed. Channel clock configuration can only be done during channel installation.
... | 18 |
- ``rmt_memory_rw_rst``, ``rmt_tx_memory_reset`` and ``rmt_rx_memory_reset`` are removed. Memory reset is managed by the driver automatically.
- ``rmt_tx_start`` and ``rmt_rx_start`` are merged into a single function :cpp:func:`rmt_enable`, for both TX and RX channels.
- ``rmt_tx_stop`` and ``rmt_rx_stop``... | 18 |
- ``rmt_set_idle_level`` and ``rmt_get_idle_level`` are removed. Setting IDLE level for TX channel is available in :cpp:member:`rmt_transmit_config_t::eot_level`.
- ``rmt_set_rx_intr_en``, ``rmt_set_err_intr_en``, ``rmt_set_tx_intr_en``, ``rmt_set_tx_thr_intr_en`` and ``rmt_set_rx_thr_intr_en`` are removed. Th... | 18 |
In the new driver, user needs to provide an encoder to "translate" the user data into RMT symbols.
- ``rmt_get_counter_clock`` is removed, as the channel clock resolution is configured by user from :cpp:member:`rmt_tx_channel_config_t::resolution_hz`.
- ``rmt_wait_tx_done`` is replaced by :cpp:func:`rmt_tx_wai... | 18 |
- ``rmt_add_channel_to_group`` and ``rmt_remove_channel_from_group`` are replaced by RMT sync manager. Please refer to :cpp:func:`rmt_new_sync_manager`.
- ``rmt_set_tx_loop_count`` is removed. The loop count in the new driver is configured in :cpp:member:`rmt_transmit_config_t::loop_count`.
- ``rmt_enable_... | 18 |
- ``dc_as_cmd_phase`` is removed. The SPI LCD driver currently does not support a 9-bit SPI LCD. Please always use a dedicated GPIO to control the LCD D/C line.
- The way to register RGB panel event callbacks has been moved from the :cpp:type:`esp_lcd_rgb_panel_config_t` into a separate API :cpp:func:`esp_lcd_rgb_pane... | 18 |
.. only:: SOC_MCPWM_SUPPORTED
MCPWM
MCPWM driver was redesigned (see :doc:`MCPWM `), meanwhile, the legacy driver is deprecated.
The new driver's aim is to make each MCPWM submodule independent to each other, and give the freedom of resource connection back to users.
Although it is recommende... | 18 |
IO control function always needs an object handle, in the first place.
The legacy driver has an inappropriate assumption, that is the MCPWM operator should be connected to different MCPWM timer. In fact, the hardware does not have such limitation. In the new driver, a MCPWM timer can be connected to multiple oper... | 18 |
It increased learning costs for users. In the new driver, the synchronization APIs are unified.
The legacy driver has mixed the concepts of "Fault detector" and "Fault handler". Which make the APIs very confusing to users. In the new driver, the fault object just represents a failure source, and we introduced a n... | 18 |
Fault and sync source are represented by :cpp:type:`mcpwm_fault_handle_t` and :cpp:type:`mcpwm_sync_handle_t`.
- ``mcpwm_capture_signal_t`` is not used. A capture channel is represented by :cpp:type:`mcpwm_cap_channel_handle_t`.
Breaking Changes in Usage
- ``mcpwm_gpio_init`` and ``mcpwm_set_pin``: ... | 18 |
- ``mcpwm_set_frequency``: PWM frequency is determined by :cpp:member:`mcpwm_timer_config_t::resolution_hz`, :cpp:member:`mcpwm_timer_config_t::count_mode` and :cpp:member:`mcpwm_timer_config_t::period_ticks`.
- ``mcpwm_set_duty``: To set the PWM duty cycle, users should call :cpp:func:`mcpwm_comparator_set_co... | 18 |
- ``mcpwm_carrier_init`` is replaced by :cpp:func:`mcpwm_operator_apply_carrier`.
- ``mcpwm_carrier_enable`` and ``mcpwm_carrier_disable``: Enabling and disabling carrier submodule is done automatically by checking whether the carrier configuration structure :cpp:type:`mcpwm_carrier_config_t` is NULL.
- ``... | 18 |
- ``mcpwm_fault_init`` is replaced by :cpp:func:`mcpwm_new_gpio_fault`.
- ``mcpwm_fault_set_oneshot_mode``, ``mcpwm_fault_set_cyc_mode`` are replaced by :cpp:func:`mcpwm_operator_set_brake_on_fault` and :cpp:func:`mcpwm_generator_set_actions_on_brake_event`.
- ``mcpwm_capture_enable`` is removed. It is dup... | 18 |
It is duplicated to :cpp:func:`mcpwm_sync_configure`.
- ``mcpwm_sync_configure`` is replaced by :cpp:func:`mcpwm_timer_set_phase_on_sync`.
- ``mcpwm_sync_disable`` is equivalent to setting :cpp:member:`mcpwm_timer_sync_phase_config_t::sync_src` to ``NULL``.
- ``mcpwm_set_timer_sync_output`` is replaced by ... | 18 |
only:: SOC_I2S_SUPPORTED
I2S Driver
The I2S driver has been redesigned (see :doc:`I2S Driver `), which aims to rectify the shortcomings of the driver that were exposed when supporting all the new features of ESP32-C3 & ESP32-S3. The new driver's APIs are available by including corresponding I2S mode's h... | 18 |
- The TX and RX channels of the same I2S controller can be controlled separately, meaning that they are configured such that they can be started or stopped separately.
- The :cpp:type:`i2s_chan_handle_t` handle type is used to uniquely identify I2S channels. All the APIs require the channel handle and users n... | 18 |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 11