Make keys light up when pressed

This commit is contained in:
2023-04-26 18:39:47 +02:00
parent 2fc050eb4f
commit 4f59a59693
9 changed files with 245 additions and 95 deletions

View File

@ -33,7 +33,9 @@ pub async fn setup_logger_and_keyboard(usb: USB) {
}
pub fn builder(usb: USB) -> Builder<'static, Driver<'static, USB>> {
let state = STATE.init(State {
// calling init here can't panic because this function can't be called
// twice since we are taking ownership of the only USB peripheral.
let state = STATE.init_with(|| State {
device_descriptor: [0; 256],
config_descriptor: [0; 256],
bos_descriptor: [0; 256],