Skip to content

Commit

Permalink
usb_usb: MAX3421 task at startup loop #770
Browse files Browse the repository at this point in the history
- Poker X requires this to be enumerated
- MAX3421 task need to start at earlier stage
  • Loading branch information
tmk committed Dec 30, 2023
1 parent 0966463 commit d825356
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions converter/usb_usb/usb_usb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,17 @@ void hook_usb_wakeup(void)

usb_host.resume();
}

void hook_usb_startup_wait_loop(void)
{
usb_host.Task();

static uint8_t usb_state = 0;
if (usb_state != usb_host.getUsbTaskState()) {
usb_state = usb_host.getUsbTaskState();
dprintf("u:%02X\n", usb_state);
if (usb_state == USB_STATE_RUNNING) {
dprintf("s:%s\n", usb_host.getVbusState()==FSHOST ? "f" : "l");
}
}
}

0 comments on commit d825356

Please sign in to comment.