Added new RNDIS Host class driver and the beginnings of a RNDISEthernetHost Class Driver demo.

Fixed all Class drivers to ensure they have appropriate guards on each function to ensure the device is enumerated before running, fixed error codes on all guards to return "DeviceDisconnected" where possble.

Renamed HOST_SENDCONTROL_DeviceDisconnect enum value to HOST_SENDCONTROL_DeviceDisconnected to be in line with the rest of the library enum error codes.
This commit is contained in:
Dean Camera 2009-11-26 04:46:31 +00:00
parent f37d21bbe9
commit 5aa2b26261
30 changed files with 3408 additions and 71 deletions

View file

@ -176,7 +176,7 @@ uint8_t HID_Host_ReceiveReportByID(USB_ClassInfo_HID_Host_t* const HIDInterfaceI
uint8_t HID_Host_ReceiveReport(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, void* Buffer)
{
if ((USB_HostState != HOST_STATE_Configured) || !(HIDInterfaceInfo->State.IsActive))
return false;
return PIPE_READYWAIT_DeviceDisconnected;
uint8_t ErrorCode;
@ -219,9 +219,6 @@ uint8_t HID_Host_SendReportByID(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
#endif
void* Buffer, const uint16_t ReportSize)
{
if ((USB_HostState != HOST_STATE_Configured) || !(HIDInterfaceInfo->State.IsActive))
return false;
#if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
if (HIDInterfaceInfo->State.DeviceUsesOUTPipe)
{
@ -282,9 +279,6 @@ bool HID_Host_IsReportReceived(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo)
uint8_t HID_Host_SetBootProtocol(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo)
{
if (HIDInterfaceInfo->State.UsingBootProtocol)
return HOST_SENDCONTROL_Successful;
uint8_t ErrorCode;
USB_ControlRequest = (USB_Request_Header_t)