#include "otgd_fs_regs.h"
Go to the source code of this file.
#define MAX_EP0_SIZE 0x40 |
Referenced by OTGD_FS_PCD_Init().
#define MAX_PACKET_SIZE 0x400 |
Referenced by OTGD_FS_PCD_Init().
#define USB_ENDPOINT_XFER_CONTROL 0 |
Referenced by OTG_DEV_Init().
#define USB_ENDPOINT_XFER_ISOC 1 |
#define USB_ENDPOINT_XFER_BULK 2 |
Referenced by OTGD_FS_PCD_EP_Open().
#define USB_ENDPOINT_XFER_INT 3 |
#define USB_ENDPOINT_XFERTYPE_MASK 3 |
Referenced by OTGD_FS_PCD_EP_Open().
typedef struct usb_ep_descriptor EP_DESCRIPTOR |
typedef struct usb_ep_descriptor * PEP_DESCRIPTOR |
typedef struct USB_OTG_USBF USB_OTG_PCD_DEV |
typedef struct USB_OTG_USBF * USB_OTG_PCD_PDEV |
enum usb_device_speed |
void OTGD_FS_PCD_Init | ( | void | ) |
References USB_OTG_USBF::ep0, USB_OTG_USBF::ep0state, EP_TYPE_CTRL, USB_OTG_USBF::in_ep, USB_OTG_ep::is_in, MAX_EP0_SIZE, MAX_PACKET_SIZE, MAX_TX_FIFOS, USB_OTG_ep::maxpacket, USB_OTG_ep::num, USB_OTG_USBF::out_ep, USB_OTG_ep::tx_fifo_num, USB_OTG_ep::type, USB_OTG_ep::xfer_buff, and USB_OTG_ep::xfer_len.
Referenced by OTG_DEV_Init().
void OTGD_FS_PCD_DevConnect | ( | void | ) |
References _USB_OTG_dev_ctl_data::b, _USB_OTG_dev_ctl_data::d32, _USB_OTG_dev_regs::dev_ctl, USB_OTG_core_regs::dev_regs, NutSleep(), READ_REG32, _USB_OTG_dev_ctl_data::sftdiscon, and WRITE_REG32.
Referenced by USB_DevConnect().
void OTGD_FS_PCD_DevDisconnect | ( | void | ) |
References _USB_OTG_dev_ctl_data::b, _USB_OTG_dev_ctl_data::d32, _USB_OTG_dev_regs::dev_ctl, USB_OTG_core_regs::dev_regs, NutSleep(), READ_REG32, _USB_OTG_dev_ctl_data::sftdiscon, and WRITE_REG32.
Referenced by USB_DevDisconnect().
void OTGD_FS_PCD_EP_SetAddress | ( | uint8_t | address | ) |
References _USB_OTG_dev_cfg_data::b, _USB_OTG_dev_cfg_data::d32, _USB_OTG_dev_regs::dev_cfg, USB_OTG_core_regs::dev_regs, _USB_OTG_dev_cfg_data::devaddr, and MODIFY_REG32.
Referenced by SetDeviceAddress().
uint32_t OTGD_FS_PCD_EP_Open | ( | EP_DESCRIPTOR * | epdesc | ) |
References usb_ep_descriptor::bEndpointAddress, usb_ep_descriptor::bmAttributes, USB_OTG_ep::data_pid_start, USB_OTG_ep::is_in, USB_OTG_ep::maxpacket, USB_OTG_ep::num, OTGD_FS_EPActivate(), OTGD_FS_PCD_GetInEP(), OTGD_FS_PCD_GetOutEP(), USB_OTG_ep::tx_fifo_num, USB_OTG_ep::type, USB_ENDPOINT_XFER_BULK, USB_ENDPOINT_XFERTYPE_MASK, and usb_ep_descriptor::wMaxPacketSize.
Referenced by OTG_DEV_EP_Init(), and OTG_DEV_Init().
References USB_OTG_ep::is_in, USB_OTG_ep::num, OTGD_FS_EPDeactivate(), OTGD_FS_PCD_GetInEP(), and OTGD_FS_PCD_GetOutEP().
References USB_OTG_USBF::ep0state, USB_OTG_ep::is_in, USB_OTG_ep::num, OTGD_FS_EP0StartXfer(), OTGD_FS_EPStartXfer(), OTGD_FS_PCD_GetOutEP(), USB_OTG_ep::xfer_buff, USB_OTG_ep::xfer_count, and USB_OTG_ep::xfer_len.
Referenced by USB_SIL_Read().
References USB_OTG_USBF::ep0state, USB_OTG_ep::is_in, USB_OTG_ep::num, OTGD_FS_EP0StartXfer(), OTGD_FS_EPStartXfer(), OTGD_FS_PCD_GetInEP(), USB_OTG_ep::xfer_buff, USB_OTG_ep::xfer_count, and USB_OTG_ep::xfer_len.
Referenced by USB_SIL_Write().
References USB_OTG_ep::is_in, USB_OTG_ep::num, OTGD_FS_EPSetStall(), OTGD_FS_PCD_GetInEP(), and OTGD_FS_PCD_GetOutEP().
References USB_OTG_ep::is_in, USB_OTG_ep::num, OTGD_FS_EPClearStall(), OTGD_FS_PCD_GetInEP(), and OTGD_FS_PCD_GetOutEP().
Referenced by OTGD_FS_PCD_EP_Flush().
References OTGD_FS_FlushRxFifo(), OTGD_FS_FlushTxFifo(), and OTGD_FS_PCD_EP_ClrStall().
Referenced by OTG_DEV_EP_Init().
uint32_t OTGD_FS_PCD_Handle_ISR | ( | void | ) |
USB_OTG_EP* OTGD_FS_PCD_GetOutEP | ( | uint32_t | ep_num | ) |
References USB_OTG_USBF::ep0, MAX_TX_FIFOS, USB_OTG_ep::num, and USB_OTG_USBF::out_ep.
Referenced by EP3_OUT_Callback(), OTG_DEV_EP_Init(), OTG_DEV_GetEPRxStatus(), OTG_DEV_Init(), OTG_DEV_SetEPRxStatus(), OTGD_FS_Handle_OutEP_ISR(), OTGD_FS_Handle_RxStatusQueueLevel_ISR(), OTGD_FS_PCD_EP_Close(), OTGD_FS_PCD_EP_ClrStall(), OTGD_FS_PCD_EP_Open(), OTGD_FS_PCD_EP_Read(), OTGD_FS_PCD_EP_Stall(), Setup0_Process(), and USB_SIL_Read().
USB_OTG_EP* OTGD_FS_PCD_GetInEP | ( | uint32_t | ep_num | ) |
References USB_OTG_USBF::ep0, USB_OTG_USBF::in_ep, MAX_TX_FIFOS, and USB_OTG_ep::num.
Referenced by OTG_DEV_EP_Init(), OTG_DEV_GetEPTxStatus(), OTG_DEV_SetEPTxStatus(), OTGD_FS_Handle_InEP_ISR(), OTGD_FS_PCD_EP_Close(), OTGD_FS_PCD_EP_ClrStall(), OTGD_FS_PCD_EP_Open(), OTGD_FS_PCD_EP_Stall(), OTGD_FS_PCD_EP_Write(), and Post0_Process().
void OTGD_FS_PCD_EP0_OutStart | ( | void | ) |
References _USB_OTG_dev_ep_txfer_size0_data::b, _USB_OTG_dev_ep_txfer_size0_data::d32, _USB_OTG_dev_out_ep_regs::dev_out_ep_txfer_siz, USB_OTG_core_regs::outep_regs, _USB_OTG_dev_ep_txfer_size0_data::pktcnt, _USB_OTG_dev_ep_txfer_size0_data::supcnt, WRITE_REG32, and _USB_OTG_dev_ep_txfer_size0_data::xfersize.
Referenced by OTG_DEV_Init(), and OTGD_FS_Handle_UsbReset_ISR().