Skip to content

Commit

Permalink
update docs to reflect macro changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Univa committed Mar 12, 2024
1 parent 817135d commit 67e03a8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/src/content/docs/features/feature-backlight.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
```
Expand Down
6 changes: 3 additions & 3 deletions docs/src/content/docs/features/feature-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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;

Expand Down
9 changes: 1 addition & 8 deletions docs/src/content/docs/features/feature-underglow.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/features/feature-via-vial.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
```
Expand Down

0 comments on commit 67e03a8

Please sign in to comment.