commit
f3237d7a2c
1 changed files with 6 additions and 4 deletions
|
@ -348,6 +348,7 @@ mod uart_rx {
|
||||||
jmp start ; Don't push data if we didn't see good framing.
|
jmp start ; Don't push data if we didn't see good framing.
|
||||||
|
|
||||||
good_rx_stop: ; No delay before returning to start; a little slack is
|
good_rx_stop: ; No delay before returning to start; a little slack is
|
||||||
|
in null 24
|
||||||
push ; important in case the TX clock is slightly too fast.
|
push ; important in case the TX clock is slightly too fast.
|
||||||
"#
|
"#
|
||||||
);
|
);
|
||||||
|
@ -361,8 +362,9 @@ mod uart_rx {
|
||||||
sm_rx.set_pin_dirs(Direction::In, &[&rx_pin]);
|
sm_rx.set_pin_dirs(Direction::In, &[&rx_pin]);
|
||||||
|
|
||||||
cfg.clock_divider = (U56F8!(125_000_000) / (8 * baud)).to_fixed();
|
cfg.clock_divider = (U56F8!(125_000_000) / (8 * baud)).to_fixed();
|
||||||
cfg.shift_out.auto_fill = false;
|
cfg.shift_in.auto_fill = false;
|
||||||
cfg.shift_out.direction = ShiftDirection::Right;
|
cfg.shift_in.direction = ShiftDirection::Right;
|
||||||
|
cfg.shift_in.threshold = 32;
|
||||||
cfg.fifo_join = FifoJoin::RxOnly;
|
cfg.fifo_join = FifoJoin::RxOnly;
|
||||||
sm_rx.set_config(&cfg);
|
sm_rx.set_config(&cfg);
|
||||||
sm_rx.set_enable(true);
|
sm_rx.set_enable(true);
|
||||||
|
|
Loading…
Reference in a new issue