Skip to main content

DualSlotDriver

Trait DualSlotDriver 

Source
pub trait DualSlotDriver<G1: BankPins, G2: BankPins>: DriverMeta {
    // Required method
    fn create(
        gpio_banks: (GpioBank<G1>, GpioBank<G2>),
        slots: (ModuleSlot, ModuleSlot),
        registry: &mut Registry,
        bus_allocator: &mut BusAllocator,
    ) -> impl Future<Output = Result<(), DriverError>>;
}

Required Methods§

Source

fn create( gpio_banks: (GpioBank<G1>, GpioBank<G2>), slots: (ModuleSlot, ModuleSlot), registry: &mut Registry, bus_allocator: &mut BusAllocator, ) -> impl Future<Output = Result<(), DriverError>>

Consumes a module’s pins, initializes its hardware, and registers its capabilities.

Implementations should avoid publishing partially initialized resources and return DriverError::InitFailed if setup cannot complete.

Can create new tasks which run on core 1

0 is right, and 1 is left for the tuples

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§