embassy-mcxa

Crates

git

Versions

mcx-a256

Flavors

Gate

Trait Gate 

Source
pub trait Gate {
    type MrccPeriphConfig: SPConfHelper;

    // Required methods
    unsafe fn enable_clock();
    unsafe fn disable_clock();
    unsafe fn assert_reset();
    unsafe fn release_reset();
    fn is_clock_enabled() -> bool;
    fn is_reset_released() -> bool;
}
Expand description

Trait describing an AHB clock gate that can be toggled through MRCC.

Required Associated Types§

Required Methods§

Source

unsafe fn enable_clock()

Enable the clock gate.

§SAFETY

The current peripheral must be disabled prior to calling this method

Source

unsafe fn disable_clock()

Disable the clock gate.

§SAFETY

There must be no active user of this peripheral when calling this method

Source

unsafe fn assert_reset()

Drive the peripheral into reset.

§SAFETY

There must be no active user of this peripheral when calling this method

Source

unsafe fn release_reset()

Drive the peripheral out of reset.

§SAFETY

There must be no active user of this peripheral when calling this method

Source

fn is_clock_enabled() -> bool

Return whether the clock gate for this peripheral is currently enabled.

Source

fn is_reset_released() -> bool

Return whether the peripheral is currently held in reset.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Gate for ADC0

Source§

impl Gate for ADC1

Source§

impl Gate for ADC2

Source§

impl Gate for ADC3

Source§

impl Gate for CRC0

Source§

impl Gate for DMA0

Source§

impl Gate for GPIO0

Source§

impl Gate for GPIO1

Source§

impl Gate for GPIO2

Source§

impl Gate for GPIO3

Source§

impl Gate for GPIO4

Source§

impl Gate for LPI2C0

Source§

impl Gate for LPI2C1

Source§

impl Gate for LPI2C2

Source§

impl Gate for LPI2C3

Source§

impl Gate for LPUART0

Source§

impl Gate for LPUART1

Source§

impl Gate for LPUART2

Source§

impl Gate for LPUART3

Source§

impl Gate for LPUART4

Source§

impl Gate for LPUART5

Source§

impl Gate for PORT0

Source§

impl Gate for PORT1

Source§

impl Gate for PORT2

Source§

impl Gate for PORT3

Source§

impl Gate for PORT4

Source§

impl Gate for TRNG0