autd3-cpu-wire 0.6.0

Shared wire-protocol contract (command opcodes, error codes, frame layout) for the AUTD3 CPU firmware and its clients.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use zerocopy::little_endian::U16;
use zerocopy::{FromBytes, Immutable, IntoBytes, KnownLayout, Unaligned};

use crate::frame::PAYLOAD_BYTES;
use crate::layout::PWE_TABLE_SIZE;

#[derive(FromBytes, IntoBytes, KnownLayout, Immutable, Unaligned)]
#[repr(C)]
pub struct PwePayload {
    pub table: [U16; PWE_TABLE_SIZE],
}

const _: () = assert!(core::mem::size_of::<PwePayload>() <= PAYLOAD_BYTES);