96 #ifdef VBUS_SENSING_ENABLED 111 #ifdef USB_OTG_HS_DEDICATED_EP1_ENABLED 165 uint32_t fifoemptymsk, msk, emp;
169 msk |= ((emp >> 1 ) & 0x1) << 7;
174 fifoemptymsk = 0x1 << 1;
220 if (!gintr_status.
d32)
286 #ifdef VBUS_SENSING_ENABLED 289 retval |= DCD_SessionRequest_ISR(pdev);
294 retval |= DCD_OTG_ISR(pdev);
299 #define USB_OTG_GAHBCFG_GINT_Pos (0U) 300 #define USB_OTG_GAHBCFG_GINT_Msk (0x1U << USB_OTG_GAHBCFG_GINT_Pos) 301 #define USB_OTG_GAHBCFG_GINT USB_OTG_GAHBCFG_GINT_Msk 302 *(__IO uint32_t *)(&pdev->regs.GREGS->GAHBCFG) &= USB_OTG_GAHBCFG_GINT; // disable global interrupt - from F4 Arduino 326 #ifdef VBUS_SENSING_ENABLED 416 __IO uint8_t prev_status = 0;
441 SCB->SCR |= (SCB_SCR_SLEEPDEEP_Msk | SCB_SCR_SLEEPONEXIT_Msk);
458 uint32_t fifoemptymsk;
469 fifoemptymsk = 0x1 << epnum;
684 len32b = (len + 3) / 4;
700 len32b = (len + 3) / 4;
708 uint32_t fifoemptymsk = 1 << ep->
num;
764 #ifdef USB_OTG_HS_DEDICATED_EP1_ENABLED 772 #ifdef USB_OTG_HS_DEDICATED_EP1_ENABLED 882 uint32_t
v, msk, emp;
885 msk |= ((emp >> epnum) & 0x1) << 7;
USB_OTG_STS USB_OTG_FlushTxFifo(USB_OTG_CORE_HANDLE *pdev, uint32_t num)
USB_OTG_FlushTxFifo : Flush a Tx FIFO.
uint32_t USB_OTG_ReadDevAllOutEp_itr(USB_OTG_CORE_HANDLE *pdev)
USB_OTG_ReadDevAllOutEp_itr : returns OUT endpoint interrupt bits.
uint8_t(* IsoOUTIncomplete)(USB_OTG_CORE_HANDLE *pdev)
struct _USB_OTG_GINTMSK_TypeDef::@56 b
#define USB_OTG_EP0_STATUS_IN
USB_OTG_STS USB_OTG_WritePacket(USB_OTG_CORE_HANDLE *pdev, const uint8_t *src, uint8_t ch_ep_num, uint16_t len)
USB_OTG_WritePacket : Writes a packet into the Tx FIFO associated with the EP.
uint32_t USB_OTG_ReadDevOutEP_itr(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
USB_OTG_ReadDevOutEP_itr : returns Device OUT EP Interrupt register.
USBD_DCD_INT_cb_TypeDef * USBD_DCD_INT_fops
#define USB_OTG_HS_MAX_PACKET_SIZE
static uint32_t DCD_HandleUSBSuspend_ISR(USB_OTG_CORE_HANDLE *pdev)
USB_OTG_HandleUSBSuspend_ISR Indicates that SUSPEND state has been detected on the USB...
struct _USB_OTG_DOEPINTn_TypeDef::@69 b
void USB_OTG_EP0_OutStart(USB_OTG_CORE_HANDLE *pdev)
configures EPO to receive SETUP packets
uint8_t setup_packet[8 *3]
struct _USB_OTG_DRXSTS_TypeDef::@58 b
uint8_t(* Reset)(USB_OTG_CORE_HANDLE *pdev)
USB_OTG_STS USB_OTG_EP0Activate(USB_OTG_CORE_HANDLE *pdev)
enables EP0 OUT to receive SETUP packets and configures EP0 for transmitting packets ...
uint8_t(* DevConnected)(USB_OTG_CORE_HANDLE *pdev)
uint8_t(* IsoINIncomplete)(USB_OTG_CORE_HANDLE *pdev)
static uint32_t DCD_ReadDevInEP(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
DCD_ReadDevInEP Reads ep flags.
#define USB_OTG_EP0_STATUS_OUT
struct _USB_OTG_DIEPINTn_TypeDef::@68 b
enum USB_OTG_SPEED USB_OTG_GetDeviceSpeed(USB_OTG_CORE_HANDLE *pdev)
USB_OTG_GetDeviceSpeed Get the device speed from the device status register.
static uint32_t DCD_HandleUsbReset_ISR(USB_OTG_CORE_HANDLE *pdev)
DCD_HandleUsbReset_ISR This interrupt occurs when a USB Reset is detected.
uint8_t USB_OTG_IsDeviceMode(USB_OTG_CORE_HANDLE *pdev)
USB_OTG_IsDeviceMode : Check if it is device mode.
struct _USB_OTG_DSTS_TypeDef::@67 b
static uint32_t DCD_WriteEmptyTxFifo(USB_OTG_CORE_HANDLE *pdev, uint32_t epnum)
DCD_WriteEmptyTxFifo check FIFO for the next packet to be loaded.
static uint32_t DCD_HandleInEP_ISR(USB_OTG_CORE_HANDLE *pdev)
DCD_HandleInEP_ISR Indicates that an IN EP has a pending Interrupt.
static uint32_t DCD_IsoINIncomplete_ISR(USB_OTG_CORE_HANDLE *pdev)
DCD_IsoINIncomplete_ISR handle the ISO IN incomplete interrupt.
#define CLEAR_OUT_EP_INTR(epnum, intr)
#define USB_OTG_SPEED_FULL
#define CLEAR_IN_EP_INTR(epnum, intr)
USB_OTG_INEPREGS * INEP_REGS[USB_OTG_MAX_TX_FIFOS]
uint32_t USB_OTG_ReadDevAllInEPItr(USB_OTG_CORE_HANDLE *pdev)
USB_OTG_ReadDevAllInEPItr : Get int status register.
USB_OTG_OUTEPREGS * OUTEP_REGS[USB_OTG_MAX_TX_FIFOS]
struct _USB_OTG_DTXFSTSn_TypeDef::@63 b
Peripheral Device Interface Layer.
struct _USB_OTG_GOTGINT_TypeDef::@52 b
#define USB_OTG_SPEED_HIGH
USB_OTG_EP in_ep[USB_OTG_MAX_TX_FIFOS]
uint8_t(* DataInStage)(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
#define USB_OTG_FS_MAX_PACKET_SIZE
static uint32_t DCD_HandleRxStatusQueueLevel_ISR(USB_OTG_CORE_HANDLE *pdev)
DCD_HandleRxStatusQueueLevel_ISR Handles the Rx Status Queue Level Interrupt.
#define USB_OTG_WRITE_REG32(reg, value)
struct _USB_OTG_DCFG_TypeDef::@65 b
uint8_t(* DevDisconnected)(USB_OTG_CORE_HANDLE *pdev)
uint32_t USB_OTG_ReadCoreItr(USB_OTG_CORE_HANDLE *pdev)
USB_OTG_ReadCoreItr : returns the Core Interrupt register.
struct _USB_OTG_DAINT_TypeDef::@70 ep
static uint32_t DCD_HandleSof_ISR(USB_OTG_CORE_HANDLE *pdev)
DCD_HandleSof_ISR Handles the SOF Interrupts.
#define USB_OTG_READ_REG32(reg)
struct _USB_OTG_DCTL_TypeDef::@66 b
struct _USB_OTG_GUSBCFG_TypeDef::@54 b
static uint32_t DCD_HandleResume_ISR(USB_OTG_CORE_HANDLE *pdev)
DCD_HandleResume_ISR Indicates that the USB_OTG controller has detected a resume or remote Wake-up se...
uint8_t connection_status
uint8_t(* DataOutStage)(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
static uint32_t DCD_HandleOutEP_ISR(USB_OTG_CORE_HANDLE *pdev)
DCD_HandleOutEP_ISR Indicates that an OUT EP has a pending Interrupt.
USB_OTG_EP out_ep[USB_OTG_MAX_TX_FIFOS]
void * USB_OTG_ReadPacket(USB_OTG_CORE_HANDLE *pdev, uint8_t *dest, uint16_t len)
USB_OTG_ReadPacket : Reads a packet from the Rx FIFO.
struct _USB_OTG_GINTSTS_TypeDef::@57 b
uint8_t(* SOF)(USB_OTG_CORE_HANDLE *pdev)
static uint32_t DCD_IsoOUTIncomplete_ISR(USB_OTG_CORE_HANDLE *pdev)
DCD_IsoOUTIncomplete_ISR handle the ISO OUT incomplete interrupt.
uint8_t(* Suspend)(USB_OTG_CORE_HANDLE *pdev)
static uint32_t DCD_HandleEnumDone_ISR(USB_OTG_CORE_HANDLE *pdev)
DCD_HandleEnumDone_ISR Read the device status register and set the device speed.
uint8_t(* SetupStage)(USB_OTG_CORE_HANDLE *pdev)
#define USB_OTG_CONFIGURED
struct _USB_OTG_PCGCCTL_TypeDef::@88 b
uint32_t USBD_OTG_ISR_Handler(USB_OTG_CORE_HANDLE *pdev)
STM32_USBF_OTG_ISR_Handler handles all USB Interrupts.
uint8_t(* Resume)(USB_OTG_CORE_HANDLE *pdev)
#define USB_OTG_MODIFY_REG32(reg, clear_mask, set_mask)