aboutsummaryrefslogtreecommitdiff
path: root/examples/src/lib.rs
diff options
context:
space:
mode:
authorFelipe Balbi <[email protected]>2025-11-18 12:16:14 -0800
committerGitHub <[email protected]>2025-11-18 12:16:14 -0800
commitffe3e5acae6c0038db4176dc7d031b57f865e07f (patch)
treef69475bd7f177ad2ceb69d77ea02a408e5bf6ef7 /examples/src/lib.rs
parente07497690faf1c8a14229183f4054f96832b1d5d (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.rs6
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.
20pub 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.
26pub unsafe fn init_adc_pins(_p: &hal::pac::Peripherals) { 20pub 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.