0.16.0
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 to esp-hal
In general, only two steps should be required for this migration:
- Update your dependencies in the Cargo manifest
- Update any references to the HAL in your project's source files
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.
Updating Dependencies
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
- Add initial support for the ESP32-P4 (#1101)
- Implement
embedded_hal::pwm::SetDutyCycle
trait forledc::channel::Channel
(#1097) - ESP32-P4: Add initial GPIO support (#1109)
- ESP32-P4: Add initial support for interrupts (#1112)
- ESP32-P4: Add efuse reading support (#1114)
- ESP32-S3: Added LCD_CAM I8080 driver (#1086)
- Allow for splitting of the USB Serial JTAG peripheral into tx/rx components (#1024)
RngCore
trait is implemented (#1122)- Support Rust's
stack-protector
feature (#1135) - Adding clock support for
ESP32-P4
(#1145) - Implementation OutputPin and InputPin for AnyPin (#1067)
- Implement
estimate_xtal_frequency
for ESP32-C6 / ESP32-H2 (#1174) - A way to push into I2S DMA buffer via a closure (#1189)
- Added basic
LP-I2C
driver for C6 (#1185) - Ensuring that the random number generator is TRNG. (#1200)
- ESP32-C6: Add timer wakeup source for deepsleep (#1201)
- Introduce
InterruptExecutor::spawner()
(#1211)
Fixed
- Fix embassy-time tick rate not set when using systick as the embassy timebase (#1124)
- Fix
get_raw_core
on Xtensa (#1126) - Fix docs.rs documentation builds (#1129)
- Fix circular DMA (#1144)
- Fix
hello_rgb
example for ESP32 (#1173) - Fixed the multicore critical section on Xtensa (#1175)
- Fix timer
now
for esp32c3 and esp32c6 (#1178) - Wait for registers to get synced before reading the timer count for all chips (#1183)
- Fix I2C error handling (#1184)
- Fix circular DMA (#1189)
- Fix esp32c3 uart initialization (#1156)
- Fix ESP32-S2 I2C read (#1214)
- Reset/init UART if it's not the console UART (#1213)
Changed
- DmaDescriptor struct to better model the hardware (#1054)
- DMA descriptor count no longer needs to be multiplied by 3 (#1054)
- RMT channels no longer take the channel number as a generic param (#959)
- The
esp-hal-common
package is now calledesp-hal
(#1131) - Refactor the
Trace
driver to be generic around its peripheral (#1140) - Auto detect crystal frequency based on
RtcClock::estimate_xtal_frequency()
(#1165) - ESP32-S3: Configure 32k ICACHE (#1169)
- Lift the minimal buffer size requirement for I2S (#1189)
Removed
- Remove
xtal-26mhz
andxtal-40mhz
features (#1165) - All chip-specific HAL packages have been removed (#1196)
Breaking
ADC
andDAC
drivers now take virtual peripherals in their constructors, instead of splittingAPB_SARADC
/SENS
(#1100)- The
DAC
driver's constructor is nownew
instead ofdac
, to be more consistent with other APIs (#1100) - The DMA peripheral is now called
Dma
for devices with both PDMA and GDMA controllers (#1125) - The
ADC
driver's constructor is nownew
instead ofadc
, to be more consistent with other APIs (#1133) embassy-executor
'sintegrated-timers
is no longer enabled by default.- Renamed
embassy-time-systick
toembassy-time-systick-16mhz
for use with all chips with a systimer, exceptesp32s2
. Addedembassy-time-systick-80mhz
specifically for theesp32s2
. (#1247)