AnsweredAssumed Answered

Read DSTS register value

Question asked by ntow on Dec 28, 2015
Latest reply on Dec 29, 2015 by ntow
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)
        USBD_LL_FlushEP(pdev, AUDIO_IN_EP);
    return USBD_OK;