[][src]Struct kernel::common::peripherals::PeripheralManager

pub struct PeripheralManager<'a, H, C> where
    H: 'a + PeripheralManagement<C>,
    C: 'a + ClockInterface
{ pub registers: &'a H::RegisterType, // some fields omitted }

Structures encapsulating periphal hardware (those implementing the PeripheralManagement trait) should instantiate an instance of this method to accesss memory mapped registers.

impl PeripheralHardware {
    fn example(&self) {
        let peripheral = &PeripheralManager::new(self);
        peripheral.registers.control.set(0x1);
    }
}

Fields

registers: &'a H::RegisterType

Implementations

impl<'a, H, C> PeripheralManager<'a, H, C> where
    H: 'a + PeripheralManagement<C>,
    C: 'a + ClockInterface
[src]

pub fn new(peripheral_hardware: &'a H) -> PeripheralManager<'a, H, C>[src]

Trait Implementations

impl<'a, H, C> Drop for PeripheralManager<'a, H, C> where
    H: 'a + PeripheralManagement<C>,
    C: 'a + ClockInterface
[src]

Auto Trait Implementations

impl<'a, H, C> Send for PeripheralManager<'a, H, C> where
    C: Sync,
    H: Sync,
    <H as PeripheralManagement<C>>::RegisterType: Sync

impl<'a, H, C> Sync for PeripheralManager<'a, H, C> where
    C: Sync,
    H: Sync,
    <H as PeripheralManagement<C>>::RegisterType: Sync

impl<'a, H, C> Unpin for PeripheralManager<'a, H, C>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.