Merge pull request #2667 from timokroeger/stm32-anychannel-fix

stm32: Implement `Channel` trait for `AnyChannel`
This commit is contained in:
Dario Nieuwenhuis 2024-03-07 15:18:32 +00:00 committed by GitHub
commit b2d236ee39
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -96,6 +96,13 @@ impl AnyChannel {
}
}
impl sealed::Channel for AnyChannel {
fn id(&self) -> u8 {
self.id
}
}
impl Channel for AnyChannel {}
const CHANNEL_COUNT: usize = crate::_generated::DMA_CHANNELS.len();
static STATE: [ChannelState; CHANNEL_COUNT] = [ChannelState::NEW; CHANNEL_COUNT];