Skip to content

Commit fa24ef5

Browse files
committed
Remove wrap function
1 parent f9c2400 commit fa24ef5

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

examples/pwm-demo/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ const APP: () = {
218218
pwm.stop();
219219
*status = AppStatus::Idle;
220220
}
221-
ctx.resources.pwm.replace(pwm.wrap(Some(BUF0), Some(BUF1)));
221+
*ctx.resources.pwm = pwm.load(Some(BUF0), Some(BUF1), false).ok();
222222
}
223223
_ => {
224224
rprintln!("DEMO 3: Manually step through sequence");

nrf-hal-common/src/pwm.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -586,26 +586,6 @@ where
586586
})
587587
}
588588

589-
/// Wraps `Pwm<T>` and the given sequence buffers in a `PwmSeq`, without loading the buffers.
590-
#[allow(unused_mut)]
591-
pub fn wrap<B0, B1>(
592-
mut self,
593-
seq0_buffer: Option<B0>,
594-
seq1_buffer: Option<B1>,
595-
) -> PwmSeq<T, B0, B1>
596-
where
597-
B0: ReadBuffer<Word = u16> + 'static,
598-
B1: ReadBuffer<Word = u16> + 'static,
599-
{
600-
PwmSeq {
601-
inner: Some(Inner {
602-
seq0_buffer,
603-
seq1_buffer,
604-
pwm: self,
605-
}),
606-
}
607-
}
608-
609589
/// Enables interrupt triggering on the specified event.
610590
#[inline(always)]
611591
pub fn enable_interrupt(&self, event: PwmEvent) -> &Self {

0 commit comments

Comments
 (0)