Adds todo
This commit is contained in:
parent
33c6b21e31
commit
9c28337d8b
|
|
@ -4,6 +4,11 @@ name = "macropad-rs"
|
|||
version = "0.1.0"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
[features]
|
||||
default = ["azerty"]
|
||||
azerty = []
|
||||
delay = []
|
||||
rng_delay = ["delay"]
|
||||
|
||||
[dependencies]
|
||||
embassy-embedded-hal = { version = "0.1.0", git = "https://github.com/embassy-rs/embassy", features = ["defmt"] }
|
||||
|
|
|
|||
11
README.md
11
README.md
|
|
@ -1,3 +1,12 @@
|
|||
# macropad-rs
|
||||
|
||||
Macropad prototype using embassy-rs
|
||||
Macropad prototype using embassy-rs
|
||||
|
||||
# TODO
|
||||
[ ] Have layouts as features
|
||||
[ ] Finish all layouts
|
||||
[ ] Have seed/rng has a feature
|
||||
[ ] Implement seed/rng
|
||||
[ ] Add delays in macros
|
||||
[ ] Better macro implementation
|
||||
[ ] Have a way to write macros without recompiling
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
//! keysend_manager.send_keypress('A'); // Simulate sending a keypress event for the letter 'A'
|
||||
//! ```
|
||||
|
||||
use embassy_time::Timer;
|
||||
use usbd_hid::descriptor::KeyboardReport;
|
||||
|
||||
use crate::{kb_macro::KBMacro, keyboard::KeyCode, ChannelType};
|
||||
|
|
@ -34,3 +35,10 @@ pub(crate) async fn send_macro(kb_mkro: KBMacro<'_>, sender: &ChannelType) {
|
|||
sender.send(*kbr).await;
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) async fn send_timing_macro(kb_mkro: KBMacro<'_>, sender: &ChannelType) {
|
||||
for kbr in kb_mkro.keys.iter() {
|
||||
Timer::after_millis(50).await;
|
||||
sender.send(*kbr).await;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in New Issue