diff options
| author | Vincenzo Marturano <[email protected]> | 2024-10-24 16:04:32 +0200 |
|---|---|---|
| committer | Vincenzo Marturano <[email protected]> | 2024-10-24 16:04:32 +0200 |
| commit | 31662eaeef0762a7c7b9c95aee61a9066d7e447a (patch) | |
| tree | 8557c028264b2118b219d95fabb074d0f2ee8a94 /embassy-rp | |
| parent | 2596de52bba32b0d1e755ab18909c10a9e663aad (diff) | |
Add new() method to PwmBatch so it can be istantiated.
Diffstat (limited to 'embassy-rp')
| -rw-r--r-- | embassy-rp/src/pwm.rs | 4 |
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 | ||
| 408 | impl PwmBatch { | 408 | impl 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(); |
