Viewing file on branch master
| / | fw | RustFM | src | rf.rs |
| 1 | use embassy_stm32::{ |
| 2 | gpio::{AnyPin, Level, Output, Speed}, |
| 3 | Peri, |
| 4 | }; |
| 5 | use embassy_time::Timer; |
| 6 | |
| 7 | #[embassy_executor::task] |
| 8 | pub async fn transmit(p: Peri<'static, AnyPin>) { |
| 9 | let mut txpin = Output::new(p, Level::Low, Speed::VeryHigh); |
| 10 | // txpin.set_low(); |
| 11 | // Timer::after_millis(1).await; |
| 12 | // txpin.set_high(); |
| 13 | // Timer::after_millis(1).await; |
| 14 | // txpin.set_low(); |
| 15 | |
| 16 | loop { |
| 17 | txpin.toggle(); |
| 18 | Timer::after_millis(1).await; |
| 19 | } |
| 20 | } |
| 21 |