{\r
uint8_t ErrorCode = HOST_ENUMERROR_NoError;\r
uint8_t SubErrorCode = HOST_ENUMERROR_NoError;\r
+ uint8_t PrevPipe = Pipe_GetCurrentPipe();\r
\r
static uint16_t WaitMSRemaining;\r
static uint8_t PostWaitState;\r
\r
- uint8_t PrevPipe = Pipe_GetCurrentPipe();\r
-\r
Pipe_SelectPipe(PIPE_CONTROLPIPE);\r
\r
switch (USB_HostState)\r
.bRequest = REQ_GetDescriptor,\r
.wValue = (DTYPE_Device << 8),\r
.wIndex = 0,\r
- .wLength = PIPE_CONTROLPIPE_DEFAULT_SIZE,\r
+ .wLength = 8,\r
};\r
\r
- uint8_t DataBuffer[PIPE_CONTROLPIPE_DEFAULT_SIZE];\r
+ uint8_t DataBuffer[8];\r
\r
if ((SubErrorCode = USB_Host_SendControlRequest(DataBuffer)) != HOST_SENDCONTROL_Successful)\r
{\r
\r
void USB_Device_GetConfiguration(void)\r
{\r
- Endpoint_ClearSETUP(); \r
+ Endpoint_ClearSETUP();\r
\r
Endpoint_Write_Byte(USB_ConfigurationNumber);\r
\r
* and that the address used is not important (other than the fact that it is non-zero), a\r
* fixed value is specified by the library.\r
*/\r
- #define USB_HOST_DEVICEADDRESS 1\r
+ #define USB_HOST_DEVICEADDRESS 1\r
\r
#if !defined(USB_HOST_TIMEOUT_MS) || defined(__DOXYGEN__)\r
/** Constant for the maximum software timeout period of sent USB control transactions to an attached\r
#define USB_Host_HostMode_On() MACROS{ USBCON |= (1 << HOST); }MACROE\r
#define USB_Host_HostMode_Off() MACROS{ USBCON &= ~(1 << HOST); }MACROE\r
\r
- #define USB_Host_VBUS_Auto_Enable() MACROS{ OTGCON &= ~(1 << VBUSHWC); UHWCON |= (1 << UVCONE); }MACROE\r
+ #define USB_Host_VBUS_Auto_Enable() MACROS{ OTGCON &= ~(1 << VBUSHWC); UHWCON |= (1 << UVCONE); }MACROE\r
#define USB_Host_VBUS_Manual_Enable() MACROS{ OTGCON |= (1 << VBUSHWC); UHWCON &= ~(1 << UVCONE); DDRE |= (1 << 7); }MACROE\r
\r
#define USB_Host_VBUS_Auto_On() MACROS{ OTGCON |= (1 << VBUSREQ); }MACROE\r