pub struct IdentityConfig {
pub vendor_id: u32,
pub product_code: u32,
pub revision_number: u32,
}Available on crate feature
std only.Expand description
The device identity is a unique 128-bit number used for addressing the device on the bus
The configures the three hardcoded components of the identity. The serial number component of the identity must be set by the application to be unique, e.g. based on a value programmed into non-volatile memory or from a UID register on the MCU.
Fields§
§vendor_id: u32The 32-bit vendor ID for this device
product_code: u32The 32-bit product code for this device
revision_number: u32The 32-bit revision number for this device
Trait Implementations§
Source§impl Clone for IdentityConfig
impl Clone for IdentityConfig
Source§fn clone(&self) -> IdentityConfig
fn clone(&self) -> IdentityConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IdentityConfig
impl Debug for IdentityConfig
Source§impl Default for IdentityConfig
impl Default for IdentityConfig
Source§fn default() -> IdentityConfig
fn default() -> IdentityConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for IdentityConfig
impl<'de> Deserialize<'de> for IdentityConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for IdentityConfig
Auto Trait Implementations§
impl Freeze for IdentityConfig
impl RefUnwindSafe for IdentityConfig
impl Send for IdentityConfig
impl Sync for IdentityConfig
impl Unpin for IdentityConfig
impl UnwindSafe for IdentityConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more