Skip to content

Commit 5e49954

Browse files
committed
Add typestate-based control over the PIO RX buffer access
Fixes #935.
1 parent 38d28bd commit 5e49954

File tree

2 files changed

+321
-73
lines changed

2 files changed

+321
-73
lines changed

rp235x-hal-examples/src/bin/pio_putget.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use rp235x_hal as hal;
99

1010
use hal::gpio::{FunctionPio0, Pin};
11-
use hal::pio::Buffers;
1211
use hal::pio::PIOExt;
1312
use hal::Sio;
1413

@@ -75,7 +74,7 @@ fn main() -> ! {
7574
let installed = pio.install(&program.program).unwrap();
7675
let (mut sm, _, _) = hal::pio::PIOBuilder::from_installed_program(installed)
7776
.set_pins(led_pin_id, 1)
78-
.buffers(Buffers::RxPutGet)
77+
.with_rx_putget()
7978
.build(sm0);
8079
sm.set_pindirs([(led_pin_id, hal::pio::PinDir::Output)]);
8180
sm.start();

0 commit comments

Comments
 (0)