sun_usb: LED update for hotplug keyboard into converter
This commit is contained in:
parent
49b0c7e5ef
commit
a551608873
@ -101,17 +101,26 @@ uint8_t matrix_scan(void)
|
|||||||
debug_hex(code); debug(" ");
|
debug_hex(code); debug(" ");
|
||||||
|
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 0xFF: // reset success
|
case 0xFF: // reset success: FF 04
|
||||||
case 0xFE: // layout
|
print("reset: ");
|
||||||
case 0x7E: // reset fail
|
|
||||||
if (code == 0xFF) print("reset: 0xFF ");
|
|
||||||
if (code == 0x7E) print("reset fail: 0x7E ");
|
|
||||||
if (code == 0xFE) print("layout: 0xFE ");
|
|
||||||
// response byte
|
|
||||||
_delay_ms(500);
|
_delay_ms(500);
|
||||||
if (code = serial_recv()) print_hex8(code);
|
code = serial_recv();
|
||||||
print("\n");
|
xprintf("%02X\n", code);
|
||||||
// FALL THROUGH
|
if (code == 0x04) {
|
||||||
|
// LED status
|
||||||
|
led_set(host_keyboard_leds());
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
case 0xFE: // layout: FE <layout>
|
||||||
|
print("layout: ");
|
||||||
|
_delay_ms(500);
|
||||||
|
xprintf("%02X\n", serial_recv());
|
||||||
|
return 0;
|
||||||
|
case 0x7E: // reset fail: 7E 01
|
||||||
|
print("reset fail: ");
|
||||||
|
_delay_ms(500);
|
||||||
|
xprintf("%02X\n", serial_recv());
|
||||||
|
return 0;
|
||||||
case 0x7F:
|
case 0x7F:
|
||||||
// all keys up
|
// all keys up
|
||||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
|
||||||
|
Loading…
Reference in New Issue
Block a user