Skip to content

Commit

Permalink
feat(rmk): update to embedded-hal v1.0.0
Browse files Browse the repository at this point in the history
Signed-off-by: HaoboGu <[email protected]>
  • Loading branch information
HaoboGu committed Jan 10, 2024
1 parent d7c06d5 commit 227658e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
18 changes: 12 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rmk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
embedded-hal = { version = "0.2.7", features = ["unproven"] }
embedded-hal = "1.0.0"
embedded-storage = { version = "0.3" }
num_enum = { version = "0.7.0", default-features = false }
log = "0.4.19"
Expand Down
2 changes: 1 addition & 1 deletion rmk/src/keyboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::{
};
use core::convert::Infallible;
use embedded_alloc::Heap;
use embedded_hal::digital::v2::{InputPin, OutputPin};
use embedded_hal::digital::{InputPin, OutputPin};
use embedded_storage::nor_flash::NorFlash;
use log::{debug, warn};
use rtic_monotonics::systick::*;
Expand Down
2 changes: 1 addition & 1 deletion rmk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use action::KeyAction;
use config::KeyboardConfig;
use core::convert::Infallible;
use eeprom::{eeconfig::Eeconfig, EepromStorageConfig};
use embedded_hal::digital::v2::{InputPin, OutputPin};
use embedded_hal::digital::{InputPin, OutputPin};
use embedded_storage::nor_flash::NorFlash;
use keyboard::Keyboard;
use usb::KeyboardUsbDevice;
Expand Down
4 changes: 2 additions & 2 deletions rmk/src/matrix.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::debounce::Debouncer;
use core::convert::Infallible;
use embedded_hal::digital::v2::{InputPin, OutputPin};
use embedded_hal::digital::{InputPin, OutputPin};
use rtic_monotonics::{systick::*, Monotonic};

/// KeyState represents the state of a key.
Expand Down Expand Up @@ -88,7 +88,7 @@ impl<
// Pull up output pin, wait 1us ensuring the change comes into effect
out_pin.set_high()?;
Systick::delay(1.micros()).await;
for (in_idx, in_pin) in self.input_pins.iter().enumerate() {
for (in_idx, in_pin) in self.input_pins.iter_mut().enumerate() {
// Check input pins and debounce
self.debouncer.debounce(
in_idx,
Expand Down

0 comments on commit 227658e

Please sign in to comment.