bool RNDIS_Device_ConfigureEndpoints(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo) { memset(&RNDISInterfaceInfo->State, 0x00, sizeof(RNDISInterfaceInfo->State)); RNDISInterfaceInfo->Config.DataINEndpoint.Type = EP_TYPE_BULK; RNDISInterfaceInfo->Config.DataOUTEndpoint.Type = EP_TYPE_BULK; RNDISInterfaceInfo->Config.NotificationEndpoint.Type = EP_TYPE_INTERRUPT; if (RNDISInterfaceInfo->Config.MessageBuffer == NULL) return false; if (RNDISInterfaceInfo->Config.MessageBufferLength < RNDIS_DEVICE_MIN_MESSAGE_BUFFER_LENGTH) return false; if (!(Endpoint_ConfigureEndpointTable(&RNDISInterfaceInfo->Config.DataINEndpoint, 1))) return false; if (!(Endpoint_ConfigureEndpointTable(&RNDISInterfaceInfo->Config.DataOUTEndpoint, 1))) return false; if (!(Endpoint_ConfigureEndpointTable(&RNDISInterfaceInfo->Config.NotificationEndpoint, 1))) return false; return true; }
bool CDC_Device_ConfigureEndpoints(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) { bool status = true; memset(&CDCInterfaceInfo->State, 0x00, sizeof(CDCInterfaceInfo->State)); CDCInterfaceInfo->Config.DataINEndpoint.Type = EP_TYPE_BULK; CDCInterfaceInfo->Config.DataOUTEndpoint.Type = EP_TYPE_BULK; CDCInterfaceInfo->Config.NotificationEndpoint.Type = EP_TYPE_INTERRUPT; if (!(Endpoint_ConfigureEndpointTable(&CDCInterfaceInfo->Config.DataINEndpoint, 1))) { status = false; } if (!(Endpoint_ConfigureEndpointTable( &CDCInterfaceInfo->Config.DataOUTEndpoint, 1))) { status = false; } if (!(Endpoint_ConfigureEndpointTable( &CDCInterfaceInfo->Config.NotificationEndpoint, 1))) { status = false; } return status; }
bool MS_Device_ConfigureEndpoints(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) { memset(&MSInterfaceInfo->State, 0x00, sizeof(MSInterfaceInfo->State)); MSInterfaceInfo->Config.DataINEndpoint.Type = EP_TYPE_BULK; MSInterfaceInfo->Config.DataOUTEndpoint.Type = EP_TYPE_BULK; if (!(Endpoint_ConfigureEndpointTable(&MSInterfaceInfo->Config.DataINEndpoint, 1))) return false; if (!(Endpoint_ConfigureEndpointTable(&MSInterfaceInfo->Config.DataOUTEndpoint, 1))) return false; return true; }
bool PRNT_Device_ConfigureEndpoints(USB_ClassInfo_PRNT_Device_t* const PRNTInterfaceInfo) { memset(&PRNTInterfaceInfo->State, 0x00, sizeof(PRNTInterfaceInfo->State)); PRNTInterfaceInfo->State.PortStatus = PRNT_PORTSTATUS_NOTERROR | PRNT_PORTSTATUS_SELECT; PRNTInterfaceInfo->Config.DataINEndpoint.Type = EP_TYPE_BULK; PRNTInterfaceInfo->Config.DataOUTEndpoint.Type = EP_TYPE_BULK; if (!(Endpoint_ConfigureEndpointTable(&PRNTInterfaceInfo->Config.DataINEndpoint, 1))) return false; if (!(Endpoint_ConfigureEndpointTable(&PRNTInterfaceInfo->Config.DataOUTEndpoint, 1))) return false; return true; }
bool RNDIS_Device_ConfigureEndpoints(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo) { memset(&RNDISInterfaceInfo->State, 0x00, sizeof(RNDISInterfaceInfo->State)); RNDISInterfaceInfo->Config.DataINEndpoint.Type = EP_TYPE_BULK; RNDISInterfaceInfo->Config.DataOUTEndpoint.Type = EP_TYPE_BULK; RNDISInterfaceInfo->Config.NotificationEndpoint.Type = EP_TYPE_INTERRUPT; if (!(Endpoint_ConfigureEndpointTable(&RNDISInterfaceInfo->Config.DataINEndpoint, 1))) return false; if (!(Endpoint_ConfigureEndpointTable(&RNDISInterfaceInfo->Config.DataOUTEndpoint, 1))) return false; if (!(Endpoint_ConfigureEndpointTable(&RNDISInterfaceInfo->Config.NotificationEndpoint, 1))) return false; return true; }