Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase usb host based on hasu's fork and corresponding changes to usb_usb #14154

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@
[submodule "lib/printf"]
path = lib/printf
url = https://github.com/qmk/printf
[submodule "lib/usbhost/USB_Host_Shield_2.0"]
path = lib/usbhost/USB_Host_Shield_2.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just:

Suggested change
path = lib/usbhost/USB_Host_Shield_2.0
path = lib/USB_Host_Shield_2.0

url = https://github.com/tmk/USB_Host_Shield_2.0.git
35 changes: 30 additions & 5 deletions keyboards/converter/usb_usb/custom_matrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// USB HID host
#include "Usb.h"
#include "usbhub.h"
#include "hid.h"
#include "usbhid.h"
#include "hidboot.h"
#include "parser.h"

Expand All @@ -35,6 +35,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "host.h"
#include "keyboard.h"

/* TMK specific includes
#include "hook.h"
#include "suspend.h"
#include "lufa.h"
*/


extern "C" {
#include "quantum.h"
}
Expand Down Expand Up @@ -74,10 +81,10 @@ static bool matrix_is_mod = false;
* This supports two cascaded hubs and four keyboards
*/
USB usb_host;
HIDBoot<HID_PROTOCOL_KEYBOARD> kbd1(&usb_host);
HIDBoot<HID_PROTOCOL_KEYBOARD> kbd2(&usb_host);
HIDBoot<HID_PROTOCOL_KEYBOARD> kbd3(&usb_host);
HIDBoot<HID_PROTOCOL_KEYBOARD> kbd4(&usb_host);
HIDBoot<USB_HID_PROTOCOL_KEYBOARD> kbd1(&usb_host);
HIDBoot<USB_HID_PROTOCOL_KEYBOARD> kbd2(&usb_host);
HIDBoot<USB_HID_PROTOCOL_KEYBOARD> kbd3(&usb_host);
HIDBoot<USB_HID_PROTOCOL_KEYBOARD> kbd4(&usb_host);
KBDReportParser kbd_parser1;
KBDReportParser kbd_parser2;
KBDReportParser kbd_parser3;
Expand Down Expand Up @@ -259,4 +266,22 @@ extern "C"
led_set_kb(usb_led);
}

// We need to keep doing UHS2 USB::Task() to initialize keyboard
// even during USB bus is suspended and remote wakeup is not enabled yet on LUFA side.
// This situation can happen just after pluging converter into USB port.
/*void hook_usb_suspend_loop(void)
{
#ifndef TMK_LUFA_DEBUG_UART
// This corrupts debug print when suspend
suspend_power_down();
#endif
if (USB_Device_RemoteWakeupEnabled) {
if (suspend_wakeup_condition()) {
USB_Device_SendRemoteWakeup();
}
} else {
matrix_scan();
}
}
*/
};
1 change: 1 addition & 0 deletions lib/usbhost/USB_Host_Shield_2.0
Submodule USB_Host_Shield_2.0 added at 3e8316
23 changes: 0 additions & 23 deletions lib/usbhost/USB_Host_Shield_2.0/.gitattributes

This file was deleted.

4 changes: 0 additions & 4 deletions lib/usbhost/USB_Host_Shield_2.0/.gitignore

This file was deleted.

12 changes: 0 additions & 12 deletions lib/usbhost/USB_Host_Shield_2.0/.gitmodules

This file was deleted.

Loading