aboutsummaryrefslogtreecommitdiff
path: root/examples/src/lib.rs
blob: 2573a6adc20da05b0b81a1cc52c527eda1976437 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![no_std]
#![allow(clippy::missing_safety_doc)]

//! Shared board-specific helpers for the FRDM-MCXA276 examples.
//! These live with the examples so the HAL stays generic.

use hal::{clocks, pins};
use {defmt_rtt as _, embassy_mcxa as hal, panic_probe as _};

/// Initialize clocks and pin muxing for ADC.
pub unsafe fn init_adc_pins() {
    // NOTE: Lpuart has been updated to properly enable + reset its own clocks.
    // GPIO has not.
    _ = clocks::enable_and_reset::<hal::peripherals::PORT1>(&clocks::periph_helpers::NoConfig);
    pins::configure_adc_pins();
}