From 7aaced1e8bc81ebbf0a1f06fc443ea4707edd1dd Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Tue, 12 Oct 2010 12:22:11 +0000 Subject: 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(). --- Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Demos/DualRole') diff --git a/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c b/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c index 1b905b114..38acd8562 100644 --- a/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c +++ b/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c @@ -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); } -- cgit v1.2.3