spi: fix dma wrong mode when using eh1 blocking api (#1541)

* spi: fix dma wrong mode when using eh1 blocking api

* spi: fix dma blocking eh1 type

* Update CHANGELOG.md

* Make ErrorType generic over mode
This commit is contained in:
Kortan 2024-05-09 14:29:20 +08:00 committed by GitHub
parent df2b7bd847
commit 2c1e66e9b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed division by zero in ledc embedded_hal::pwm set_duty_cycle function and converted to set_duty_hw instead of set_duty to eliminate loss of granularity. (#1441)
- Embassy examples now build on stable (#1485)
- Fix delay on esp32h2 (#1535)
- spi: fix dma wrong mode when using eh1 blocking api (#1541)
### Changed

View File

@ -1614,17 +1614,18 @@ pub mod dma {
use super::*;
impl<'d, T, C, M> ErrorType for SpiDma<'d, T, C, M, crate::Async>
impl<'d, T, C, M, DmaMode> ErrorType for SpiDma<'d, T, C, M, DmaMode>
where
T: InstanceDma<C::Tx<'d>, C::Rx<'d>>,
C: ChannelTypes,
C::P: SpiPeripheral,
M: IsFullDuplex,
DmaMode: Mode,
{
type Error = Error;
}
impl<'d, T, C, M> SpiBus for SpiDma<'d, T, C, M, crate::Async>
impl<'d, T, C, M> SpiBus for SpiDma<'d, T, C, M, crate::Blocking>
where
T: InstanceDma<C::Tx<'d>, C::Rx<'d>>,
C: ChannelTypes,