pub struct Database { /* private fields */ }Expand description
A queryable constraint database for a single device.
Implementations§
Source§impl Database
impl Database
Sourcepub const fn f446re() -> Database
pub const fn f446re() -> Database
The hand-verified database for the NUCLEO-F446RE’s STM32F446RE.
Sourcepub const fn f411re() -> Database
pub const fn f411re() -> Database
The database for the NUCLEO-F411RE’s STM32F411RE, generated at build
time from the vendored ST pin data (see pack).
Sourcepub fn has_peripheral(&self, peripheral: &str) -> bool
pub fn has_peripheral(&self, peripheral: &str) -> bool
Whether this device exposes peripheral at all (any AF mapping names it).
Used by the solver to flag peripherals absent on the selected family.
Sourcepub fn lookup(&self, pin: Pin, af: u8) -> impl Iterator<Item = &AfMapping>
pub fn lookup(&self, pin: Pin, af: u8) -> impl Iterator<Item = &AfMapping>
Every mapping for pin at alternate function af.
Returns an iterator because one (pin, AF) can carry several peripheral
signals — e.g. on the F446 PA4/AF5 is both SPI1_NSS and I2S1_WS
(SPI and I2S share the same hardware block and AF number).
Sourcepub fn alt_functions(&self, pin: Pin) -> impl Iterator<Item = &AfMapping>
pub fn alt_functions(&self, pin: Pin) -> impl Iterator<Item = &AfMapping>
Every alternate-function mapping available on pin.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Database
impl RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnsafeUnpin for Database
impl UnwindSafe for Database
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more