pub struct MspMotor {
pub motors: [u16; 8],
}Fields§
§motors: [u16; 8]Implementations§
Source§impl MspMotor
impl MspMotor
Sourcepub fn packed_struct_display_formatter<'a>(
&'a self,
) -> PackedStructDisplay<'a, Self, [u8; 16]>
pub fn packed_struct_display_formatter<'a>( &'a self, ) -> PackedStructDisplay<'a, Self, [u8; 16]>
Display formatter for console applications
Trait Implementations§
impl Copy for MspMotor
Source§impl<'de> Deserialize<'de> for MspMotor
impl<'de> Deserialize<'de> for MspMotor
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; 16]> for MspMotor
Structure that can be packed an unpacked into 16 bytes.
impl PackedStruct<[u8; 16]> for MspMotor
Structure that can be packed an unpacked into 16 bytes.
| Bit, MSB0 | Name | Type |
| 0:15 | motors[0] | u16 |
| 16:31 | motors[1] | u16 |
| 32:47 | motors[2] | u16 |
| 48:63 | motors[3] | u16 |
| 64:79 | motors[4] | u16 |
| 80:95 | motors[5] | u16 |
| 96:111 | motors[6] | u16 |
| 112:127 | motors[7] | u16 |
Source§impl PackedStructDebug for MspMotor
impl PackedStructDebug for MspMotor
Source§impl PackedStructInfo for MspMotor
impl PackedStructInfo for MspMotor
Source§fn packed_bits() -> usize
fn packed_bits() -> usize
Number of bits that this structure occupies when being packed.
Source§impl PackedStructSlice for MspMotor
impl PackedStructSlice for MspMotor
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.
Auto Trait Implementations§
impl Freeze for MspMotor
impl RefUnwindSafe for MspMotor
impl Send for MspMotor
impl Sync for MspMotor
impl Unpin for MspMotor
impl UnsafeUnpin for MspMotor
impl UnwindSafe for MspMotor
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