pub struct PeripheralManager<'a, H, C> where
    H: 'a + PeripheralManagement<C>,
    C: 'a + ClockInterface
{ pub registers: &'a H::RegisterType, /* private fields */ }
Expand description

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

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

Fields

registers: &'a H::RegisterType

Implementations

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.