Skip to content

Commit

Permalink
fixup! feat(example): add a USB HID keyboard example
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspar030 committed Feb 19, 2024
1 parent 132aacd commit 81571d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/embassy-usb-keyboard/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use embassy_time::Duration;
use embassy_usb::class::hid::{self, HidReaderWriter};
use riot_rs::embassy::{make_static, UsbDriver};
use riot_rs::embassy::{make_static, usb::UsbDriver};
use riot_rs::linkme::distributed_slice;
use riot_rs::rt::debug::println;

Expand All @@ -15,11 +15,11 @@ mod pins;

// TODO: wrap in macro
use riot_rs::embassy::delegate::Delegate;
static USB_BUILDER_HOOK: Delegate<riot_rs::embassy::UsbBuilder> = Delegate::new();
static USB_BUILDER_HOOK: Delegate<riot_rs::embassy::usb::UsbBuilder> = Delegate::new();

#[distributed_slice(riot_rs::embassy::USB_BUILDER_HOOKS)]
#[distributed_slice(riot_rs::embassy::usb::USB_BUILDER_HOOKS)]
#[linkme(crate=riot_rs::embassy::linkme)]
static _USB_BUILDER_HOOK: &Delegate<riot_rs::embassy::UsbBuilder> = &USB_BUILDER_HOOK;
static _USB_BUILDER_HOOK: &Delegate<riot_rs::embassy::usb::UsbBuilder> = &USB_BUILDER_HOOK;

#[embassy_executor::task]
async fn usb_keyboard(button_peripherals: pins::Buttons) {
Expand Down

0 comments on commit 81571d3

Please sign in to comment.