From 67e03a84fdba6ae2ff8388840aa20397ce77b7af Mon Sep 17 00:00:00 2001 From: Univa <41708691+Univa@users.noreply.github.com> Date: Tue, 12 Mar 2024 15:28:25 -0400 Subject: [PATCH] update docs to reflect macro changes --- docs/src/content/docs/features/feature-backlight.md | 2 +- docs/src/content/docs/features/feature-storage.md | 6 +++--- docs/src/content/docs/features/feature-underglow.md | 9 +-------- docs/src/content/docs/features/feature-via-vial.md | 2 +- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/docs/src/content/docs/features/feature-backlight.md b/docs/src/content/docs/features/feature-backlight.md index 819cac1..5bbbd9f 100644 --- a/docs/src/content/docs/features/feature-backlight.md +++ b/docs/src/content/docs/features/feature-backlight.md @@ -66,7 +66,7 @@ use rumcake::keyboard; driver = "is31fl3731", // TODO: change this to your desired backlight driver, and implement the appropriate trait (info below) use_storage // Optional, if you want to save backlight configuration ), - storage = "internal" // You need to specify a storage driver if you enabled `use_storage`. See feature-storage.md for more information. + storage(driver = "internal") // You need to specify a storage driver if you enabled `use_storage`. See feature-storage.md for more information. )] struct MyKeyboard; ``` diff --git a/docs/src/content/docs/features/feature-storage.md b/docs/src/content/docs/features/feature-storage.md index e44d0d2..c5143b8 100644 --- a/docs/src/content/docs/features/feature-storage.md +++ b/docs/src/content/docs/features/feature-storage.md @@ -66,7 +66,7 @@ __config_end = __config_start + LENGTH(CONFIG); /* add this */ - The value of `__config_start` and `__config_end` must be **relative to the start address of the FLASH section**. - Note that in the above example, we subtract `ORIGIN(FLASH)` for this reason. -Finally, you can add `storage = "internal"` to your `#[keyboard]` macro invocation, and make sure to implement +Finally, you can add `storage(driver = "internal")` to your `#[keyboard]` macro invocation, and make sure to implement `StorageDevice` for your keyboard: ```rust ins={5,7,11-12} @@ -75,8 +75,8 @@ Finally, you can add `storage = "internal"` to your `#[keyboard]` macro invocati underglow( driver = "ws2812_bitbang", use_storage // This underglow feature uses storage - ) - storage = "internal" // Add this + ), + storage(driver = "internal") )] struct MyKeyboard; diff --git a/docs/src/content/docs/features/feature-underglow.md b/docs/src/content/docs/features/feature-underglow.md index add873e..2b19fc7 100644 --- a/docs/src/content/docs/features/feature-underglow.md +++ b/docs/src/content/docs/features/feature-underglow.md @@ -57,16 +57,9 @@ use rumcake::keyboard; driver = "ws2812_bitbang", // TODO: change this to your desired underglow driver, and implement the appropriate trait (info below) use_storage // Optional, if you want to save underglow configuration ) - storage = "internal" // You need to specify a storage driver if you specified `use_storage`. See feature-storage.md for more information. + storage(driver = "internal") // You need to specify a storage driver if you specified `use_storage`. See feature-storage.md for more information. )] struct MyKeyboard; - -// Underglow configuration -use rumcake::underglow::UnderglowDevice; -impl UnderglowDevice for MyKeyboard { - // Mandatory: set number of LEDs - const NUM_LEDS: usize = 20 -} ``` You will need to do additional setup for your selected storage driver as well. diff --git a/docs/src/content/docs/features/feature-via-vial.md b/docs/src/content/docs/features/feature-via-vial.md index 68f4417..214f73f 100644 --- a/docs/src/content/docs/features/feature-via-vial.md +++ b/docs/src/content/docs/features/feature-via-vial.md @@ -83,7 +83,7 @@ use rumcake::keyboard; via( use_storage // Optional, if you want to save Via configuration ), - storage = "internal" // You need to specify a storage driver if you specified `use_storage`. See feature-storage.md for more information. + storage(driver = "internal") // You need to specify a storage driver if you specified `use_storage`. See feature-storage.md for more information. )] struct MyKeyboard; ```