Struct tmc2209::ReadResponse [−][src]
#[repr(C)]pub struct ReadResponse(_);
Expand description
The read access response datagram.
Implementations
The first byte is the synchronisation byte.
The index of the master address byte.
The index of the register address.
The range of byte representing the data field.
The master address.
Should always be 0b11111111
.
Read the register address field.
Returns an Err
if the value does not correspond with any known register.
Produce the register state stored within the resonse.
The specific state is determined by first checking the register address.
The bytes of the data slice shifted into a u32
value.
The u32
can be converted directly into the Register
type associated with the
reg::Address
. See the register
method.
Attempt to cast the data
field to a register bitfield of the given type.
Uses the data_u32
method internally.
Returns true
if the CRC is valid, false
otherwise.
Trait Implementations
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.