mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 00:02:28 +00:00
Add new() method to PwmBatch so it can be istantiated.
This commit is contained in:
parent
2596de52bb
commit
31662eaeef
@ -406,6 +406,10 @@ impl SetDutyCycle for PwmOutput {
|
||||
pub struct PwmBatch(u32);
|
||||
|
||||
impl PwmBatch {
|
||||
#[inline]
|
||||
pub fn new() -> Self{
|
||||
Self(0)
|
||||
}
|
||||
#[inline]
|
||||
/// Enable a PWM slice in this batch.
|
||||
pub fn enable(&mut self, pwm: &Pwm<'_>) {
|
||||
|
Loading…
Reference in New Issue
Block a user