[Keyboard] Backport two fixes from TMK: usb-usb converter (#6383)
* usb_usb: Order of init prevents uneeded bus reset7c228967a4 (diff-deed77fb597e3a0019ce59fc1d09e260)
* usb_usb: Fix startup block bugc2ce617a36 (diff-deed77fb597e3a0019ce59fc1d09e260)
This commit is contained in:
parent
4532caf5f2
commit
28f53462d0
1 changed files with 6 additions and 6 deletions
|
@ -74,8 +74,6 @@ static bool matrix_is_mod = false;
|
||||||
* This supports two cascaded hubs and four keyboards
|
* This supports two cascaded hubs and four keyboards
|
||||||
*/
|
*/
|
||||||
USB usb_host;
|
USB usb_host;
|
||||||
USBHub hub1(&usb_host);
|
|
||||||
USBHub hub2(&usb_host);
|
|
||||||
HIDBoot<HID_PROTOCOL_KEYBOARD> kbd1(&usb_host);
|
HIDBoot<HID_PROTOCOL_KEYBOARD> kbd1(&usb_host);
|
||||||
HIDBoot<HID_PROTOCOL_KEYBOARD> kbd2(&usb_host);
|
HIDBoot<HID_PROTOCOL_KEYBOARD> kbd2(&usb_host);
|
||||||
HIDBoot<HID_PROTOCOL_KEYBOARD> kbd3(&usb_host);
|
HIDBoot<HID_PROTOCOL_KEYBOARD> kbd3(&usb_host);
|
||||||
|
@ -84,6 +82,8 @@ KBDReportParser kbd_parser1;
|
||||||
KBDReportParser kbd_parser2;
|
KBDReportParser kbd_parser2;
|
||||||
KBDReportParser kbd_parser3;
|
KBDReportParser kbd_parser3;
|
||||||
KBDReportParser kbd_parser4;
|
KBDReportParser kbd_parser4;
|
||||||
|
USBHub hub1(&usb_host);
|
||||||
|
USBHub hub2(&usb_host);
|
||||||
|
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
|
@ -252,10 +252,10 @@ extern "C"
|
||||||
|
|
||||||
void led_set(uint8_t usb_led)
|
void led_set(uint8_t usb_led)
|
||||||
{
|
{
|
||||||
kbd1.SetReport(0, 0, 2, 0, 1, &usb_led);
|
if (kbd1.isReady()) kbd1.SetReport(0, 0, 2, 0, 1, &usb_led);
|
||||||
kbd2.SetReport(0, 0, 2, 0, 1, &usb_led);
|
if (kbd2.isReady()) kbd2.SetReport(0, 0, 2, 0, 1, &usb_led);
|
||||||
kbd3.SetReport(0, 0, 2, 0, 1, &usb_led);
|
if (kbd3.isReady()) kbd3.SetReport(0, 0, 2, 0, 1, &usb_led);
|
||||||
kbd4.SetReport(0, 0, 2, 0, 1, &usb_led);
|
if (kbd4.isReady()) kbd4.SetReport(0, 0, 2, 0, 1, &usb_led);
|
||||||
led_set_kb(usb_led);
|
led_set_kb(usb_led);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue