interrupt is wrong
This commit is contained in:
@@ -105,13 +105,14 @@ async fn main(spawner: Spawner) {
|
|||||||
tim.enable_update_interrupt(true);
|
tim.enable_update_interrupt(true);
|
||||||
tim.start();
|
tim.start();
|
||||||
|
|
||||||
|
tx.set_high();
|
||||||
loop {
|
loop {
|
||||||
|
|
||||||
TIM2_TICK.wait().await;
|
|
||||||
tx.set_high();
|
|
||||||
TIM2_TICK.wait().await;
|
TIM2_TICK.wait().await;
|
||||||
tx.set_low();
|
tx.set_low();
|
||||||
|
TIM2_TICK.wait().await;
|
||||||
|
|
||||||
|
Timer::after(Duration::from_millis(1000)).await;
|
||||||
// Poll RX pipe for new data (non-blocking)
|
// Poll RX pipe for new data (non-blocking)
|
||||||
if let Ok(n) = UART_RX.try_read(&mut rx_buf) {
|
if let Ok(n) = UART_RX.try_read(&mut rx_buf) {
|
||||||
if n > 0 {
|
if n > 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user