Skip to content

Commit

Permalink
merge misc-api-changes:
Browse files Browse the repository at this point in the history
commit 9a645fd
Author: Univa <41708691+Univa@users.noreply.github.com>
Date:   Wed Apr 3 13:03:36 2024 -0400

    move display driver traits

commit 52f51f8
Author: Univa <41708691+Univa@users.noreply.github.com>
Date:   Wed Apr 3 12:27:59 2024 -0400

    move split driver traits

commit eb32fc7
Author: Univa <41708691+Univa@users.noreply.github.com>
Date:   Wed Apr 3 11:55:43 2024 -0400

    mark some enums as non-exhaustive, u8 repr, explicit discriminants

commit f02e391
Author: Univa <41708691+Univa@users.noreply.github.com>
Date:   Wed Apr 3 11:19:37 2024 -0400

    use const generics for ws2812 bitbang driver

commit 80d4bea
Author: Univa <41708691+Univa@users.noreply.github.com>
Date:   Wed Apr 3 10:59:12 2024 -0400

    forgot to remove unused drivers feature flag

commit ff4a8cc
Author: Univa <41708691+Univa@users.noreply.github.com>
Date:   Wed Apr 3 10:58:00 2024 -0400

    make via also enable the storage feature

commit d3d822c
Author: Univa <41708691+Univa@users.noreply.github.com>
Date:   Wed Apr 3 10:57:11 2024 -0400

    add forgotten awaits

commit f6566f2
Author: Univa <41708691+Univa@users.noreply.github.com>
Date:   Tue Apr 2 22:06:31 2024 -0400

    overhaul macros, remove re-exports

commit 297ae98
Author: Univa <41708691+Univa@users.noreply.github.com>
Date:   Sun Mar 31 21:49:03 2024 -0400

    replace hid send/receive channels with hiddevice trait

commit 030e9a0
Author: Univa <41708691+Univa@users.noreply.github.com>
Date:   Sun Mar 31 15:04:47 2024 -0400

    storage service refactoring

commit 6145070
Author: Univa <41708691+Univa@users.noreply.github.com>
Date:   Sat Mar 30 22:10:43 2024 -0400

    remove once_cell from layout struct

commit c1ec9ea
Author: Univa <41708691+Univa@users.noreply.github.com>
Date:   Sat Mar 30 20:38:30 2024 -0400

    replace `POLLED_EVENTS_CHANNEL` with trait function in `KeyboardLayout` and `PeripheralDevice`

commit d4ad2b2
Author: Univa <41708691+Univa@users.noreply.github.com>
Date:   Sat Mar 30 19:22:36 2024 -0400

    move `BluetoothCommand` to the `hw` module and rename it to `HardwareCommand`

commit 28946c2
Author: Univa <41708691+Univa@users.noreply.github.com>
Date:   Sat Mar 30 17:45:58 2024 -0400

    add `CentralDevice` trait to replace MESSAGE_TO_PERIPHERALS channel

commit 063ccad
Author: Univa <41708691+Univa@users.noreply.github.com>
Date:   Sat Mar 30 16:37:47 2024 -0400

    use associated type for via

commit 4ee41ef
Author: Univa <41708691+Univa@users.noreply.github.com>
Date:   Sat Mar 30 15:44:15 2024 -0400

    use layer struct to parse some macros

commit e17567c
Author: Univa <41708691+Univa@users.noreply.github.com>
Date:   Sat Mar 30 15:25:17 2024 -0400

    improve macro error reporting

commit 10b0c03
Author: Univa <41708691+Univa@users.noreply.github.com>
Date:   Sat Mar 30 13:48:10 2024 -0400

    rename `mcu` module to `platform`

commit e9e09fb
Author: Univa <41708691+Univa@users.noreply.github.com>
Date:   Thu Mar 28 20:16:26 2024 -0400

    merge backlighting and underglow into a single lighting module

    - this also removes the `pub static` items like command channels, and instead replaces them with trait functions `get_command_channel`, `get_state`, `get_save_signal`, etc.
    - these changes also enable different backlighting types to be used at the same time, instead of only being able to use one of simple-backlight, simple-backlight-matrix or rgb-backlight-matrix at a time.
    - all lighting types use the same `lighting_task` and `lighting_storage_task`, using an `Animator` trait, which can be implemented by the user to allow for custom animators
    - #[keyboard] macro usage for lighting has been updated accordingly to support the ability to have multiple lighting types share the same task as well.
    - associated type items have been added to the `KeyboardLayout` trait and also a new `PeripheralDevice` trait, which can be used to control how the `layout_collect` and `peripheral_task` communicate with these lighting systems, respectively.
  • Loading branch information
