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
use zerocopy::{FromBytes, Immutable, IntoBytes, KnownLayout, Unaligned};

#[derive(FromBytes, IntoBytes, KnownLayout, Immutable, Unaligned)]
#[repr(C)]
pub struct GpioInPayload {
    pub gpio_in_0: u8,
    pub gpio_in_1: u8,
    pub gpio_in_2: u8,
    pub gpio_in_3: u8,
}

const _: () = assert!(core::mem::size_of::<GpioInPayload>() == 4);