ah- / anne-key

Firmware for Anne Pro Keyboard written in Rust
Apache License 2.0
567 stars 32 forks source link

Add LedToggle function for FN+R #16

Closed MvEerd closed 6 years ago

MvEerd commented 6 years ago

This adds a state to the LED struct which is used in a toggle() function to bring the FN+R functionality closer to the stock firmware

The function currently still lacks a way to switch the LEDs to the last used theme (instead FN+U should be used after turning on the LEDs)

Sending a self.serial command to show the next theme right after self.pc15.set_high(); seems to work very rarely if at all. I assume it needs to wait until the LED chip is actually listening before sending the command but I'm not sure if there is a callback for that(?)