-
Notifications
You must be signed in to change notification settings - Fork 7.6k
[Docs] Add Migration guide + some API updates #8716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
VojtechBartoska
merged 18 commits into
espressif:master
from
P-R-O-C-H-Y:Docs-Migration-guide-rebase
Oct 18, 2023
Merged
Changes from 12 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
fe7d565
Update sigmadelta docs
P-R-O-C-H-Y c9df906
minor docs updates
P-R-O-C-H-Y 2306cb1
Added migration guide to docs
P-R-O-C-H-Y 2d17cfb
Update Introduction to migration guide
P-R-O-C-H-Y 68b5f70
update formatting
P-R-O-C-H-Y 033aa1a
fix typo
P-R-O-C-H-Y 1ef69af
Add BLE breaking changes
P-R-O-C-H-Y 8b6269a
Apply changes from code review by @lucasssvaz
P-R-O-C-H-Y cf7d507
uart migration
P-R-O-C-H-Y 7b2dd2e
Merge branch 'espressif:master' into Docs-Migration-guide-rebase
P-R-O-C-H-Y 7043200
added RMT and UART + links fix
P-R-O-C-H-Y ad2fb13
fix renamed BLE examples
P-R-O-C-H-Y 2dcf8c2
Apply suggestions from code review by @lucasssvaz
P-R-O-C-H-Y 914de14
Change UART driver changes to HardwareSerial changes
P-R-O-C-H-Y 1def2c1
update sigmadelta
P-R-O-C-H-Y c62c17c
Merge branch 'master' into Docs-Migration-guide-rebase
P-R-O-C-H-Y ca0a943
BLE and examples update + rename
P-R-O-C-H-Y 676893d
Merge branch 'master' into Docs-Migration-guide-rebase
P-R-O-C-H-Y File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,192 @@ | ||
######################### | ||
Migration from 2.x to 3.0 | ||
######################### | ||
|
||
Introduction | ||
------------ | ||
|
||
This is a guide to highlight breaking changes in the API and to help the migration of projects from versions 2.X to version 3.0 of the Arduino ESP32 core. | ||
P-R-O-C-H-Y marked this conversation as resolved.
Show resolved
Hide resolved
P-R-O-C-H-Y marked this conversation as resolved.
Show resolved
Hide resolved
|
||
For more information about the changes and new features, check `RELEASE NOTES <https://github.com/espressif/arduino-esp32/releases>`_. | ||
P-R-O-C-H-Y marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
P-R-O-C-H-Y marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ADC | ||
--- | ||
|
||
Removed APIs | ||
************ | ||
|
||
* ``analogSetClockDiv`` | ||
* ``adcAttachPin`` | ||
* ``analogSetVRefPin`` | ||
|
||
BLE | ||
--- | ||
|
||
Changes in APIs | ||
*************** | ||
|
||
* Changed APIs return and parameter type from ``std::string`` to Arduino style ``String``. | ||
* Changed UUID data type from ``uint16_t`` to ``BLEUUID`` class. | ||
|
||
Hall Sensor | ||
----------- | ||
|
||
Hall sensor is no longer supported. | ||
|
||
Removed APIs | ||
************ | ||
|
||
* ``hallRead`` | ||
|
||
I2S | ||
--- | ||
|
||
The I2S driver has been completely redesigned and refactored to use the new ESP-IDF driver. | ||
For more information about the new API, check :doc:`/api/i2s`. | ||
|
||
LEDC | ||
---- | ||
|
||
The LEDC API has been changed in order to support the Peripheral Manager and make it easier to use, as LEDC channels are now automatically assigned to pins. | ||
For more information about the new API, check :doc:`/api/ledc`. | ||
|
||
Removed APIs | ||
************ | ||
|
||
* ``ledcSetup`` | ||
* ``ledcAttachPin`` | ||
|
||
New APIs | ||
******** | ||
|
||
* ``ledcAttach`` used to set up the LEDC pin (merged ``ledcSetup`` and ``ledcAttachPin`` functions). | ||
* ``timerGetFrequency`` used to get the actual frequency of the timer. | ||
* ``timerAttachInterruptArg`` used to attach the interrupt to a timer using arguments. | ||
|
||
Changes in APIs | ||
*************** | ||
|
||
* ``ledcDetachPin`` renamed to ``ledcDetach``. | ||
* In all functions, input parameter ``channel`` has been changed to ``pin``. | ||
|
||
RMT | ||
--- | ||
|
||
For more information about the new API, check :doc:`/api/rmt`. | ||
|
||
Removed APIs | ||
************ | ||
|
||
* ``_rmtDumpStatus`` | ||
* ``rmtSetTick`` | ||
* ``rmtWriteBlocking`` | ||
* ``rmtEnd`` | ||
* ``rmtBeginReceive`` | ||
* ``rmtReadData`` | ||
|
||
New APIs | ||
******** | ||
|
||
* ``rmtWriteAsync`` | ||
* ``rmtTransmitCompleted`` | ||
* ``rmtSetRxMinThreshold`` | ||
|
||
|
||
Changes in APIs | ||
*************** | ||
|
||
* In all functions, input parameter ``rmt_obj_t* rmt`` has been changed to ``int pin``. | ||
* ``rmtInit`` return parameter changed to bool. | ||
* ``rmtInit`` input parameter ``bool tx_not_rx`` has been changed to ``rmt_ch_dir_t channel_direction``. | ||
* ``rmtInit`` new input parameter ``uint32_t frequency_Hz`` to set frequency of RMT channel as function ``rmtSetTick`` was removed. | ||
P-R-O-C-H-Y marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* ``rmtWrite`` now sending data in blocking mode - only returns after sending all data or by timeout. For Async mode use new ``rmtWriteAsync`` function. | ||
P-R-O-C-H-Y marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* ``rmtWrite`` new input parameter ``uint32_t timeout_ms``. | ||
* ``rmtLoop`` renamed to ``rmtWriteLooping``. | ||
* ``rmtRead`` input parameters changed to ``int pin, rmt_data_t* data, size_t *num_rmt_symbols, uint32_t timeout_ms``. | ||
* ``rmtReadAsync`` input parameters changed to ``int pin, rmt_data_t* data, size_t *num_rmt_symbols``. | ||
* ``rmtSetRxThreshold`` renamed to ``rmtSetRxMaxThreshold`` and input parameter ``uint32_t value`` has been changed to ``uint16_t idle_thres_ticks``. | ||
* ``rmtSetCarrier`` input parameters ``uint32_t low, uint32_t high`` has been changed to ``uint32_t frequency_Hz, float duty_percent``. | ||
P-R-O-C-H-Y marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
SigmaDelta | ||
---------- | ||
|
||
SigmaDelta has been refactored to use the new ESP-IDF driver. | ||
For more information about the new API, check :doc:`/api/sigmadelta`. | ||
|
||
Removed APIs | ||
************ | ||
|
||
* ``sigmaDeltaSetup`` | ||
* ``sigmaDeltaRead`` | ||
|
||
New APIs | ||
******** | ||
|
||
* ``sigmaDeltaAttach`` used to set up the SigmaDelta pin (channel is acquired automatically). | ||
* ``timerGetFrequency`` used to get the actual frequency of the timer. | ||
* ``timerAttachInterruptArg`` used to attach the interrupt to a timer using arguments. | ||
|
||
Changes in APIs | ||
*************** | ||
|
||
* ``sigmaDeltaDetachPin`` renamed to ``sigmaDeltaDetach``. | ||
* ``sigmaDeltaWrite`` input parameter ``channel`` has been changed to ``pin``. | ||
|
||
Timer | ||
----- | ||
|
||
Timer has been refactored to use the new ESP-IDF driver and its API got simplified. For more information about the new API check :doc:`/api/timer`. | ||
|
||
Removed APIs | ||
************ | ||
|
||
* ``timerGetConfig`` | ||
* ``timerSetConfig`` | ||
* ``timerSetDivider`` | ||
* ``timerSetCountUp`` | ||
* ``timerSetAutoReload`` | ||
* ``timerGetDivider`` | ||
* ``timerGetCountUp`` | ||
* ``timerGetAutoReload`` | ||
* ``timerAlarmEnable`` | ||
* ``timerAlarmDisable`` | ||
* ``timerAlarmWrite`` | ||
* ``timerAlarmEnabled`` | ||
* ``timerAlarmRead`` | ||
* ``timerAlarmReadMicros`` | ||
* ``timerAlarmReadSeconds`` | ||
* ``timerAttachInterruptFlag`` | ||
|
||
New APIs | ||
******** | ||
|
||
* ``timerAlarm`` used to set up Alarm for the timer and enable it automatically (merged ``timerAlarmWrite`` and ``timerAlarmEnable`` functions). | ||
* ``timerGetFrequency`` used to get the actual frequency of the timer. | ||
* ``timerAttachInterruptArg`` used to attach the interrupt to a timer using arguments. | ||
|
||
Changes in APIs | ||
*************** | ||
|
||
* ``timerBegin`` has now only 1 parameter (frequency). There is an automatic calculation of the divider using different clock sources | ||
to achieve the selected frequency. | ||
* ``timerAttachInterrupt`` has now only 2 parameters. The ``edge`` parameter has been removed. | ||
|
||
UART | ||
---- | ||
|
||
Removed APIs | ||
************ | ||
|
||
* ``uartDetachPins`` | ||
P-R-O-C-H-Y marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
New APIs | ||
******** | ||
|
||
* ``uart_get_RxPin`` used to get UART RX pin number. | ||
* ``uart_get_TxPin`` used to get UART TX pin number. | ||
|
||
P-R-O-C-H-Y marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Changes in APIs | ||
*************** | ||
|
||
* ``uartEnd`` input parameter ``uart_t* uart`` has been changed to ``uint8_t uart_num``. | ||
* ``uartSetMode`` input parameter ``uint8_t mode`` has been changed to ``uart_mode_t mode``. | ||
* ``uartSetHwFlowCtrlMode`` input parameter ``uint8_t mode`` has been changed to ``uart_hw_flowcontrol_t mode``. | ||
P-R-O-C-H-Y marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
############### | ||
Migration Guide | ||
############### | ||
|
||
.. toctree:: | ||
:caption: Migration Guide: | ||
:maxdepth: 1 | ||
:glob: | ||
|
||
* |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.