pub struct IdCode {
pub _reserved: ReservedOnes<Bits1>,
pub manufacturer_id: Integer<u16, Bits11>,
pub device: Integer<u8, Bits5>,
pub subfamily: Integer<u8, Bits4>,
pub family: Integer<u8, Bits7>,
pub version: Integer<u8, Bits4>,
}
Fields§
§_reserved: ReservedOnes<Bits1>
§manufacturer_id: Integer<u16, Bits11>
§device: Integer<u8, Bits5>
§subfamily: Integer<u8, Bits4>
§family: Integer<u8, Bits7>
§version: Integer<u8, Bits4>
Implementations§
Source§impl IdCode
impl IdCode
Sourcepub fn packed_struct_display_formatter<'a>(
&'a self,
) -> PackedStructDisplay<'a, Self, [u8; 4]>
pub fn packed_struct_display_formatter<'a>( &'a self, ) -> PackedStructDisplay<'a, Self, [u8; 4]>
Display formatter for console applications
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IdCode
impl<'de> Deserialize<'de> for IdCode
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
Source§impl PackedStruct<[u8; 4]> for IdCode
Structure that can be packed an unpacked into 4 bytes.
impl PackedStruct<[u8; 4]> for IdCode
Structure that can be packed an unpacked into 4 bytes.
Bit, MSB0 | Name | Type |
31 | _reserved | ReservedOnes < packed_bits :: Bits1 > |
20:30 | manufacturer_id | Integer < u16 , packed_bits :: Bits11 > |
15:19 | device | Integer < u8 , packed_bits :: Bits5 > |
11:14 | subfamily | Integer < u8 , packed_bits :: Bits4 > |
4:10 | family | Integer < u8 , packed_bits :: Bits7 > |
0:3 | version | Integer < u8 , packed_bits :: Bits4 > |
Source§impl PackedStructDebug for IdCode
impl PackedStructDebug for IdCode
Source§impl PackedStructInfo for IdCode
impl PackedStructInfo for IdCode
Source§fn packed_bits() -> usize
fn packed_bits() -> usize
Number of bits that this structure occupies when being packed.
Source§impl PackedStructSlice for IdCode
impl PackedStructSlice for IdCode
Source§fn pack_to_slice(&self, output: &mut [u8]) -> Result<(), PackingError>
fn pack_to_slice(&self, output: &mut [u8]) -> Result<(), PackingError>
Pack the structure into an output buffer.
Source§fn unpack_from_slice(src: &[u8]) -> Result<Self, PackingError>
fn unpack_from_slice(src: &[u8]) -> Result<Self, PackingError>
Unpack the structure from a buffer.
Source§fn packed_bytes() -> usize
fn packed_bytes() -> usize
Number of bytes that this structure demands for packing or unpacking.
Source§fn pack_to_vec(&self) -> Result<Vec<u8>, PackingError>
fn pack_to_vec(&self) -> Result<Vec<u8>, PackingError>
Pack the structure into a new byte vector.
Source§impl Register for IdCodeRegister
impl Register for IdCodeRegister
fn register_address(&self) -> RegisterAddress
impl Copy for IdCode
impl StructuralPartialEq for IdCode
Auto Trait Implementations§
impl Freeze for IdCode
impl RefUnwindSafe for IdCode
impl Send for IdCode
impl Sync for IdCode
impl Unpin for IdCode
impl UnwindSafe for IdCode
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