Remove unnecessary generic from ChannelHW (#2387)

* Remove unnecessary generic from ChannelHW

* Changelog
This commit is contained in:
Dániel Buga 2024-10-22 17:41:42 +02:00 committed by GitHub
parent 54d4407042
commit 1afc9eef89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 5 deletions

View File

@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed
- The `i2s::{I2sWrite, I2sWriteDma, I2sRead, I2sReadDma, I2sWriteDmaAsync, I2sReadDmaAsync}` traits have been removed. (#2316)
- The `ledc::ChannelHW` trait is no longer generic. (#2387)
## [0.21.1]

View File

@ -97,7 +97,7 @@ pub mod config {
/// Channel interface
pub trait ChannelIFace<'a, S: TimerSpeed + 'a, O: PeripheralOutput + 'a>
where
Channel<'a, S, O>: ChannelHW<O>,
Channel<'a, S, O>: ChannelHW,
{
/// Configure channel
fn configure(&mut self, config: config::Config<'a, S>) -> Result<(), Error>;
@ -118,7 +118,7 @@ where
}
/// Channel HW interface
pub trait ChannelHW<O: PeripheralOutput> {
pub trait ChannelHW {
/// Configure Channel HW except for the duty which is set via
/// [`Self::set_duty_hw`].
fn configure_hw(&mut self) -> Result<(), Error>;
@ -167,7 +167,7 @@ impl<'a, S: TimerSpeed, O: PeripheralOutput> Channel<'a, S, O> {
impl<'a, S: TimerSpeed, O: PeripheralOutput> ChannelIFace<'a, S, O> for Channel<'a, S, O>
where
Channel<'a, S, O>: ChannelHW<O>,
Channel<'a, S, O>: ChannelHW,
{
/// Configure channel
fn configure(&mut self, config: config::Config<'a, S>) -> Result<(), Error> {
@ -312,7 +312,7 @@ mod ehal1 {
impl<'a, S: TimerSpeed, O: OutputPin> SetDutyCycle for Channel<'a, S, O>
where
Channel<'a, S, O>: ChannelHW<O>,
Channel<'a, S, O>: ChannelHW,
{
fn max_duty_cycle(&self) -> u16 {
let duty_exp;
@ -535,7 +535,7 @@ impl<'a, O: PeripheralOutput, S: crate::ledc::timer::TimerSpeed> Channel<'a, S,
}
}
impl<'a, O, S> ChannelHW<O> for Channel<'a, S, O>
impl<'a, O, S> ChannelHW for Channel<'a, S, O>
where
O: PeripheralOutput,
S: crate::ledc::timer::TimerSpeed,