diff options
Diffstat (limited to 'examples/common/mod.rs')
| -rw-r--r-- | examples/common/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/common/mod.rs b/examples/common/mod.rs index 7ada4c456..8c52c8e86 100644 --- a/examples/common/mod.rs +++ b/examples/common/mod.rs | |||
| @@ -1,13 +1,13 @@ | |||
| 1 | //! Shared board-specific helpers for the FRDM-MCXA276 examples. | 1 | //! Shared board-specific helpers for the FRDM-MCXA276 examples. |
| 2 | //! These live with the examples so the HAL stays generic. | 2 | //! These live with the examples so the HAL stays generic. |
| 3 | 3 | ||
| 4 | use embassy_mcxa276 as hal; | ||
| 5 | use hal::{clocks, pins, reset}; | 4 | use hal::{clocks, pins, reset}; |
| 5 | use {embassy_mcxa276 as hal, panic_probe as _}; | ||
| 6 | 6 | ||
| 7 | /// Initialize clocks and pin muxing for UART2 debug console. | 7 | /// Initialize clocks and pin muxing for UART2 debug console. |
| 8 | /// Safe to call multiple times; writes are idempotent for our use. | 8 | /// Safe to call multiple times; writes are idempotent for our use. |
| 9 | #[allow(dead_code)] | 9 | #[allow(dead_code)] |
| 10 | pub unsafe fn init_uart2(p: &hal::pac::Peripherals) { | 10 | pub unsafe fn init_uart2(p: &mcxa_pac::Peripherals) { |
| 11 | clocks::ensure_frolf_running(p); | 11 | clocks::ensure_frolf_running(p); |
| 12 | clocks::enable_uart2_port2(p); | 12 | clocks::enable_uart2_port2(p); |
| 13 | reset::release_reset_port2(p); | 13 | reset::release_reset_port2(p); |
| @@ -18,7 +18,7 @@ pub unsafe fn init_uart2(p: &hal::pac::Peripherals) { | |||
| 18 | 18 | ||
| 19 | /// Initialize clocks for the LED GPIO/PORT used by the blink example. | 19 | /// Initialize clocks for the LED GPIO/PORT used by the blink example. |
| 20 | #[allow(dead_code)] | 20 | #[allow(dead_code)] |
| 21 | pub unsafe fn init_led(p: &hal::pac::Peripherals) { | 21 | pub unsafe fn init_led(p: &mcxa_pac::Peripherals) { |
| 22 | clocks::enable_led_port(p); | 22 | clocks::enable_led_port(p); |
| 23 | reset::release_reset_gpio3(p); | 23 | reset::release_reset_gpio3(p); |
| 24 | reset::release_reset_port3(p); | 24 | reset::release_reset_port3(p); |
| @@ -26,7 +26,7 @@ pub unsafe fn init_led(p: &hal::pac::Peripherals) { | |||
| 26 | 26 | ||
| 27 | /// Initialize clocks for OSTIMER0 (1 MHz source). | 27 | /// Initialize clocks for OSTIMER0 (1 MHz source). |
| 28 | #[allow(dead_code)] | 28 | #[allow(dead_code)] |
| 29 | pub unsafe fn init_ostimer0(p: &hal::pac::Peripherals) { | 29 | pub unsafe fn init_ostimer0(p: &mcxa_pac::Peripherals) { |
| 30 | clocks::ensure_frolf_running(p); | 30 | clocks::ensure_frolf_running(p); |
| 31 | clocks::enable_ostimer0(p); | 31 | clocks::enable_ostimer0(p); |
| 32 | reset::release_reset_ostimer0(p); | 32 | reset::release_reset_ostimer0(p); |
| @@ -35,7 +35,7 @@ pub unsafe fn init_ostimer0(p: &hal::pac::Peripherals) { | |||
| 35 | 35 | ||
| 36 | /// Initialize clocks and pin muxing for ADC. | 36 | /// Initialize clocks and pin muxing for ADC. |
| 37 | #[allow(dead_code)] | 37 | #[allow(dead_code)] |
| 38 | pub unsafe fn init_adc(p: &hal::pac::Peripherals) { | 38 | pub unsafe fn init_adc(p: &mcxa_pac::Peripherals) { |
| 39 | clocks::ensure_frolf_running(p); | 39 | clocks::ensure_frolf_running(p); |
| 40 | clocks::enable_adc(p); | 40 | clocks::enable_adc(p); |
| 41 | reset::release_reset_port1(p); | 41 | reset::release_reset_port1(p); |
