diff --git a/Cargo.toml b/Cargo.toml index 8027e3a..3623a68 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ readme = "README.md" [dependencies] keyberon-macros = { version = "0.1.0", path = "./keyberon-macros" } either = { version = "1.6", default-features = false } -embedded-hal = { version = "0.2", features = ["unproven"] } +embedded-hal = { version = "1.0" } usb-device = "0.2" heapless = "0.7" arraydeque = { version = "0.4.5", default-features = false } diff --git a/src/hid.rs b/src/hid.rs index 2cddcf3..798f657 100644 --- a/src/hid.rs +++ b/src/hid.rs @@ -120,7 +120,11 @@ impl HidClass<'_, B, D> { } } - pub fn new_with_polling_interval(device: D, alloc: &UsbBusAllocator, interval: u8) -> HidClass<'_, B, D> { + pub fn new_with_polling_interval( + device: D, + alloc: &UsbBusAllocator, + interval: u8, + ) -> HidClass<'_, B, D> { let max_packet_size = device.max_packet_size(); HidClass { device, diff --git a/src/matrix.rs b/src/matrix.rs index 1f4e0ad..718c57e 100644 --- a/src/matrix.rs +++ b/src/matrix.rs @@ -1,6 +1,5 @@ //! Hardware pin switch matrix handling. - -use embedded_hal::digital::v2::{InputPin, OutputPin}; +use embedded_hal::digital::{InputPin, OutputPin}; /// Describes the hardware-level matrix of switches. /// @@ -65,7 +64,7 @@ where for (ri, row) in self.rows.iter_mut().enumerate() { row.set_low()?; delay(); - for (ci, col) in self.cols.iter().enumerate() { + for (ci, col) in self.cols.iter_mut().enumerate() { if col.is_low()? { keys[ri][ci] = true; } @@ -124,7 +123,7 @@ where let mut keys = [[false; CS]; RS]; for (ri, row) in self.pins.iter_mut().enumerate() { - for (ci, col_option) in row.iter().enumerate() { + for (ci, col_option) in row.iter_mut().enumerate() { if let Some(col) = col_option { if col.is_low()? { keys[ri][ci] = true;