aboutsummaryrefslogtreecommitdiff
path: root/examples/mspm0l1306/src/bin/blinky.rs
diff options
context:
space:
mode:
authori509VCB <[email protected]>2025-03-13 22:10:45 -0500
committeri509VCB <[email protected]>2025-03-13 22:10:45 -0500
commite0cdc356ccd7f9e20c2b5355cc52b7eb7610147b (patch)
tree0c34424508b1ee8d5010dc186247b72fac7aca69 /examples/mspm0l1306/src/bin/blinky.rs
parent38f26137fc67beb874aa73c9a7ab2150d9f3d372 (diff)
Embassy for MSPM0
This adds an embassy hal for the Texas Instruments MSPM0 microcontroller series. So far the GPIO and time drivers have been implemented. I have tested these drivers on the following parts: - C1104 - L1306 - L2228 - G3507 - G3519 The PAC is generated at https://github.com/mspm0-rs
Diffstat (limited to 'examples/mspm0l1306/src/bin/blinky.rs')
-rw-r--r--examples/mspm0l1306/src/bin/blinky.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/examples/mspm0l1306/src/bin/blinky.rs b/examples/mspm0l1306/src/bin/blinky.rs
new file mode 100644
index 000000000..11eee2d80
--- /dev/null
+++ b/examples/mspm0l1306/src/bin/blinky.rs
@@ -0,0 +1,27 @@
1#![no_std]
2#![no_main]
3
4use defmt::*;
5use embassy_executor::Spawner;
6use embassy_mspm0::{
7 gpio::{Level, Output},
8 Config,
9};
10use embassy_time::Timer;
11use {defmt_rtt as _, panic_halt as _};
12
13#[embassy_executor::main]
14async fn main(_spawner: Spawner) -> ! {
15 info!("Hello world!");
16 let p = embassy_mspm0::init(Config::default());
17
18 let mut led1 = Output::new(p.PA0, Level::Low);
19 led1.set_inversion(true);
20
21 loop {
22 Timer::after_millis(400).await;
23
24 info!("Toggle");
25 led1.toggle();
26 }
27}