Remove USB_MODE_* macros, replace with a semantically linked USB_Modes_t enum.
Moved the USB device selection logic for ENDPOINT_TOTAL_ENDPOINTS further up in Endpoint.h to where the endpoint bank capabilities are determined, to reduce the total number of device-specific logic. Change USB_Host_WaitMS() to test and disable the HSOFI interrupt before resuming the bus, so that it does not fire before the delay loop has run. Add missing const qualifier to the parameter of USB_Host_ClearPipeStall().
This commit is contained in:
parent
c1cfffd8eb
commit
7aaced1e8b
11 changed files with 77 additions and 78 deletions
|
@ -51,7 +51,7 @@ int main(void)
|
|||
for (;;)
|
||||
{
|
||||
/* Determine which USB mode we are currently in */
|
||||
if (USB_CurrentMode == USB_MODE_HOST)
|
||||
if (USB_CurrentMode == USB_MODE_Host)
|
||||
{
|
||||
MouseHostTask();
|
||||
HID_Host_USBTask(&Mouse_HID_Host_Interface);
|
||||
|
@ -87,7 +87,7 @@ void SetupHardware(void)
|
|||
void EVENT_USB_UIDChange(void)
|
||||
{
|
||||
printf_P(PSTR(ESC_FG_YELLOW "UID Change to %S mode\r\n" ESC_FG_WHITE),
|
||||
(USB_CurrentMode == USB_MODE_DEVICE) ? PSTR("Device") : PSTR("Host"));
|
||||
(USB_CurrentMode == USB_MODE_Device) ? PSTR("Device") : PSTR("Host"));
|
||||
|
||||
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue