Add new() method to PwmBatch so it can be istantiated.

This commit is contained in:
Vincenzo Marturano 2024-10-24 16:04:32 +02:00
parent 2596de52bb
commit 31662eaeef

View File

@ -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<'_>) {