66 pArg = pArg; status = status;
67 transferred = transferred; remaining = remaining;
83 USBEndpointDescriptor *pEndpoints[17];
84 const USBConfigurationDescriptor *pConfiguration;
100 ((pConfiguration->bmAttributes & 0x20) > 0);
111 while (pEndpoints[i] != 0) {
153 static unsigned short data;
154 const USBConfigurationDescriptor *pConfiguration;
168 if (pDriver->
cfgnum != 0) {
192 static unsigned short data;
226 const USBDeviceDescriptor *pDevice;
227 const USBConfigurationDescriptor *pConfiguration;
228 const USBDeviceQualifierDescriptor *pQualifier;
229 const USBConfigurationDescriptor *pOtherSpeed;
230 const USBGenericDescriptor **pStrings =
232 const USBGenericDescriptor *pString;
234 uint8_t terminateWithNull = 0;
286 terminateWithNull = ((length % pDevice->bMaxPacketSize0) == 0);
333 terminateWithNull = ((length % pDevice->bMaxPacketSize0) == 0);
339 terminateWithNull ? TerminateCtrlInWithNull : 0,
350 if (indexRDesc >= numStrings)
355 pString = pStrings[indexRDesc];
362 terminateWithNull = ((length % pDevice->bMaxPacketSize0) == 0);
368 terminateWithNull ? TerminateCtrlInWithNull : 0,
376 "USBDDriver_GetDescriptor: Unknown descriptor type (%d)\n\r",
566 uint8_t *pInterfaces)
577 if (pInterfaces != 0)
579 memset(pInterfaces,
sizeof(pInterfaces), 0);
592 USBConfigurationDescriptor *pCfg;
683 "USBDDriver_RequestHandler: Unknown recipient (%d)\n\r",
715 "USBDDriver_RequestHandler: Unknown feature selector (%d)\n\r",
784 "USBDDriver_RequestHandler: Unknown feature selector (%d)\n\r",
808 "USBDDriver_RequestHandler: Unknown request code (%d)\n\r",
const uint8_t ** pStrings
#define USBD_STATUS_INVALID_PARAMETER
uint8_t USBSetAddressRequest_GetAddress(const USBGenericRequest *request)
#define USBFeatureRequest_OTG_A_HNP_SUPPORT
#define USBFeatureRequest_TESTSE0NAK
const USBDeviceQualifierDescriptor * pHsQualifier
#define USBGenericRequest_SETINTERFACE
#define USBFeatureRequest_ENDPOINTHALT
const USBDeviceDescriptor * pHsDevice
uint8_t USBD_HAL_IsHighSpeed(void)
uint8_t USBGenericRequest_GetRecipient(const USBGenericRequest *request)
#define USBFeatureRequest_TESTSENDZLP
#define USBGenericDescriptor_DEVICEQUALIFIER
uint8_t USBD_GetState(void)
#define USBGenericRequest_DEVICE
void USBD_Unhalt(uint8_t bEndpoint)
#define USBGenericDescriptor_DEVICE
const USBConfigurationDescriptor * pHsOtherSpeed
#define USBGenericRequest_SETFEATURE
void USBD_SetAddress(uint8_t address)
static void GetEndpointStatus(uint8_t bEndpoint)
static void SetInterface(USBDDriver *pDriver, uint8_t infnum, uint8_t setting)
#define USBGenericRequest_SETCONFIGURATION
const USBConfigurationDescriptor * pHsConfiguration
static void GetDescriptor(const USBDDriver *pDriver, uint8_t type, uint8_t indexRDesc, uint32_t length)
#define USBFeatureRequest_OTG_B_HNP_ENABLE
uint8_t USBD_Stall(uint8_t bEndpoint)
void USBD_SetConfiguration(uint8_t cfgnum)
void USBConfigurationDescriptor_Parse(const USBConfigurationDescriptor *configuration, USBInterfaceDescriptor **interfaces, USBEndpointDescriptor **endpoints, USBGenericDescriptor **others)
uint32_t USBGenericDescriptor_GetLength(const USBGenericDescriptor *descriptor)
uint8_t USBInterfaceRequest_GetInterface(const USBGenericRequest *request)
WEAK void USBDDriverCallbacks_InterfaceSettingChanged(uint8_t interface, uint8_t setting)
#define USBGenericRequest_GETINTERFACE
WEAK void USBDDriverCallbacks_ConfigurationChanged(uint8_t cfgnum)
uint8_t USBDDriver_IsRemoteWakeUpEnabled(const USBDDriver *pDriver)
void USBD_ConfigureEndpoint(const USBEndpointDescriptor *pDescriptor)
#define USBFeatureRequest_TESTJ
uint8_t USBD_Write(uint8_t bEndpoint, const void *pData, uint32_t dLength, TransferCallback fCallback, void *pArgument)
static USBDDriver usbdDriver
uint8_t USBSetConfigurationRequest_GetConfiguration(const USBGenericRequest *request)
uint16_t USBGenericRequest_GetLength(const USBGenericRequest *request)
uint8_t USBFeatureRequest_GetTestSelector(const USBGenericRequest *request)
#define USBGenericDescriptor_CONFIGURATION
#define USBFeatureRequest_TESTK
#define USBGenericRequest_GETDESCRIPTOR
uint8_t USBD_IsHighSpeed(void)
void USBDDriver_RequestHandler(USBDDriver *pDriver, const USBGenericRequest *pRequest)
static void GetDeviceStatus(const USBDDriver *pDriver)
USBConfigurationDescriptor * USBDDriver_GetCfgDescriptors(USBDDriver *pDriver, uint8_t cfgNum)
#define USBGenericDescriptor_STRING
static void SetConfiguration(USBDDriver *pDriver, uint8_t cfgnum)
static void GetConfiguration(const USBDDriver *pDriver)
uint8_t USBGenericRequest_GetEndpointNumber(const USBGenericRequest *request)
uint8_t USBGetDescriptorRequest_GetDescriptorType(const USBGenericRequest *request)
const USBDDriverDescriptors * pDescriptors
uint8_t USBGenericRequest_GetRequest(const USBGenericRequest *request)
const USBConfigurationDescriptor * pFsOtherSpeed
unsigned char USBConfigurationDescriptor_IsSelfPowered(const USBConfigurationDescriptor *configuration)
void(* TransferCallback)(void *pArg, uint8_t status, uint32_t transferred, uint32_t remaining)
#define USBD_STATE_CONFIGURED
void USBDDriver_clearOTGFeatures(USBDDriver *pDriver)
void USBD_Halt(uint8_t bEndpoint)
const USBDeviceQualifierDescriptor * pFsQualifier
USBInterfaceDescriptor data
uint8_t USBD_HAL_Halt(uint8_t bEndpoint, uint8_t ctl)
void USBD_Test(uint8_t bIndex)
static void USBDDriver_Test(const USBDDriver *pDriver, uint8_t test)
#define TRACE_WARNING(...)
#define USBGenericRequest_GETSTATUS
#define USBGenericRequest_GETCONFIGURATION
#define USBGenericRequest_ENDPOINT
uint8_t otg_features_supported
USBDDriver * USBD_GetDriver(void)
const USBConfigurationDescriptor * pFsConfiguration
TFSIMD_FORCE_INLINE tfScalar length(const Quaternion &q)
#define USBFeatureRequest_TESTMODE
#define USBFeatureRequest_TESTPACKET
uint32_t USBConfigurationDescriptor_GetTotalLength(const USBConfigurationDescriptor *configuration)
const USBDeviceDescriptor * pFsDevice
uint8_t USBInterfaceRequest_GetAlternateSetting(const USBGenericRequest *request)
uint16_t USBGenericRequest_GetIndex(const USBGenericRequest *request)
#define USBFeatureRequest_OTG_A_ALT_HNP_SUPPORT
#define USBGenericRequest_CLEARFEATURE
#define USBGenericDescriptor_OTHERSPEEDCONFIGURATION
uint8_t USBDDriver_returnOTGFeatures(const USBDDriver *pDriver)
uint8_t USBGetDescriptorRequest_GetDescriptorIndex(const USBGenericRequest *request)
static void GetInterface(const USBDDriver *pDriver, uint8_t infnum)
void USBDDriver_Initialize(USBDDriver *pDriver, const USBDDriverDescriptors *pDescriptors, uint8_t *pInterfaces)
uint8_t isRemoteWakeUpEnabled
#define TRACE_DEBUG_WP(...)
#define USBFeatureRequest_DEVICEREMOTEWAKEUP
#define TRACE_INFO_WP(...)
#define USBGenericRequest_SETADDRESS
uint8_t USBFeatureRequest_GetFeatureSelector(const USBGenericRequest *request)
static void TerminateCtrlInWithNull(void *pArg, uint8_t status, uint32_t transferred, uint32_t remaining)