[−][src]Function tmledkey_hal_drv::tm_send_bytes_2wire
pub fn tm_send_bytes_2wire<DIO, CLK, D>(
dio: &mut DIO,
clk: &mut CLK,
delay_us: &mut D,
delay_value: u16,
bytes: &[u8]
) -> Result<(), TmError> where
DIO: InputPin + OutputPin,
CLK: OutputPin,
D: FnMut(u16),
Send one or several bytes to MCU via 2 wire interface (DIO,CLK).
According to datasheet it can be single command byte or a sequence starting with command byte followed by several data bytes.
Arguments:
dio
,clk
- MCU interface pinsdelay_us
- closure that provides delay functionalitydelay_value
- delay value in us, depends of MCU you are using and circuit featuresbytes
- slice of bytes to send