mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-22 06:42:32 +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);
|
pub struct PwmBatch(u32);
|
||||||
|
|
||||||
impl PwmBatch {
|
impl PwmBatch {
|
||||||
|
#[inline]
|
||||||
|
pub fn new() -> Self{
|
||||||
|
Self(0)
|
||||||
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
/// Enable a PWM slice in this batch.
|
/// Enable a PWM slice in this batch.
|
||||||
pub fn enable(&mut self, pwm: &Pwm<'_>) {
|
pub fn enable(&mut self, pwm: &Pwm<'_>) {
|
||||||
|
Loading…
Reference in New Issue
Block a user