pub enum Command {
SetGpio {
pin: u8,
value: bool,
},
SetPwm {
pin: u8,
duty: u8,
},
SetLedMatrix {
data: [u8; 25],
},
NeuronFiring {
coordinates: Vec<(u8, u8), 25>,
},
GetCapabilities,
}Expand description
FEAGI commands (parsed from binary packets)
Variants§
SetGpio
Set a GPIO pin to high or low
SetPwm
Set PWM duty cycle (0-255) on a pin
SetLedMatrix
Set full LED matrix (5x5 = 25 bytes, brightness 0-255)
NeuronFiring
Neuron firing coordinates for LED matrix visualization Each coordinate is (x, y) where x,y ∈ [0, 4] for a 5×5 matrix
GetCapabilities
Request device capabilities JSON
Trait Implementations§
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
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