[−][src]Function tmledkey_hal_drv::tm_send_bytes_3wire
pub fn tm_send_bytes_3wire<DIO, CLK, STB, D>(
dio: &mut DIO,
clk: &mut CLK,
stb: &mut STB,
delay_us: &mut D,
delay_value: u16,
bytes: &[u8]
) -> Result<(), TmError> where
DIO: InputPin + OutputPin,
CLK: OutputPin,
STB: OutputPin,
D: FnMut(u16),
Send bytes using 3 wire interface (DIO,CLK,STB).
According to datasheet it can be single command byte or a sequence starting with command byte followed by several data bytes.
Keep in mind that for this interface you should send 2 bytes for each display. For TM1638 second byte stands for segments 9-12 which has no meaning for 8 segment display. Thus in most cases you would send each 2nd data byte as empty.
Arguments:
dio
,clk
,stb
- MCU interface pinsdelay_us
- closure that provides delay functionalitydelay_value
- delay value in us, depends of MCU you are using and your featuresbytes
- slice of bytes to send