Adds todo

This commit is contained in:
Dandaedre 2024-03-15 22:02:40 +01:00
parent 33c6b21e31
commit 9c28337d8b
3 changed files with 23 additions and 1 deletions

View File

@ -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"] }

View File

@ -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

View File

@ -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;
}
}