Cleanup for swapped connections
This commit is contained in:
parent
f9f6808d65
commit
9c4e0c109e
26
src/main.rs
26
src/main.rs
|
@ -85,19 +85,19 @@ fn main() -> ! {
|
|||
|
||||
let mut led_pin = pins.led.into_push_pull_output();
|
||||
|
||||
let mut row_data_pin = pins.gpio2.into_push_pull_output();
|
||||
let mut row_clock_pin = pins.gpio3.into_push_pull_output();
|
||||
let mut row_data_pin = pins.gpio4.into_push_pull_output();
|
||||
let mut row_clock_pin = pins.gpio5.into_push_pull_output();
|
||||
|
||||
let mut col_data_pin = pins.gpio4.into_push_pull_output();
|
||||
let mut col_clock_pin = pins.gpio5.into_push_pull_output();
|
||||
let mut col_data_pin = pins.gpio2.into_push_pull_output();
|
||||
let mut col_clock_pin = pins.gpio3.into_push_pull_output();
|
||||
|
||||
let mut white_pin = pins.gpio6.into_push_pull_output();
|
||||
let mut black_pin = pins.gpio7.into_push_pull_output();
|
||||
let mut strobe_pin = pins.gpio8.into_push_pull_output();
|
||||
|
||||
loop {
|
||||
for x in 0..24 {
|
||||
for y in 0..16 {
|
||||
for y in 0..16 {
|
||||
for x in 0..20 {
|
||||
shift_out_bits(
|
||||
1 << y,
|
||||
16,
|
||||
|
@ -116,7 +116,7 @@ fn main() -> ! {
|
|||
|
||||
black_pin.set_high();
|
||||
strobe_pin.set_high();
|
||||
delay.delay_ms(20);
|
||||
delay.delay_ms(5);
|
||||
strobe_pin.set_low();
|
||||
black_pin.set_low();
|
||||
|
||||
|
@ -126,20 +126,20 @@ fn main() -> ! {
|
|||
|
||||
led_pin.set_high().unwrap();
|
||||
|
||||
for y in 0..24 {
|
||||
shift_out_bits(0, 16, &mut row_clock_pin, &mut row_data_pin, &mut delay);
|
||||
for y in 0..16 {
|
||||
shift_out_bits(0, 24, &mut col_clock_pin, &mut col_data_pin, &mut delay);
|
||||
|
||||
shift_out_bits(
|
||||
1 << y,
|
||||
24,
|
||||
&mut col_clock_pin,
|
||||
&mut col_data_pin,
|
||||
16,
|
||||
&mut row_clock_pin,
|
||||
&mut row_data_pin,
|
||||
&mut delay,
|
||||
);
|
||||
|
||||
white_pin.set_high();
|
||||
strobe_pin.set_high();
|
||||
delay.delay_ms(20);
|
||||
delay.delay_ms(5);
|
||||
strobe_pin.set_low();
|
||||
white_pin.set_low();
|
||||
|
||||
|
|
Loading…
Reference in New Issue