Struct multiwii_serial_protocol::structs::MspBoardInfo
[−]
[src]
pub struct MspBoardInfo { pub board_id: [u8; 4], pub hardware_revision: u16, pub fc_type: u8, }
Fields
board_id: [u8; 4]
hardware_revision: u16
fc_type: u8
Methods
impl MspBoardInfo
[src]
fn packed_struct_display_formatter<'a>(
&'a self
) -> PackedStructDisplay<'a, Self, [u8; 7]>
[src]
&'a self
) -> PackedStructDisplay<'a, Self, [u8; 7]>
Display formatter for console applications
Trait Implementations
impl PackedStruct<[u8; 7]> for MspBoardInfo
[src]
Structure that can be packed an unpacked into 7 bytes.
Bit, MSB0 | Name | Type |
0:7 | board_id[0] | u8 |
8:15 | board_id[1] | u8 |
16:23 | board_id[2] | u8 |
24:31 | board_id[3] | u8 |
32:47 | hardware_revision | u16 |
48:55 | fc_type | u8 |
fn pack(&self) -> [u8; 7]
[src]
Packs the structure into a byte array.
fn unpack(src: &[u8; 7]) -> Result<MspBoardInfo, PackingError>
[src]
Unpacks the structure from a byte array.
impl PackedStructInfo for MspBoardInfo
[src]
fn packed_bits() -> usize
[src]
Number of bits that this structure occupies when being packed.
impl PackedStructSlice for MspBoardInfo
[src]
fn pack_to_slice(&self, output: &mut [u8]) -> Result<(), PackingError>
[src]
Pack the structure into an output buffer.
fn unpack_from_slice(src: &[u8]) -> Result<Self, PackingError>
[src]
Unpack the structure from a buffer.
fn packed_bytes() -> usize
[src]
Number of bytes that this structure demands for packing or unpacking.
fn pack_to_vec(&self) -> Result<Vec<u8>, PackingError>
[src]
Pack the structure into a new byte vector.
impl PackedStructDebug for MspBoardInfo
[src]
fn fmt_fields(&self, fmt: &mut Formatter) -> Result<(), Error>
[src]
fn packed_struct_display_header() -> &'static str
[src]
impl Display for MspBoardInfo
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Debug for MspBoardInfo
[src]
impl Copy for MspBoardInfo
[src]
impl Clone for MspBoardInfo
[src]
fn clone(&self) -> MspBoardInfo
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more