Go to the source code of this file.
Defines | |
#define | OTG_DEV_EP_TYPE_CONTROL 0 |
#define | OTG_DEV_EP_TYPE_ISOC 1 |
#define | OTG_DEV_EP_TYPE_BULK 2 |
#define | OTG_DEV_EP_TYPE_INT 3 |
#define | EP0_OUT 0x00 |
#define | EP0_IN 0x80 |
#define | EP1_OUT 0x01 |
#define | EP1_IN 0x81 |
#define | EP2_OUT 0x02 |
#define | EP2_IN 0x82 |
#define | EP3_OUT 0x03 |
#define | EP3_IN 0x83 |
#define | ENDP0 ((uint8_t)0) |
#define | ENDP1 ((uint8_t)1) |
#define | ENDP2 ((uint8_t)2) |
#define | ENDP3 ((uint8_t)3) |
#define | ENDP4 ((uint8_t)4) |
#define | ENDP5 ((uint8_t)5) |
#define | ENDP6 ((uint8_t)6) |
#define | ENDP7 ((uint8_t)7) |
#define | EP_TX_DIS DEV_EP_TX_DIS) |
#define | EP_TX_STALL DEV_EP_TX_STALL |
#define | EP_TX_NAK DEV_EP_TX_NAK |
#define | EP_TX_VALID DEV_EP_TX_VALID |
#define | EP_RX_DIS DEV_EP_RX_DIS |
#define | EP_RX_STALL DEV_EP_RX_STALL |
#define | EP_RX_NAK DEV_EP_RX_NAK |
#define | EP_RX_VALID DEV_EP_RX_VALID |
#define | _GetEPTxStatus(bEpNum) ((uint16_t)OTG_DEV_GetEPTxStatus(bEpNum)) |
#define | _GetEPRxStatus(bEpNum) ((uint16_t)OTG_DEV_GetEPRxStatus(bEpNum)) |
#define | _SetEPTxStatus(bEpNum, wState) (OTG_DEV_SetEPTxStatus(bEpNum, wState)) |
#define | _SetEPRxStatus(bEpNum, wState) (OTG_DEV_SetEPRxStatus(bEpNum, wState)) |
#define | _SetEPTxValid(bEpNum) (OTG_DEV_SetEPTxStatus(bEpNum, EP_TX_VALID)) |
#define | _SetEPRxValid(bEpNum) (OTG_DEV_SetEPRxStatus(bEpNum, EP_RX_VALID)) |
#define | _GetTxStallStatus(bEpNum) (OTG_DEV_GetEPTxStatus(bEpNum) == EP_TX_STALL) |
#define | _GetRxStallStatus(bEpNum) (OTG_DEV_GetEPRxStatus(bEpNum) == EP_RX_STALL) |
#define | OTGD_FS_DEVICE_RESET Device_Property.Reset() |
Functions | |
void | OTG_DEV_Init (void) |
void | OTG_DEV_EP_Init (uint8_t bEpAdd, uint8_t bEpType, uint16_t wEpMaxPackSize) |
void | OTG_DEV_SetEPRxStatus (uint8_t bEpnum, uint32_t status) |
void | OTG_DEV_SetEPTxStatus (uint8_t bEpnum, uint32_t status) |
uint32_t | OTG_DEV_GetEPRxStatus (uint8_t bEpnum) |
uint32_t | OTG_DEV_GetEPTxStatus (uint8_t bEpnum) |
void | USB_DevDisconnect (void) |
void | USB_DevConnect (void) |
void | SetEPTxStatus (uint8_t bEpNum, uint16_t wState) |
void | SetEPRxStatus (uint8_t bEpNum, uint16_t wState) |
uint16_t | GetEPTxStatus (uint8_t bEpNum) |
uint16_t | GetEPRxStatus (uint8_t bEpNum) |
void | SetEPTxValid (uint8_t bEpNum) |
void | SetEPRxValid (uint8_t bEpNum) |
uint16_t | GetTxStallStatus (uint8_t bEpNum) |
uint16_t | GetRxStallStatus (uint8_t bEpNum) |
void | SetEPTxCount (uint8_t bEpNum, uint16_t wCount) |
void | SetEPRxCount (uint8_t bEpNum, uint16_t wCount) |
uint16_t | ToWord (uint8_t, uint8_t) |
uint16_t | ByteSwap (uint16_t) |
#define OTG_DEV_EP_TYPE_CONTROL 0 |
#define OTG_DEV_EP_TYPE_ISOC 1 |
#define OTG_DEV_EP_TYPE_BULK 2 |
Referenced by Virtual_Com_Port_Reset().
#define OTG_DEV_EP_TYPE_INT 3 |
#define EP0_OUT 0x00 |
#define EP0_IN 0x80 |
#define EP1_OUT 0x01 |
#define EP1_IN 0x81 |
Referenced by Virtual_Com_Port_Reset().
#define EP2_OUT 0x02 |
#define EP2_IN 0x82 |
#define EP3_OUT 0x03 |
Referenced by EP3_OUT_Callback(), and Virtual_Com_Port_Reset().
#define EP3_IN 0x83 |
#define ENDP0 ((uint8_t)0) |
Referenced by Post0_Process(), Setup0_Process(), Standard_ClearFeature(), and Standard_SetEndPointFeature().
#define ENDP1 ((uint8_t)1) |
#define ENDP2 ((uint8_t)2) |
#define ENDP3 ((uint8_t)3) |
#define ENDP4 ((uint8_t)4) |
#define ENDP5 ((uint8_t)5) |
#define ENDP6 ((uint8_t)6) |
#define ENDP7 ((uint8_t)7) |
#define EP_TX_DIS DEV_EP_TX_DIS) |
#define EP_TX_STALL DEV_EP_TX_STALL |
Referenced by Post0_Process(), and Standard_SetEndPointFeature().
#define EP_TX_NAK DEV_EP_TX_NAK |
#define EP_TX_VALID DEV_EP_TX_VALID |
Referenced by Post0_Process(), SetEPTxValid(), and Standard_ClearFeature().
#define EP_RX_DIS DEV_EP_RX_DIS |
#define EP_RX_STALL DEV_EP_RX_STALL |
Referenced by Post0_Process(), and Standard_SetEndPointFeature().
#define EP_RX_NAK DEV_EP_RX_NAK |
#define EP_RX_VALID DEV_EP_RX_VALID |
Referenced by SetEPRxValid(), and Standard_ClearFeature().
#define _GetEPTxStatus | ( | bEpNum | ) | ((uint16_t)OTG_DEV_GetEPTxStatus(bEpNum)) |
Referenced by GetEPTxStatus(), Standard_ClearFeature(), and Standard_SetEndPointFeature().
#define _GetEPRxStatus | ( | bEpNum | ) | ((uint16_t)OTG_DEV_GetEPRxStatus(bEpNum)) |
Referenced by GetEPRxStatus(), Standard_ClearFeature(), and Standard_SetEndPointFeature().
#define _SetEPTxStatus | ( | bEpNum, | |
wState | |||
) | (OTG_DEV_SetEPTxStatus(bEpNum, wState)) |
Referenced by SetEPTxStatus(), SetEPTxValid(), and Standard_SetEndPointFeature().
#define _SetEPRxStatus | ( | bEpNum, | |
wState | |||
) | (OTG_DEV_SetEPRxStatus(bEpNum, wState)) |
Referenced by SetEPRxStatus(), SetEPRxValid(), Standard_ClearFeature(), and Standard_SetEndPointFeature().
#define _SetEPTxValid | ( | bEpNum | ) | (OTG_DEV_SetEPTxStatus(bEpNum, EP_TX_VALID)) |
#define _SetEPRxValid | ( | bEpNum | ) | (OTG_DEV_SetEPRxStatus(bEpNum, EP_RX_VALID)) |
#define _GetTxStallStatus | ( | bEpNum | ) | (OTG_DEV_GetEPTxStatus(bEpNum) == EP_TX_STALL) |
Referenced by GetTxStallStatus(), Standard_ClearFeature(), and Standard_GetStatus().
#define _GetRxStallStatus | ( | bEpNum | ) | (OTG_DEV_GetEPRxStatus(bEpNum) == EP_RX_STALL) |
Referenced by GetRxStallStatus(), Standard_ClearFeature(), and Standard_GetStatus().
#define OTGD_FS_DEVICE_RESET Device_Property.Reset() |
Referenced by OTGD_FS_Handle_UsbReset_ISR().
void OTG_DEV_Init | ( | void | ) |
References usb_ep_descriptor::bEndpointAddress, usb_ep_descriptor::bmAttributes, OTGD_FS_CoreInit(), OTGD_FS_CoreInitDev(), OTGD_FS_DisableGlobalInt(), OTGD_FS_EnableGlobalInt(), OTGD_FS_EPStartXfer(), OTGD_FS_PCD_EP0_OutStart(), OTGD_FS_PCD_EP_Open(), OTGD_FS_PCD_GetOutEP(), OTGD_FS_PCD_Init(), OTGD_FS_SetAddress(), USB_ENDPOINT_XFER_CONTROL, USB_OTG_FS1_BASE_ADDR, and usb_ep_descriptor::wMaxPacketSize.
Referenced by USB_SIL_Init(), and Virtual_Com_Port_init().
References usb_ep_descriptor::bEndpointAddress, usb_ep_descriptor::bmAttributes, DEV_EP_TX_NAK, USB_OTG_ep::even_odd_frame, OTG_DEV_SetEPTxStatus(), OTGD_FS_EPStartXfer(), OTGD_FS_PCD_EP_Flush(), OTGD_FS_PCD_EP_Open(), OTGD_FS_PCD_GetInEP(), OTGD_FS_PCD_GetOutEP(), and usb_ep_descriptor::wMaxPacketSize.
Referenced by Virtual_Com_Port_Reset().
References OTGD_FS_Dev_SetEPStatus(), and OTGD_FS_PCD_GetOutEP().
Referenced by OTGD_FS_Handle_InEP_ISR().
References DEV_EP_TX_STALL, USB_OTG_ep::is_in, OTGD_FS_Dev_SetEPStatus(), and OTGD_FS_PCD_GetInEP().
Referenced by OTG_DEV_EP_Init(), OTGD_FS_Handle_InEP_ISR(), and OTGD_FS_Handle_OutEP_ISR().
References OTGD_FS_Dev_GetEPStatus(), and OTGD_FS_PCD_GetOutEP().
References OTGD_FS_Dev_GetEPStatus(), and OTGD_FS_PCD_GetInEP().
Referenced by OTGD_FS_Handle_InEP_ISR().
void USB_DevDisconnect | ( | void | ) |
References OTGD_FS_PCD_DevDisconnect().
Referenced by USB_Cable_Config().
void USB_DevConnect | ( | void | ) |
References OTGD_FS_PCD_DevConnect().
Referenced by USB_Cable_Config().
References _SetEPTxStatus.
Referenced by Standard_ClearFeature().
References _SetEPRxStatus.
References _GetEPTxStatus.
References _GetEPRxStatus.
void SetEPTxValid | ( | uint8_t | bEpNum | ) |
References _SetEPTxStatus, and EP_TX_VALID.
void SetEPRxValid | ( | uint8_t | bEpNum | ) |
References _SetEPRxStatus, and EP_RX_VALID.
References _GetTxStallStatus.
References _GetRxStallStatus.
Referenced by Post0_Process(), and Standard_ClearFeature().
Referenced by Setup0_Process().