aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincenzo Marturano <[email protected]>2024-10-24 16:04:32 +0200
committerVincenzo Marturano <[email protected]>2024-10-24 16:04:32 +0200
commit31662eaeef0762a7c7b9c95aee61a9066d7e447a (patch)
tree8557c028264b2118b219d95fabb074d0f2ee8a94
parent2596de52bba32b0d1e755ab18909c10a9e663aad (diff)
Add new() method to PwmBatch so it can be istantiated.
-rw-r--r--embassy-rp/src/pwm.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/embassy-rp/src/pwm.rs b/embassy-rp/src/pwm.rs
index 66f0dc7f2..4da5e5e28 100644
--- a/embassy-rp/src/pwm.rs
+++ b/embassy-rp/src/pwm.rs
@@ -407,6 +407,10 @@ pub struct PwmBatch(u32);
407 407
408impl PwmBatch { 408impl PwmBatch {
409 #[inline] 409 #[inline]
410 pub fn new() -> Self{
411 Self(0)
412 }
413 #[inline]
410 /// Enable a PWM slice in this batch. 414 /// Enable a PWM slice in this batch.
411 pub fn enable(&mut self, pwm: &Pwm<'_>) { 415 pub fn enable(&mut self, pwm: &Pwm<'_>) {
412 self.0 |= pwm.bit(); 416 self.0 |= pwm.bit();