diff options
| author | Felipe Balbi <[email protected]> | 2025-11-18 12:16:14 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-11-18 12:16:14 -0800 |
| commit | ffe3e5acae6c0038db4176dc7d031b57f865e07f (patch) | |
| tree | f69475bd7f177ad2ceb69d77ea02a408e5bf6ef7 /examples/src/bin/hello.rs | |
| parent | e07497690faf1c8a14229183f4054f96832b1d5d (diff) | |
Correct gpio driver (#9)
* Correct gpio driver
Signed-off-by: Felipe Balbi <[email protected]>
* Simplify blinky example
Make it look like every other HAL for consistency. While at that, also
rename the example to match the name used by other HALs.
Signed-off-by: Felipe Balbi <[email protected]>
* Add some documentation to GPIO driver
Signed-off-by: Felipe Balbi <[email protected]>
* Enable GPIO clocks during HAL initialization
Provide the user with working GPIO clocks.
Signed-off-by: Felipe Balbi <[email protected]>
---------
Signed-off-by: Felipe Balbi <[email protected]>
Co-authored-by: Felipe Balbi <[email protected]>
Diffstat (limited to 'examples/src/bin/hello.rs')
| -rw-r--r-- | examples/src/bin/hello.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/src/bin/hello.rs b/examples/src/bin/hello.rs index 207c157c3..e2d0b413d 100644 --- a/examples/src/bin/hello.rs +++ b/examples/src/bin/hello.rs | |||
| @@ -26,14 +26,14 @@ async fn main(_spawner: Spawner) { | |||
| 26 | ..Default::default() | 26 | ..Default::default() |
| 27 | }; | 27 | }; |
| 28 | 28 | ||
| 29 | // Create UART instance using LPUART2 with PIO2_2 as TX and PIO2_3 as RX | 29 | // Create UART instance using LPUART2 with P2_2 as TX and P2_3 as RX |
| 30 | unsafe { | 30 | unsafe { |
| 31 | embassy_mcxa_examples::init_uart2_pins(hal::pac()); | 31 | embassy_mcxa_examples::init_uart2_pins(hal::pac()); |
| 32 | } | 32 | } |
| 33 | let mut uart = Lpuart::new_blocking( | 33 | let mut uart = Lpuart::new_blocking( |
| 34 | p.LPUART2, // Peripheral | 34 | p.LPUART2, // Peripheral |
| 35 | p.PIO2_2, // TX pin | 35 | p.P2_2, // TX pin |
| 36 | p.PIO2_3, // RX pin | 36 | p.P2_3, // RX pin |
| 37 | config, | 37 | config, |
| 38 | ) | 38 | ) |
| 39 | .unwrap(); | 39 | .unwrap(); |
