Updated embedded-io
This commit is contained in:
parent
3546692bcd
commit
a040fef484
|
@ -15,15 +15,15 @@ heapless = "0.7.10"
|
|||
rand_core = "0.6.0"
|
||||
defmt = { version = "0.3", optional = true }
|
||||
log = { version = "0.4.14", optional = true }
|
||||
embedded-io = { version = "0.4.0", features = ["async"]}
|
||||
embedded-io-async = "0.5"
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
embedded-io = { version = "0.4.0", features = ["tokio"]}
|
||||
tokio-test = { version = "0.4.2"}
|
||||
embedded-io = { version = "0.4.0", features = ["tokio"] }
|
||||
tokio-test = { version = "0.4.2" }
|
||||
env_logger = "0.9.0"
|
||||
futures = { version = "0.3.21" }
|
||||
log = { version = "0.4.14"}
|
||||
log = { version = "0.4.14" }
|
||||
serial_test = "0.6.0"
|
||||
|
||||
[features]
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
use embedded_io::asynch::{Read, Write};
|
||||
use embedded_io_async::{Read, Write};
|
||||
use heapless::Vec;
|
||||
use rand_core::RngCore;
|
||||
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
use embedded_io::asynch::{Read, Write};
|
||||
use embedded_io_async::{Read, Write};
|
||||
use heapless::Vec;
|
||||
use rand_core::RngCore;
|
||||
|
||||
use crate::{
|
||||
encoding::variable_byte_integer::{VariableByteInteger, VariableByteIntegerDecoder},
|
||||
network::NetworkConnection,
|
||||
packet::v5::{
|
||||
connack_packet::ConnackPacket,
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
|
||||
use crate::packet::v5::reason_codes::ReasonCode;
|
||||
use embedded_io::asynch::{Read, Write};
|
||||
use embedded_io_async::{Read, Write};
|
||||
|
||||
pub struct NetworkConnection<T>
|
||||
where
|
||||
|
|
|
@ -90,7 +90,7 @@ impl<'a> BuffWriter<'a> {
|
|||
if self.position + len > self.len {
|
||||
return Err(BufferError::InsufficientBufferSize);
|
||||
}
|
||||
self.buffer[self.position..self.position+len].copy_from_slice(&array[0..len]);
|
||||
self.buffer[self.position..self.position + len].copy_from_slice(&array[0..len]);
|
||||
self.increment_position(len);
|
||||
Ok(())
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ impl<'a> BuffWriter<'a> {
|
|||
pub fn write_topic_filters_ref<const MAX: usize>(
|
||||
&mut self,
|
||||
sub: bool,
|
||||
len: usize,
|
||||
_len: usize,
|
||||
filters: &Vec<TopicFilter<'a>, MAX>,
|
||||
) -> Result<(), BufferError> {
|
||||
for filter in filters {
|
||||
|
|
Loading…
Reference in New Issue
Block a user