From: tmk Date: Mon, 6 May 2019 03:15:37 +0000 (+0900) Subject: usb_usb: Order of init prevents uneeded bus reset X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=7c228967a405b04d58bb06e619de8d1d7bb3c15b;p=max%2Ftmk_keyboard.git usb_usb: Order of init prevents uneeded bus reset Device classes are registered to array of config driver pool and tried in that order until proper class is found in configuration process. If tried driver cannot handle device, bus reset is issued to the device. --- diff --git a/converter/usb_usb/usb_usb.cpp b/converter/usb_usb/usb_usb.cpp index 086c90ae..75750911 100644 --- a/converter/usb_usb/usb_usb.cpp +++ b/converter/usb_usb/usb_usb.cpp @@ -71,8 +71,6 @@ static bool matrix_is_mod =false; * This supports two cascaded hubs and four keyboards */ USB usb_host; -USBHub hub1(&usb_host); -USBHub hub2(&usb_host); HIDBoot kbd1(&usb_host); HIDBoot kbd2(&usb_host); HIDBoot kbd3(&usb_host); @@ -81,6 +79,8 @@ KBDReportParser kbd_parser1; KBDReportParser kbd_parser2; KBDReportParser kbd_parser3; KBDReportParser kbd_parser4; +USBHub hub1(&usb_host); +USBHub hub2(&usb_host); uint8_t matrix_rows(void) { return MATRIX_ROWS; }