let end = start + payload_len;
rx.packet[start..(start + payload_len)]
.copy_from_slice(&packet.payload);
let end = start + payload_len;
rx.packet[start..(start + payload_len)]
.copy_from_slice(&packet.payload);
///
/// After each frame input, this should be consumed in a loop until length 0 is returned.
/// This component will never block. Upstream interface can provide blocking `read()` if desired.
///
/// After each frame input, this should be consumed in a loop until length 0 is returned.
/// This component will never block. Upstream interface can provide blocking `read()` if desired.
match self.outgoing_kiss.as_mut() {
Some(outgoing) => {
let n = (outgoing.kiss_frame.len - outgoing.sent).min(target_buf.len());
match self.outgoing_kiss.as_mut() {
Some(outgoing) => {
let n = (outgoing.kiss_frame.len - outgoing.sent).min(target_buf.len());
let target_buf = self.kiss_buffer.buf_remaining();
let n = buf.len().min(target_buf.len());
target_buf[0..n].copy_from_slice(&buf[0..n]);
let target_buf = self.kiss_buffer.buf_remaining();
let n = buf.len().min(target_buf.len());
target_buf[0..n].copy_from_slice(&buf[0..n]);
assert_eq!(kiss.command().unwrap(), KissCommand::DataFrame);
assert_eq!(kiss.port().unwrap(), PORT_STREAM);
assert_eq!(kiss.command().unwrap(), KissCommand::DataFrame);
assert_eq!(kiss.port().unwrap(), PORT_STREAM);
assert_eq!(kiss.command().unwrap(), KissCommand::DataFrame);
assert_eq!(kiss.port().unwrap(), PORT_STREAM);
let n = kiss.decode_payload(&mut payload_buf).unwrap();
assert_eq!(n, 26);
assert_eq!(kiss.command().unwrap(), KissCommand::DataFrame);
assert_eq!(kiss.port().unwrap(), PORT_STREAM);
let n = kiss.decode_payload(&mut payload_buf).unwrap();
assert_eq!(n, 26);
assert_eq!(kiss.command().unwrap(), KissCommand::DataFrame);
assert_eq!(kiss.port().unwrap(), PORT_STREAM);
assert_eq!(kiss.command().unwrap(), KissCommand::DataFrame);
assert_eq!(kiss.port().unwrap(), PORT_STREAM);
assert_eq!(kiss.command().unwrap(), KissCommand::DataFrame);
assert_eq!(kiss.port().unwrap(), PORT_STREAM);
assert_eq!(kiss.command().unwrap(), KissCommand::DataFrame);
assert_eq!(kiss.port().unwrap(), PORT_STREAM);
assert_eq!(kiss.command().unwrap(), KissCommand::DataFrame);
assert_eq!(kiss.port().unwrap(), PORT_STREAM);
let n = kiss.decode_payload(&mut payload_buf).unwrap();
assert_eq!(n, 26);
assert_eq!(kiss.command().unwrap(), KissCommand::DataFrame);
assert_eq!(kiss.port().unwrap(), PORT_STREAM);
let n = kiss.decode_payload(&mut payload_buf).unwrap();
assert_eq!(n, 26);
assert_eq!(kiss.command().unwrap(), KissCommand::DataFrame);
assert_eq!(kiss.port().unwrap(), PORT_STREAM);
assert_eq!(kiss.command().unwrap(), KissCommand::DataFrame);
assert_eq!(kiss.port().unwrap(), PORT_STREAM);