stm32_fmc

Trait FmcPeripheral

Source
pub unsafe trait FmcPeripheral: Send {
    const REGISTERS: *const ();

    // Required methods
    fn enable(&mut self);
    fn source_clock_hz(&self) -> u32;

    // Provided method
    fn memory_controller_enable(&mut self) { ... }
}
Expand description

A trait for device-specific FMC peripherals. Implement this to add support for a new hardware platform. Peripherals that have this trait must have the same register block as STM32 FMC peripherals.

Required Associated Constants§

Source

const REGISTERS: *const ()

Pointer to the register block

Required Methods§

Source

fn enable(&mut self)

Enables the FMC on its peripheral bus

Source

fn source_clock_hz(&self) -> u32

The frequency of the clock used as a source for the fmc_clk.

F4/F7/G4: hclk H7: fmc_ker_ck

Provided Methods§

Source

fn memory_controller_enable(&mut self)

Enables the FMC memory controller (not always required)

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§