aboutsummaryrefslogtreecommitdiff
path: root/examples/mcxa/src/lib.rs
diff options
context:
space:
mode:
authorJames Munns <[email protected]>2025-12-04 18:46:39 +0100
committerJames Munns <[email protected]>2025-12-04 18:47:31 +0100
commitc3bc8fe8c0db112e5f2f66580104fc49b02890d2 (patch)
treeeea7adc15021697ea980289edd6235daaa12d6ee /examples/mcxa/src/lib.rs
parent5182b2ed54f991b40b45fd2de75f597358ff9c3e (diff)
parent277ab0d2e8714edf37a0ee84cda1059d9944ecef (diff)
Import embassy-mcxa repo
Merge remote-tracking branch 'james-e-mcxa/james/upstream' into james/upstream-mcxa
Diffstat (limited to 'examples/mcxa/src/lib.rs')
-rw-r--r--examples/mcxa/src/lib.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/mcxa/src/lib.rs b/examples/mcxa/src/lib.rs
new file mode 100644
index 000000000..2573a6adc
--- /dev/null
+++ b/examples/mcxa/src/lib.rs
@@ -0,0 +1,16 @@
1#![no_std]
2#![allow(clippy::missing_safety_doc)]
3
4//! Shared board-specific helpers for the FRDM-MCXA276 examples.
5//! These live with the examples so the HAL stays generic.
6
7use hal::{clocks, pins};
8use {defmt_rtt as _, embassy_mcxa as hal, panic_probe as _};
9
10/// Initialize clocks and pin muxing for ADC.
11pub unsafe fn init_adc_pins() {
12 // NOTE: Lpuart has been updated to properly enable + reset its own clocks.
13 // GPIO has not.
14 _ = clocks::enable_and_reset::<hal::peripherals::PORT1>(&clocks::periph_helpers::NoConfig);
15 pins::configure_adc_pins();
16}