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/lib.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/lib.rs')
| -rw-r--r-- | examples/src/lib.rs | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/examples/src/lib.rs b/examples/src/lib.rs index 4bb334da5..66b93450a 100644 --- a/examples/src/lib.rs +++ b/examples/src/lib.rs | |||
| @@ -16,12 +16,6 @@ pub unsafe fn init_uart2_pins(_p: &hal::pac::Peripherals) { | |||
| 16 | pins::configure_uart2_pins_port2(); | 16 | pins::configure_uart2_pins_port2(); |
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | /// Initialize clocks for the LED GPIO/PORT used by the blink example. | ||
| 20 | pub unsafe fn init_led_gpio_clocks(_p: &hal::pac::Peripherals) { | ||
| 21 | _ = clocks::enable_and_reset::<hal::peripherals::PORT3>(&clocks::periph_helpers::NoConfig); | ||
| 22 | _ = clocks::enable_and_reset::<hal::peripherals::GPIO3>(&clocks::periph_helpers::NoConfig); | ||
| 23 | } | ||
| 24 | |||
| 25 | /// Initialize clocks and pin muxing for ADC. | 19 | /// Initialize clocks and pin muxing for ADC. |
| 26 | pub unsafe fn init_adc_pins(_p: &hal::pac::Peripherals) { | 20 | pub unsafe fn init_adc_pins(_p: &hal::pac::Peripherals) { |
| 27 | // NOTE: Lpuart has been updated to properly enable + reset its own clocks. | 21 | // NOTE: Lpuart has been updated to properly enable + reset its own clocks. |
