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/ostimer_async.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/ostimer_async.rs')
| -rw-r--r-- | examples/src/bin/ostimer_async.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/src/bin/ostimer_async.rs b/examples/src/bin/ostimer_async.rs index 881f09374..f043184e7 100644 --- a/examples/src/bin/ostimer_async.rs +++ b/examples/src/bin/ostimer_async.rs | |||
| @@ -29,14 +29,14 @@ async fn main(_spawner: Spawner) { | |||
| 29 | ..Default::default() | 29 | ..Default::default() |
| 30 | }; | 30 | }; |
| 31 | 31 | ||
| 32 | // Create UART instance using LPUART2 with PIO2_2 as TX and PIO2_3 as RX | 32 | // Create UART instance using LPUART2 with P2_2 as TX and P2_3 as RX |
| 33 | unsafe { | 33 | unsafe { |
| 34 | init_uart2_pins(hal::pac()); | 34 | init_uart2_pins(hal::pac()); |
| 35 | } | 35 | } |
| 36 | let mut uart = Lpuart::new_blocking( | 36 | let mut uart = Lpuart::new_blocking( |
| 37 | p.LPUART2, // Peripheral | 37 | p.LPUART2, // Peripheral |
| 38 | p.PIO2_2, // TX pin | 38 | p.P2_2, // TX pin |
| 39 | p.PIO2_3, // RX pin | 39 | p.P2_3, // RX pin |
| 40 | config, | 40 | config, |
| 41 | ) | 41 | ) |
| 42 | .unwrap(); | 42 | .unwrap(); |
