Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- CAN: fix wrong Alert enum indexing / remove wrong TryFromPrimitive derive (#532)
- GPIO: Allow interoperability with other code that initializes the GPIO ISR service (#537)
- SD card support is no longer behind the `experimental` feature
- SPI: Do not crash in SpiDriver::Drop implementation.

## [0.45.2] - 2025-01-15

Expand Down
4 changes: 3 additions & 1 deletion src/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,9 @@ impl<'d> SpiDriver<'d> {

impl Drop for SpiDriver<'_> {
fn drop(&mut self) {
esp!(unsafe { spi_bus_free(self.host()) }).unwrap();
if let Err(e) = esp!(unsafe { spi_bus_free(self.host()) }) {
::log::error!("Unable to free spi bus: {e:?}");
}
}
}

Expand Down