aboutsummaryrefslogtreecommitdiff
path: root/examples/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/src/lib.rs')
-rw-r--r--examples/src/lib.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/examples/src/lib.rs b/examples/src/lib.rs
index a45ab708d..be4761c32 100644
--- a/examples/src/lib.rs
+++ b/examples/src/lib.rs
@@ -1,4 +1,5 @@
1#![no_std] 1#![no_std]
2#![allow(clippy::missing_safety_doc)]
2 3
3//! Shared board-specific helpers for the FRDM-MCXA276 examples. 4//! Shared board-specific helpers for the FRDM-MCXA276 examples.
4//! These live with the examples so the HAL stays generic. 5//! These live with the examples so the HAL stays generic.
@@ -8,8 +9,7 @@ use {embassy_mcxa as hal, panic_probe as _};
8 9
9/// Initialize clocks and pin muxing for UART2 debug console. 10/// Initialize clocks and pin muxing for UART2 debug console.
10/// Safe to call multiple times; writes are idempotent for our use. 11/// Safe to call multiple times; writes are idempotent for our use.
11#[allow(dead_code)] 12pub unsafe fn init_uart2_pins(_p: &hal::pac::Peripherals) {
12pub unsafe fn init_uart2(_p: &hal::pac::Peripherals) {
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::NoConfig); 15 _ = clocks::enable_and_reset::<hal::peripherals::PORT2>(&clocks::NoConfig);
@@ -17,15 +17,13 @@ pub unsafe fn init_uart2(_p: &hal::pac::Peripherals) {
17} 17}
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)] 20pub unsafe fn init_led_gpio_clocks(_p: &hal::pac::Peripherals) {
21pub unsafe fn init_led(_p: &hal::pac::Peripherals) {
22 _ = clocks::enable_and_reset::<hal::peripherals::PORT3>(&clocks::NoConfig); 21 _ = clocks::enable_and_reset::<hal::peripherals::PORT3>(&clocks::NoConfig);
23 _ = clocks::enable_and_reset::<hal::peripherals::GPIO3>(&clocks::NoConfig); 22 _ = clocks::enable_and_reset::<hal::peripherals::GPIO3>(&clocks::NoConfig);
24} 23}
25 24
26/// Initialize clocks and pin muxing for ADC. 25/// Initialize clocks and pin muxing for ADC.
27#[allow(dead_code)] 26pub unsafe fn init_adc_pins(_p: &hal::pac::Peripherals) {
28pub unsafe fn init_adc(_p: &hal::pac::Peripherals) {
29 // NOTE: Lpuart has been updated to properly enable + reset its own clocks. 27 // NOTE: Lpuart has been updated to properly enable + reset its own clocks.
30 // GPIO has not. 28 // GPIO has not.
31 _ = clocks::enable_and_reset::<hal::peripherals::PORT1>(&clocks::NoConfig); 29 _ = clocks::enable_and_reset::<hal::peripherals::PORT1>(&clocks::NoConfig);