From f7b704337bf8aafcdcc1a04f26d91209a0c3c31a Mon Sep 17 00:00:00 2001 From: Haobo Gu Date: Sun, 21 Jan 2024 23:06:09 +0800 Subject: [PATCH] fix: fix project config and documentations Signed-off-by: Haobo Gu --- .vscode/settings.json | 2 +- Cargo.toml | 2 +- boards/stm32f4/Cargo.toml | 2 ++ rmk/src/layout_macro.rs | 22 ++++++++++++---------- rmk/src/lib.rs | 3 +-- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 30b7af06..4cef05ea 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,7 +8,7 @@ "--message-format=json" ], "rust-analyzer.linkedProjects": [ - "./rmk/Cargo.toml" + "rmk/Cargo.toml" ], "rust-analyzer.showUnlinkedFileNotification": false, } \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 013715ed..65bc6ae3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ members = [ "boards/rp2040", # Uncomment to choose one chip you want to use "boards/stm32h7", - #"boards/stm32f4" + # "boards/stm32f4" ] default-members = ["boards/stm32h7", "rmk"] diff --git a/boards/stm32f4/Cargo.toml b/boards/stm32f4/Cargo.toml index 420b8231..a7299817 100644 --- a/boards/stm32f4/Cargo.toml +++ b/boards/stm32f4/Cargo.toml @@ -55,3 +55,5 @@ panic-probe = {version = "0.3", features = ["print-defmt"] } name = "rmk-stm32f4" test = false bench = false + +[workspace] \ No newline at end of file diff --git a/rmk/src/layout_macro.rs b/rmk/src/layout_macro.rs index 88285610..65db1109 100644 --- a/rmk/src/layout_macro.rs +++ b/rmk/src/layout_macro.rs @@ -1,4 +1,4 @@ -/// Macro for creating layout of actions +/// Create a layer in keymap #[macro_export] macro_rules! layer { ([$([$($x: expr), +]), +]) => { @@ -6,6 +6,7 @@ macro_rules! layer { }; } +/// Create a normal keycode #[macro_export] macro_rules! k { ($k: ident) => { @@ -13,6 +14,7 @@ macro_rules! k { }; } +/// Create a normal action #[macro_export] macro_rules! a { ($a: ident) => { @@ -20,7 +22,7 @@ macro_rules! a { }; } -/// Macro for mouse key action +/// Create a mouse key action #[macro_export] macro_rules! mk { ($k: ident) => { @@ -30,7 +32,7 @@ macro_rules! mk { }; } -/// Macro for system control action +/// Create a control action #[macro_export] macro_rules! sc { ($k: ident) => { @@ -40,7 +42,7 @@ macro_rules! sc { }; } -/// Macro for consumer control action +/// Create a consumer control action #[macro_export] macro_rules! cc { ($k: ident) => { @@ -50,7 +52,7 @@ macro_rules! cc { }; } -/// Macro for layer activate +/// Create a layer activate action #[macro_export] macro_rules! mo { ($x: literal) => { @@ -58,7 +60,7 @@ macro_rules! mo { }; } -/// Macro for layer activate with modifier +/// Create a layer activate with modifier action #[macro_export] macro_rules! lm { ($x: literal, $m: expr) => { @@ -66,7 +68,7 @@ macro_rules! lm { }; } -/// Macro for layer or tap key +/// Create a layer activate action or tap key(tap/hold) #[macro_export] macro_rules! lt { ($x: literal, $k: ident) => { @@ -77,7 +79,7 @@ macro_rules! lt { }; } -/// Macro for oneshot layer +/// Create an oneshot layer key in keymap #[macro_export] macro_rules! osl { ($x: literal) => { @@ -85,7 +87,7 @@ macro_rules! osl { }; } -/// Macro for layer toggle +/// Create a layer toggle action #[macro_export] macro_rules! tg { ($x: literal) => { @@ -93,7 +95,7 @@ macro_rules! tg { }; } -/// Macro for layer or tap toggle +/// Create a layer activate or tap toggle action #[macro_export] macro_rules! tt { ($x: literal) => { diff --git a/rmk/src/lib.rs b/rmk/src/lib.rs index f291e3ea..94e2bfc4 100644 --- a/rmk/src/lib.rs +++ b/rmk/src/lib.rs @@ -13,11 +13,10 @@ use embedded_storage::nor_flash::NorFlash; use keyboard::Keyboard; use keymap::KeyMap; use usb::KeyboardUsbDevice; +use via::process::VialService; -pub use embassy_sync; pub use embassy_usb; pub use usbd_hid; -use via::process::VialService; pub mod action; pub mod debounce;