Update comments in examples/pio_blink.rs

This commit is contained in:
Jan Niehusmann 2021-09-26 13:51:48 +00:00
parent b79f859d72
commit c93ea0b97c

View file

@ -39,13 +39,17 @@ fn main() -> ! {
let mut wrap_source = a.label(); let mut wrap_source = a.label();
// Set pin as Out // Set pin as Out
a.set(pio::SetDestination::PINDIRS, 1); a.set(pio::SetDestination::PINDIRS, 1);
// Define begin of program loop
a.bind(&mut wrap_target); a.bind(&mut wrap_target);
// Set pin low // Set pin low
a.set_with_delay(pio::SetDestination::PINS, 0, MAX_DELAY); a.set_with_delay(pio::SetDestination::PINS, 0, MAX_DELAY);
// Set pin high // Set pin high
a.set_with_delay(pio::SetDestination::PINS, 1, MAX_DELAY); a.set_with_delay(pio::SetDestination::PINS, 1, MAX_DELAY);
// NOP // Define end of program loop
a.bind(&mut wrap_source); a.bind(&mut wrap_source);
// The labels wrap_target and wrap_source, as set above,
// define a loop which is executed repeatedly by the PIO
// state machine.
let program = a.assemble_with_wrap(wrap_source, wrap_target); let program = a.assemble_with_wrap(wrap_source, wrap_target);
// Initialize and start PIO // Initialize and start PIO