diff options
| author | Bob McWhirter <[email protected]> | 2021-11-02 14:43:42 -0400 |
|---|---|---|
| committer | Bob McWhirter <[email protected]> | 2021-11-02 14:43:42 -0400 |
| commit | 3ab17758203cefa3da5df534ba1e1d2da7670f22 (patch) | |
| tree | cc475d35ecf0a146f84acf2d1931c0c5d055c4a7 /examples/stm32u5/src/bin | |
| parent | 705523d0eaf6ae30901e04a1fb51ab47425cd2a4 (diff) | |
Add STM32U5 example.
Diffstat (limited to 'examples/stm32u5/src/bin')
| -rw-r--r-- | examples/stm32u5/src/bin/boot.rs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/examples/stm32u5/src/bin/boot.rs b/examples/stm32u5/src/bin/boot.rs new file mode 100644 index 000000000..b1e71fbea --- /dev/null +++ b/examples/stm32u5/src/bin/boot.rs | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | #![no_std] | ||
| 2 | #![no_main] | ||
| 3 | #![feature(type_alias_impl_trait)] | ||
| 4 | |||
| 5 | #[path = "../example_common.rs"] | ||
| 6 | mod example_common; | ||
| 7 | use embassy_stm32::gpio::{Input, Pull}; | ||
| 8 | use embedded_hal::digital::v2::InputPin; | ||
| 9 | use example_common::*; | ||
| 10 | |||
| 11 | #[cortex_m_rt::entry] | ||
| 12 | fn main() -> ! { | ||
| 13 | info!("Hello World!"); | ||
| 14 | |||
| 15 | loop {} | ||
| 16 | |||
| 17 | //let p = embassy_stm32::init(Default::default()); | ||
| 18 | |||
| 19 | //let button = Input::new(p.PC13, Pull::Up); | ||
| 20 | |||
| 21 | //loop { | ||
| 22 | //if unwrap!(button.is_high()) { | ||
| 23 | //info!("high"); | ||
| 24 | //} else { | ||
| 25 | //info!("low"); | ||
| 26 | //} | ||
| 27 | //} | ||
| 28 | } | ||