Univa committed Apr 3, 2024
1 parent 4b7ac44 commit d352912
Show file tree
Hide file tree
Showing 64 changed files with 6,938 additions and 5,844 deletions.
138 changes: 90 additions & 48 deletions docs/src/content/docs/features/feature-backlight.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,41 @@ Some drivers may not be able to support all backlight types.

## Required code

To set up backlighting, you must add `<backlight_type>(driver = "<driver>")` to your `#[keyboard]` macro invocation,
and your keyboard must implement the `BacklightDevice` trait.
To set up backlighting, you must create a new type to implement traits on.
Then, you can add `<backlight_type>(id = <type>, driver_setup_fn = <setup_fn>)` to your `#[keyboard]` macro
invocation. Your new type must implement the appropriate traits depending on the type of lighting you're using:

```rust ins={5-7,11-16}
- `simple_backlight`: [`SimpleBacklightDevice`](/rumcake/api/nrf52840/rumcake/lighting/simple_backlight/trait.SimpleBacklightDevice.html)
- `simple_backlight_matrix`: [`SimpleBacklightMatrixDevice`](/rumcake/api/nrf52840/rumcake/lighting/simple_backlight_matrix/trait.SimpleBacklightMatrixDevice.html)
- `rgb_backlight_matrix`: [`RGBBacklightMatrixDevice`](/rumcake/api/nrf52840/rumcake/lighting/rgb_backlight_matrix/trait.RGBBacklightMatrixDevice.html)

The `driver_setup_fn` must be an async function that has no parameters, and returns a type that implements the appropriate
driver trait:

- `simple_backlight`: [`SimpleBacklightDriver<T>`](/rumcake/api/nrf52840/rumcake/lighting/simple_backlight/trait.SimpleBacklightDriver.html)
- `simple_backlight_matrix`: [`SimpleBacklightMatrixDriver<T>`](/rumcake/api/nrf52840/rumcake/lighting/simple_backlight_matrix/trait.SimpleBacklightMatrixDriver.html)
- `rgb_backlight_matrix`: [`RGBBacklightMatrixDriver<T>`](/rumcake/api/nrf52840/rumcake/lighting/rgb_backlight_matrix/trait.RGBBacklightMatrixDriver.html)

```rust ins={5-8,13-22}
use rumcake::keyboard;

#[keyboard(
// somewhere in your keyboard macro invocation ...
simple_backlight_matrix( // TODO: Change this to `rgb_backlight_matrix` or `simple_backlight` if that's what you want.
driver = "is31fl3731", // TODO: change this to your desired backlight driver, and implement the appropriate trait (info below)
id = MyKeyboardLighting,
driver_setup_fn = my_backlight_setup,
)
)]
struct MyKeyboard;

// Backlight configuration
use rumcake::backlight::BacklightDevice;
impl BacklightDevice for MyKeyboard {
use rumcake::lighting::simple_backlight_matrix::{SimpleBacklightMatrixDevice, SimpleBacklightMatrixDriver};
struct MyKeyboardLighting; // New type to implement lighting traits on
async fn my_backlight_setup() -> impl SimpleBacklightMatrixDriver<MyKeyboardLighting> {
// TODO: We will fill this out soon!
todo!()
}
impl SimpleBacklightMatrixDevice for MyKeyboardLighting {
// optionally, set FPS
const FPS: usize = 20;
}
Expand All @@ -57,13 +75,14 @@ hue, saturation, effect, etc.) will **NOT** be saved by default.

Optionally, you can add `use_storage`, and a `storage` driver to save backlight config data.

```rust ins={7,9}
```rust ins={8,10}
use rumcake::keyboard;

