pub struct StmDeviceId { /* private fields */ }Expand description
STM32 MCU Device ID Code
Device ID format:
- Bits 31:16: REV_ID (silicon revision)
- Bits 15:0: DEV_ID (device identifier)
§Examples
let device_id: StmDeviceId = 0x10006413.into();
println!("{}", device_id);
// Or using new()
let device_id = StmDeviceId::new(0x10006413);Implementations§
Source§impl StmDeviceId
impl StmDeviceId
Sourcepub const ADDRESS: u32 = 0xE004_2000
pub const ADDRESS: u32 = 0xE004_2000
STM32F4 memory address of the ROM location holding the device ID
Sourcepub fn revision_str(&self) -> &'static str
pub fn revision_str(&self) -> &'static str
Get revision letter if known. These values are usually documented in errata sheets or reference manuals for the product line.
Sourcepub fn is_known_device(&self) -> bool
pub fn is_known_device(&self) -> bool
Checks if this is an STM32 device airfrog-core is familiar with
Trait Implementations§
Source§impl Clone for StmDeviceId
impl Clone for StmDeviceId
Source§fn clone(&self) -> StmDeviceId
fn clone(&self) -> StmDeviceId
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StmDeviceId
Source§impl Debug for StmDeviceId
impl Debug for StmDeviceId
Source§impl Display for StmDeviceId
impl Display for StmDeviceId
impl Eq for StmDeviceId
Source§impl From<u32> for StmDeviceId
impl From<u32> for StmDeviceId
Source§impl LowerHex for StmDeviceId
impl LowerHex for StmDeviceId
Source§impl PartialEq for StmDeviceId
impl PartialEq for StmDeviceId
impl StructuralPartialEq for StmDeviceId
Auto Trait Implementations§
impl Freeze for StmDeviceId
impl RefUnwindSafe for StmDeviceId
impl Send for StmDeviceId
impl Sync for StmDeviceId
impl Unpin for StmDeviceId
impl UnsafeUnpin for StmDeviceId
impl UnwindSafe for StmDeviceId
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