Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Code/picocalc_keyboard/picocalc_keyboard.ino
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,17 @@ void receiveEvent(int howMany) {
write_buffer[0] = reg;
write_buffer[1] = reg_get_value(REG_ID_BKL);
} break;
case REG_ID_BK2: {
if (is_write) {
reg_set_value(REG_ID_BK2, rcv_data[1]);
// kbd_backlight_update will add 0 to the reg
// value that we just set, and apply the result
// to the backlight
kbd_backlight_update(0);
}
write_buffer[0] = reg;
write_buffer[1] = reg_get_value(REG_ID_BK2);
} break;
case REG_ID_BAT:{
//Serial1.print("REG_ID_BAT getBatteryPercent:");Serial1.print(current_bat_pcnt);Serial1.println("%");
write_buffer[0] = reg;
Expand Down