#[keyboard(
// somewhere in your keyboard macro invocation ...
simple_backlight_matrix( // TODO: Change this to `rgb_backlight_matrix` or `simple_backlight` if that's what you want.
driver = "is31fl3731", // TODO: change this to your desired backlight driver, and implement the appropriate trait (info below)
id = MyKeyboardLighting,
driver_setup_fn = my_backlight_setup,
use_storage // Optional, if you want to save backlight configuration
),
storage(driver = "internal") // You need to specify a storage driver if you enabled `use_storage`. See feature-storage.md for more information.
Expand All @@ -77,35 +96,41 @@ For more information, see the docs for the [storage feature](../feature-storage/

If you're implementing a backlight matrix (either the `simple-backlight-matrix` or `rgb-backlight-matrix`), your keyboard must also implement the `BacklightMatrixDevice` trait:

```rust ins={18-37}
```rust ins={14,25-42}
use rumcake::keyboard;

#[keyboard(
// somewhere in your keyboard macro invocation ...
simple_backlight_matrix( // TODO: Change this to `rgb_backlight_matrix` or `simple_backlight` if that's what you want.
driver = "is31fl3731", // TODO: change this to your desired backlight driver, and implement the appropriate trait (info below)
id = MyKeyboardLighting,
driver_setup_fn = my_backlight_setup,
)
)]
struct MyKeyboard;

