rcx 0.1.3

Communicate with LEGO RCX bricks
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[cfg(feature = "usbtower")]
pub mod usb;

use crate::{opcodes::Opcode, Result};

pub trait IrTower {
    fn send(&mut self, msg: &dyn Opcode) -> Result<()>;
    fn recv(&mut self) -> Result<Vec<u8>>;

    fn send_recv(&mut self, msg: &dyn Opcode) -> Result<Vec<u8>> {
        self.send(msg)?;
        self.recv()
    }
}