diff options
| author | James Munns <[email protected]> | 2025-11-24 18:41:43 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-11-24 18:41:43 +0100 |
| commit | 7ee5cb570f0c0daeb2e6a9d5120fd96ee885025f (patch) | |
| tree | e10b98df1dd9f96b7b3874a06f201d2e23f2fbc9 /examples/src/lib.rs | |
| parent | 6e1bc1139b7dcc8407fd1213bf0cb0788d26288e (diff) | |
Remove the pac singleton function (#42)
There will be a follow up PR that removes the unsafe `init` functions,
but I wanted to squash this out first in case I don't get to it all today.
Diffstat (limited to 'examples/src/lib.rs')
| -rw-r--r-- | examples/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/src/lib.rs b/examples/src/lib.rs index 66b93450a..f5f6124c0 100644 --- a/examples/src/lib.rs +++ b/examples/src/lib.rs | |||
| @@ -9,7 +9,7 @@ use {defmt_rtt as _, embassy_mcxa as hal, panic_probe as _}; | |||
| 9 | 9 | ||
| 10 | /// Initialize clocks and pin muxing for UART2 debug console. | 10 | /// Initialize clocks and pin muxing for UART2 debug console. |
| 11 | /// Safe to call multiple times; writes are idempotent for our use. | 11 | /// Safe to call multiple times; writes are idempotent for our use. |
| 12 | pub unsafe fn init_uart2_pins(_p: &hal::pac::Peripherals) { | 12 | pub unsafe fn init_uart2_pins() { |
| 13 | // NOTE: Lpuart has been updated to properly enable + reset its own clocks. | 13 | // NOTE: Lpuart has been updated to properly enable + reset its own clocks. |
| 14 | // GPIO has not. | 14 | // GPIO has not. |
| 15 | _ = clocks::enable_and_reset::<hal::peripherals::PORT2>(&clocks::periph_helpers::NoConfig); | 15 | _ = clocks::enable_and_reset::<hal::peripherals::PORT2>(&clocks::periph_helpers::NoConfig); |
| @@ -17,7 +17,7 @@ pub unsafe fn init_uart2_pins(_p: &hal::pac::Peripherals) { | |||
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | /// Initialize clocks and pin muxing for ADC. | 19 | /// Initialize clocks and pin muxing for ADC. |
| 20 | pub unsafe fn init_adc_pins(_p: &hal::pac::Peripherals) { | 20 | pub unsafe fn init_adc_pins() { |
| 21 | // 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. |
| 22 | // GPIO has not. | 22 | // GPIO has not. |
| 23 | _ = clocks::enable_and_reset::<hal::peripherals::PORT1>(&clocks::periph_helpers::NoConfig); | 23 | _ = clocks::enable_and_reset::<hal::peripherals::PORT1>(&clocks::periph_helpers::NoConfig); |
