aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/rp/src/bin/pio_hd44780.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/examples/rp/src/bin/pio_hd44780.rs b/examples/rp/src/bin/pio_hd44780.rs
index c3466b554..40dee1c4d 100644
--- a/examples/rp/src/bin/pio_hd44780.rs
+++ b/examples/rp/src/bin/pio_hd44780.rs
@@ -7,7 +7,7 @@ use core::fmt::Write;
7use embassy_executor::Spawner; 7use embassy_executor::Spawner;
8use embassy_rp::dma::{AnyChannel, Channel}; 8use embassy_rp::dma::{AnyChannel, Channel};
9use embassy_rp::peripherals::PIO0; 9use embassy_rp::peripherals::PIO0;
10use embassy_rp::pio::{FifoJoin, Pio, PioPin, ShiftDirection, StateMachine}; 10use embassy_rp::pio::{Direction, FifoJoin, Pio, PioPin, ShiftDirection, StateMachine};
11use embassy_rp::pwm::{Config, Pwm}; 11use embassy_rp::pwm::{Config, Pwm};
12use embassy_rp::relocate::RelocatedProgram; 12use embassy_rp::relocate::RelocatedProgram;
13use embassy_rp::{into_ref, Peripheral, PeripheralRef}; 13use embassy_rp::{into_ref, Peripheral, PeripheralRef};
@@ -115,12 +115,7 @@ impl<'l> HD44780<'l> {
115 let db6 = common.make_pio_pin(db6); 115 let db6 = common.make_pio_pin(db6);
116 let db7 = common.make_pio_pin(db7); 116 let db7 = common.make_pio_pin(db7);
117 117
118 sm0.set_set_pins(&[&rs, &rw]); 118 sm0.set_pin_dirs(Direction::Out, &[&rs, &rw, &e, &db4, &db5, &db6, &db7]);
119 embassy_rp::pio_instr_util::set_pindir(&mut sm0, 0b11);
120 sm0.set_set_pins(&[&e]);
121 embassy_rp::pio_instr_util::set_pindir(&mut sm0, 0b1);
122 sm0.set_set_pins(&[&db4, &db5, &db6, &db7]);
123 embassy_rp::pio_instr_util::set_pindir(&mut sm0, 0b11111);
124 119
125 let relocated = RelocatedProgram::new(&prg.program); 120 let relocated = RelocatedProgram::new(&prg.program);
126 sm0.use_program(&common.load_program(&relocated), &[&e]); 121 sm0.use_program(&common.load_program(&relocated), &[&e]);