pub trait Bank<R: GpioRegisters> {
const BASE_ADDRESS: usize;
// Provided methods
fn get_handle() -> Gpio<R> { ... }
fn addr() -> *mut R { ... }
}Expand description
Abstraction representing a GPIO bank on the target platform.
A concrete bank type (provided by a platform-specific crate) must
implement Bank<R> for its register block R. The trait provides the
physical address of the registers and a convenience get_handle() that
returns an io::Gpio<R> wrapper around the register pointer.
Required Associated Constants§
Sourceconst BASE_ADDRESS: usize
const BASE_ADDRESS: usize
Base physical address of the GPIO bank registers.
Provided Methods§
Sourcefn get_handle() -> Gpio<R>
fn get_handle() -> Gpio<R>
Return a new Gpio handle pointing at the bank’s register block.
This default implementation calls Self::addr() and constructs the
thin io::Gpio wrapper. Platform crates may rely on this helper
to obtain a typed handle.
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.