// Backlight configuration
use rumcake::backlight::BacklightDevice;
impl BacklightDevice for MyKeyboard {
use rumcake::lighting::simple_backlight_matrix::{SimpleBacklightMatrixDevice, SimpleBacklightMatrixDriver};
use rumcake::lighting::{BacklightMatrixDevice, setup_backlight_matrix};
struct MyKeyboardLighting;
async fn my_backlight_setup() -> impl SimpleBacklightMatrixDriver<MyKeyboardLighting> {
// TODO: We will fill this out soon!
todo!()
}
impl SimpleBacklightMatrixDevice for MyKeyboardLighting {
// optionally, set FPS
const FPS: usize = 20;
}

use rumcake::backlight::{BacklightMatrixDevice, setup_backlight_matrix};
impl BacklightMatrixDevice for MyKeyboard {
impl BacklightMatrixDevice for MyKeyboardLighting {
setup_backlight_matrix! {
{ // LED layout
led_layout: {
[ (0,0) (17,0) (34,0) (51,0) (68,0) (85,0) (102,0) (119,0) (136,0) (153,0) (170,0) (187,0) (204,0) (221,0) (238,0) (255,0) ]
[ (4,17) (26,17) (43,17) (60,17) (77,17) (94,17) (111,17) (128,17) (145,17) (162,17) (178,17) (196,17) (213,17) (234,17) (255,17) ]
[ (6,34) (30,34) (47,34) (64,34) (81,34) (98,34) (115,34) (132,34) (149,34) (166,34) (183,34) (200,34) (227,34) (227,34) (255,34) ]
[ (11,51) (0,0) (38,51) (55,51) (72,51) (89,51) (106,51) (123,51) (140,51) (157,51) (174,51) (191,51) (208,51) (231,51) (255,51) ]
[ (28,68) (49,68) (79,68) (121,68) (155,68) (176,68) (196,68) (213,68) (230,68) ]
}
{ // LED flags (must have same number of rows and columns as the layout above)
},
led_flags: { // must have same number of rows and columns as the layout above
[ NONE NONE NONE NONE NONE NONE NONE NONE NONE NONE NONE NONE NONE NONE NONE NONE ]
[ NONE NONE NONE NONE NONE NONE NONE NONE NONE NONE NONE NONE NONE NONE NONE ]
[ NONE NONE NONE NONE NONE NONE NONE NONE NONE NONE NONE NONE NONE NONE NONE ]
Expand All @@ -123,33 +148,41 @@ Note that for reactive effects, matrix positions will map directly to LED positi
a key at switch matrix position row 0, column 0, will correspond to the LED at row 0, column 0 on your LED matrix.
:::

Lastly, you must also implement the appropriate trait that corresponds to your chosen driver in the `#[keyboard]` macro.
Check the [list of available backlight drivers](#available-drivers) for this information.
Lastly, you must set up the driver. To do this, you need to complete your `driver_setup_fn` by constructing the driver.
You can [check the API reference for your chosen driver](/rumcake/api/nrf52840/rumcake/drivers/index.html) for a set up
function or macro to make this process easier.

For example, with `is31fl3731`, you must implement `IS31FL3731DriverSettings` and `IS31FL3731BacklightDriver`:
Depending on the driver, you may also need to implement the appropriate trait that corresponds to your chosen driver.
Check the [list of available backlight drivers](#available-drivers) for this information.

```rust ins={3-30}
// later in your file...
For example, with `is31fl3731`, you must implement `IS31FL3731BacklightDriver`, and you can use the `setup_is31fl3731!` macro to set up the driver:

use rumcake::hw::mcu::setup_i2c;
use rumcake::drivers::is31fl3731::backlight::{
get_led_from_matrix_coordinates, IS31FL3731BacklightDriver
```rust del={9-10} ins={3-5,11-23,25-34}
use rumcake::lighting::simple_backlight_matrix::{SimpleBacklightMatrixDevice, SimpleBacklightMatrixDriver};
use rumcake::lighting::{BacklightMatrixDevice, setup_backlight_matrix};
use rumcake::hw::platform::setup_i2c;
use rumcake::drivers::is31fl3731::{
get_led_from_matrix_coordinates, setup_is31fl3731, IS31FL3731BacklightDriver
};
// Note: The IS31FL3731DriverSettings trait does NOT come from the `rumcake` library. It is generated by the `keyboard` macro.
impl IS31FL3731DriverSettings for MyKeyboard {
const LED_DRIVER_ADDR: u8 = 0b1110100; // see https://github.com/qmk/qmk_firmware/blob/d9fa80c0b0044bb951694aead215d72e4a51807c/docs/feature_rgb_matrix.md#is31fl3731-idis31fl3731

setup_i2c! { // Note: The arguments of setup_i2c may change depending on platform. This assumes STM32.
I2C1_EV, // Event interrupt
I2C1_ER, // Error interrupt
I2C1, // I2C peripheral
PB6, // SCL
PB7, // SDA
DMA1_CH7, // RX DMA Channel
DMA1_CH6 // TX DMA Channel
struct MyKeyboardLighting;
async fn my_backlight_setup() -> impl SimpleBacklightMatrixDriver<MyKeyboardLighting> {
// TODO: We will fill this out soon!
todo!()
setup_is31fl3731! {
device: MyKeyboardLighting, // Must be a type that implements IS31FL3731BacklightDriver
address: 0b1110100, // see https://github.com/qmk/qmk_firmware/blob/d9fa80c0b0044bb951694aead215d72e4a51807c/docs/feature_rgb_matrix.md#is31fl3731-idis31fl3731
i2c: setup_i2c! { // Note: The arguments of setup_i2c may change depending on platform. This assumes STM32.
event_interrupt: I2C1_EV,
error_interrupt: I2C1_ER,
i2c: I2C1,
scl: PB6,
sda: PB7,
rx_dma: DMA1_CH7,
tx_dma: DMA1_CH6,
}
}
}
impl IS31FL3731BacklightDriver for MyKeyboard {
impl IS31FL3731BacklightDriver for MyKeyboardLighting {
// This must have the same number of rows and columns as specified in your `BacklightMatrixDevice` implementation.
get_led_from_matrix_coordinates! {
[ C1_1 C1_2 C1_3 C1_4 C1_5 C1_6 C1_7 C1_8 C1_9 C1_10 C1_11 C1_12 C1_13 C1_14 C1_15 C2_15 ]
Expand All @@ -159,6 +192,10 @@ impl IS31FL3731BacklightDriver for MyKeyboard {
[ C5_2 C5_3 C5_6 C5_7 C5_10 C5_11 C5_12 C5_13 C5_14 ]
}
}

impl SimpleBacklightMatrixDevice for MyKeyboardLighting { /* ... */ }
impl BacklightMatrixDevice for MyKeyboardLighting { /* ... */ }

```

:::note
Expand Down Expand Up @@ -202,32 +239,37 @@ In your `keyberon` layout, you can use `{Custom(SimpleBacklight(<command>))}`,
`{Custom(SimpleBacklightMatrix(<command>))}`, `{Custom(RGBBacklightMatrix(<command>))}`,
depending on what type of backlight system you are using.

Additionally, you must choose the backlight system that the keycodes will correspond to by
implementing one of the associated types `SimpleBacklightDeviceType`, `SimpleBacklightMatrixDeviceType`,
`RGBBacklightDeviceType`.

Example of usage:

```rust
```rust ins={14}
use keyberon::action::Action::*;
use rumcake::backlight::animations::BacklightCommand::*;
use rumcake::lighting::simple_backlight_matrix::SimpleBacklightMatrixCommand::*;
use rumcake::keyboard::{build_layout, Keyboard, Keycode::*};

/* ... */
impl KeyboardLayout for MyKeyboard {
/* ... */

build_layout! {
{
[ Escape {Custom(SimpleBacklightMatrix(Toggle))} A B C]
}
}

type SimpleBacklightMatrixDeviceType = MyKeyboardLighting;
}
```

# To-do List

- [ ] RGB Backlight animations
- [ ] Allow different backlighting systems to be used at the same time

# Available Drivers

| Name | Feature Flag | `keyboard` Macro Driver String | Required Traits |
| -------------- | ---------------- | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| IS31FL3731 | `is31fl3731` | `"is31fl3731"` | `IS31FL3731DriverSettings`[^1], [`IS31FL3731BacklightDriver`](/rumcake/api/nrf52840/rumcake/drivers/is31fl3731/backlight/trait.IS31FL3731BacklightDriver.html) |
| WS2812 Bitbang | `ws2812_bitbang` | `"ws2812_bitbang"` | `WS2812BitbangDriverSettings`[^1], [`WS2812BitbangBacklightDriver`](/rumcake/api/nrf52840/rumcake/drivers/ws2812_bitbang/backlight/trait.WS2812BitbangBacklightDriver.html) |

[^1]: This trait is generated by the `keyboard` macro, and not included in the `rumcake` API.
| Name | Feature Flag | Required Traits |
| -------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| IS31FL3731 | `is31fl3731` | [`IS31FL3731BacklightDriver`](/rumcake/api/nrf52840/rumcake/drivers/is31fl3731/backlight/trait.IS31FL3731BacklightDriver.html) |
| WS2812 Bitbang | `ws2812_bitbang` | [`WS2812BitbangBacklightDriver`](/rumcake/api/nrf52840/rumcake/drivers/ws2812_bitbang/backlight/trait.WS2812BitbangBacklightDriver.html) |
12 changes: 7 additions & 5 deletions docs/src/content/docs/features/feature-bluetooth-host.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use rumcake::keyboard;
)]
struct MyKeyboard;

use rumcake::hw::mcu::BluetoothDevice;
use rumcake::hw::platform::BluetoothDevice;
impl BluetoothDevice for WingpairLeft {
// This addresses can be whatever you want, as long as it is a valid "Random Static" bluetooth addresses.
// See "Random Static Address" in this link: https://novelbits.io/bluetooth-address-privacy-ble/
Expand All @@ -71,14 +71,16 @@ Also check the sections below for more information.

# Keycodes

In your keyberon layout, you can use any of the enum members defined in `BluetoothCommand`:
In your keyberon layout, you can use any of the enum members defined in `HardwareCommand`:

```rust
ToggleOutput // Only available if the `usb` feature flag is also enabled. More information below.
OutputUSB // Only available if the `usb` feature flag is also enabled. More information below.
OutputBluetooth // Only available if the `usb` feature flag is also enabled. More information below.
ToggleOutput
OutputUSB
OutputBluetooth
```

More information below.

## USB host communication interoperability

By default, your keyboard will use Bluetooth to communicate with your device.
Expand Down
75 changes: 42 additions & 33 deletions docs/src/content/docs/features/feature-display.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,58 +18,68 @@ You must enable the following `rumcake` features:

## Required code

To set up your display, you must add `display(driver = "<driver>")` to your `#[keyboard]` macro invocation,
To set up your display, you must add `display(driver_setup_fn = <setup_fn>)` to your `#[keyboard]` macro invocation,
and your keyboard must implement the `DisplayDevice` trait.

```rust ins={5-7,11-17}
The `driver_setup_fn` must be an async function that has no parameters, and returns a type that implements the
[`DisplayDriver<T>`](/rumcake/api/nrf52840/rumcake/display/drivers/index.html) trait.

```rust ins={5-7,11-21}
use rumcake::keyboard;

#[keyboard(
// somewhere in your keyboard macro invocation ...
display(
driver = "ssd1306" // TODO: change this to your desired display driver, and implement the appropriate trait (info below)
driver_setup_fn = my_display_setup
)
)]
struct MyKeyboard;

// Display configuration
use rumcake::display::DisplayDevice;
use rumcake::display::{DisplayDevice, DisplayDriver};
async fn my_display_setup() -> impl DisplayDriver<MyKeyboard> {
// TODO: We will fill this out soon!
todo!()
}
impl DisplayDevice for MyKeyboard {
// Optional: set timeout and FPS
const FPS: usize = 0 // Only update the display when information changes. Change this if you are displaying animations.
const TIMEOUT: usize = 20
}
```

Lastly, you must also implement the appropriate trait that corresponds to your chosen driver in the `#[keyboard]` macro.
Lastly, you must set up the driver. To do this, you need to complete your `driver_setup_fn` by constructing the driver.
You can [check the API reference for your chosen driver](/rumcake/api/nrf52840/rumcake/drivers/index.html) for a set up
function or macro to make this process easier.

Depending on the driver, you may also need to implement the appropriate trait that corresponds to your chosen driver.
Check the [list of available display drivers](#available-drivers) for this information.

For example, with `ssd1306`, you must implement `Ssd1306I2cDriverSettings` and `Ssd1306I2cDisplayDriver`:

```rust ins={3-23}
// later in your file...

use rumcake::hw::mcu::setup_i2c_blocking;
use rumcake::drivers::ssd1306::driver::size::DisplaySize128x32;
use rumcake::drivers::ssd1306::display::Ssd1306I2cDisplayDriver;
// Note: The Ssd1306I2cDriverSettings trait does NOT come from the `rumcake` library. It is generated by the `keyboard` macro.
impl Ssd1306I2cDriverSettings for MyKeyboard {
// Set size of the display
type SIZE_TYPE = DisplaySize128x32;
const SIZE: Self::SIZE_TYPE = DisplaySize128x32;

// Optional: set rotation
const ROTATION: DisplayRotation = DisplayRotation::Rotate90;

// Set up the I2C peripheral to communicate with the SSD1306 screen
setup_i2c_blocking! {
SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0,
TWISPI0,
P0_17,
P0_20
For example, with `ssd1306`, you must implement `Ssd1306I2cDisplayDriver`, and you can use the `setup_ssd1306!` macro to set up the driver:

```rust del={4-5} ins={2,6-19,21}
use rumcake::display::{DisplayDevice, DisplayDriver};
use rumcake::drivers::ssd1306::{setup_ssd1306, Ssd1306I2cDisplayDriver};
async fn my_display_setup() -> impl DisplayDriver<MyKeyboard> {
// TODO: We will fill this out soon!
todo!()
setup_ssd1306! {
i2c: setup_i2c! { // Note: The arguments of setup_i2c may change depending on platform. This assumes STM32.
event_interrupt: I2C1_EV,
error_interrupt: I2C1_ER,
i2c: I2C1,
scl: PB6,
sda: PB7,
rx_dma: DMA1_CH7,
tx_dma: DMA1_CH6,
},
// See the API reference for the ssd1306 crate for `size` and `rotation` values: https://docs.rs/ssd1306/latest/ssd1306/
size: DisplaySize96x16,
rotation: Rotate90,
}
}
impl Ssd1306I2cDisplayDriver for MyKeyboard {}
impl DisplayDevice for MyKeyboard { /* ... */ }
```

# Custom graphics
Expand Down Expand Up @@ -98,7 +108,7 @@ use rumcake::drivers::ssd1306::driver::mode::BufferedGraphicsMode;
use rumcake::drivers::ssd1306::driver::prelude::I2CInterface;
use rumcake::drivers::ssd1306::driver::size::{DisplaySize, DisplaySize128x32};
use rumcake::drivers::ssd1306::driver::Ssd1306;
use rumcake::drivers::ssd1306::display::Ssd1306I2cDisplayDriver;
use rumcake::drivers::ssd1306::Ssd1306I2cDisplayDriver;

pub static DEFAULT_STYLE: MonoTextStyle<'_, BinaryColor> = MonoTextStyleBuilder::new()
.font(&FONT_5X8)
Expand Down Expand Up @@ -128,9 +138,8 @@ impl Ssd1306I2cDisplayDriver for MyKeyboard {

# Available Drivers

| Name | Feature Flag | `keyboard` Macro Driver String | Required Traits |
| ----------- | ------------ | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| SSD1306[^1] | `ssd1306` | `"ssd1306"` | `Ssd1306I2cDriverSettings`[^2], [`Ssd1306I2cDisplayDriver`](/rumcake/api/nrf52840/rumcake/drivers/ssd1306/display/trait.Ssd1306I2cDisplayDriver.html) |
| Name | Feature Flag | Required Traits |
| ----------- | ------------ | --------------------------------------------------------------------------------------------------------------------- |
| SSD1306[^1] | `ssd1306` | [`Ssd1306I2cDisplayDriver`](/rumcake/api/nrf52840/rumcake/drivers/ssd1306/display/trait.Ssd1306I2cDisplayDriver.html) |

[^1]: I2C only
[^2]: This trait is generated by the `keyboard` macro, and not included in the `rumcake` API.
Loading

0 comments on commit d352912

Please sign in to comment.