2015-12-28 12:41 AM
Hi, I need read DSTS register value (more precisely FNSOF value).
I am using the newest version of STM_Cube and I have a problem with that. Could you see if my idea is correct?#define USB_OTG_DEVICE_BASE ((uint32_t )0x800)
#define USBx_DEVICE ((USB_OTG_DeviceTypeDef *)((uint32_t )USBx + USB_OTG_DEVICE_BASE))
static uint8_t USBD_AUDIO_IsoINIncomplete (USBD_HandleTypeDef *pdev, uint8_t epnum)
{
USB_OTG_GlobalTypeDef *USBx = pdev->pData;
dpid = ((((USBx_DEVICE->DSTS))>>8)&((uint32_t)0x00000001));
if (flag)
{
flag=0;
USBD_LL_FlushEP(pdev, AUDIO_IN_EP);
};
return USBD_OK;
}
#audio #stm32 #usb #device
2015-12-29 03:08 AM