Please note that only changes to the esp-hal
package are tracked in these release notes.
esp-hal@0.16.x
Migration Guide
This release consolidates the various chip-specific HAL packages into a single package, esp-hal
. Projects which previously depended on the chip-specific packages (esp32-hal
, esp32c3-hal
, etc.) should be updated to use esp-hal
instead.
We now have self-hosted documentation built for each supported chip! See https://docs.esp-rs.org/esp-hal/ for more details.
In order to migrate your project to the latest release, please follow the short guide below.
If you encounter any issues during the migration process, please open an issue, and we will do our best to resolve them as expediently as possible.
Migrating toesp-hal
In general, only two steps should be required for this migration:
Depending on which features you are using, there may be some additional changes required. Please refer to the esp-hal
documentation for a full list of features.
First, update your dependencies in Cargo.toml
and enable the appropriate feature for the chip being targeted.
For example, if your project previously depended on esp32c3-hal
then open your project's Cargo.toml
file and make the following change:
- esp32c3-hal = "0.15.0" + esp-hal = { version = "0.16.0", features = ["esp32c3"] }Update Imports
Next, update any references to the chip-specific HAL package (e.g. esp32c3-hal
) in your project's source files. This can likely be done with a global search-and-replace in your favourite text editor.
In general this will only affect imports, e.g.:
- use esp32c3_hal::*; + use esp_hal::*;Changelog Added
embedded_hal::pwm::SetDutyCycle
trait for ledc::channel::Channel
(#1097)RngCore
trait is implemented (#1122)stack-protector
feature (#1135)ESP32-P4
(#1145)estimate_xtal_frequency
for ESP32-C6 / ESP32-H2 (#1174)LP-I2C
driver for C6 (#1185)InterruptExecutor::spawner()
(#1211)get_raw_core
on Xtensa (#1126)hello_rgb
example for ESP32 (#1173)now
for esp32c3 and esp32c6 (#1178)esp-hal-common
package is now called esp-hal
(#1131)Trace
driver to be generic around its peripheral (#1140)RtcClock::estimate_xtal_frequency()
(#1165)xtal-26mhz
and xtal-40mhz
features (#1165)ADC
and DAC
drivers now take virtual peripherals in their constructors, instead of splitting APB_SARADC
/SENS
(#1100)DAC
driver's constructor is now new
instead of dac
, to be more consistent with other APIs (#1100)Dma
for devices with both PDMA and GDMA controllers (#1125)ADC
driver's constructor is now new
instead of adc
, to be more consistent with other APIs (#1133)embassy-executor
's integrated-timers
is no longer enabled by default.embassy-time-systick
to embassy-time-systick-16mhz
for use with all chips with a systimer, except esp32s2
. Added embassy-time-systick-80mhz
specifically for the esp32s2
. (#1247)RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4