implement iterator on reader (serial rx)

This commit is contained in:
Vladan Popovic 2022-06-19 03:07:07 +02:00
parent 792eef13ba
commit 08c5cabe6d
2 changed files with 91 additions and 43 deletions

View file

@ -271,7 +271,7 @@ impl Command {
}
}
pub fn tcp_send(size: usize) -> Command {
pub fn tcp_send_size(size: usize) -> Command {
Command {
text: format!("AT+CIPSEND={}", size),
timeout: Duration::from_millis(3000),
@ -279,11 +279,11 @@ impl Command {
}
}
pub fn tcp_write(payload: &str) -> Command {
pub fn tcp_send() -> Command {
Command {
text: payload.to_string(),
timeout: Duration::from_millis(2000),
contains: Some("> ".to_string()),
text: "AT+CIPSEND".to_string(),
timeout: Duration::from_millis(3000),
contains: Some(">".to_string()),
}
}