Nut/OS  5.0.5
API Reference
otgd_fs_pcd.h File Reference
#include "otgd_fs_regs.h"
Include dependency graph for otgd_fs_pcd.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  usb_ep_descriptor
struct  USB_OTG_USBF

Defines

#define MAX_EP0_SIZE   0x40
#define MAX_PACKET_SIZE   0x400
#define USB_ENDPOINT_XFER_CONTROL   0
#define USB_ENDPOINT_XFER_ISOC   1
#define USB_ENDPOINT_XFER_BULK   2
#define USB_ENDPOINT_XFER_INT   3
#define USB_ENDPOINT_XFERTYPE_MASK   3

Typedefs

typedef struct usb_ep_descriptor EP_DESCRIPTOR
typedef struct usb_ep_descriptorPEP_DESCRIPTOR
typedef struct USB_OTG_USBF USB_OTG_PCD_DEV
typedef struct USB_OTG_USBFUSB_OTG_PCD_PDEV

Enumerations

enum  usb_device_speed { USB_SPEED_UNKNOWN = 0, USB_SPEED_LOW, USB_SPEED_FULL, USB_SPEED_HIGH }

Functions

void OTGD_FS_PCD_Init (void)
void OTGD_FS_PCD_DevConnect (void)
void OTGD_FS_PCD_DevDisconnect (void)
void OTGD_FS_PCD_EP_SetAddress (uint8_t address)
uint32_t OTGD_FS_PCD_EP_Open (EP_DESCRIPTOR *epdesc)
uint32_t OTGD_FS_PCD_EP_Close (uint8_t ep_addr)
uint32_t OTGD_FS_PCD_EP_Read (uint8_t ep_addr, uint8_t *pbuf, uint32_t buf_len)
uint32_t OTGD_FS_PCD_EP_Write (uint8_t ep_addr, uint8_t *pbuf, uint32_t buf_len)
uint32_t OTGD_FS_PCD_EP_Stall (uint8_t epnum)
uint32_t OTGD_FS_PCD_EP_ClrStall (uint8_t epnum)
uint32_t OTGD_FS_PCD_EP_Flush (uint8_t epnum)
uint32_t OTGD_FS_PCD_Handle_ISR (void)
USB_OTG_EPOTGD_FS_PCD_GetOutEP (uint32_t ep_num)
USB_OTG_EPOTGD_FS_PCD_GetInEP (uint32_t ep_num)
void OTGD_FS_PCD_EP0_OutStart (void)

Define Documentation

#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 Documentation

typedef struct USB_OTG_USBF USB_OTG_PCD_DEV
typedef struct USB_OTG_USBF * USB_OTG_PCD_PDEV

Enumeration Type Documentation

Enumerator:
USB_SPEED_UNKNOWN 
USB_SPEED_LOW 
USB_SPEED_FULL 
USB_SPEED_HIGH 

Function Documentation

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

uint32_t OTGD_FS_PCD_EP_Close ( uint8_t  ep_addr)

References USB_OTG_ep::is_in, USB_OTG_ep::num, OTGD_FS_EPDeactivate(), OTGD_FS_PCD_GetInEP(), and OTGD_FS_PCD_GetOutEP().

Here is the call graph for this function:

uint32_t OTGD_FS_PCD_EP_Read ( uint8_t  ep_addr,
uint8_t pbuf,
uint32_t  buf_len 
)

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().

Here is the call graph for this function:

uint32_t OTGD_FS_PCD_EP_Write ( uint8_t  ep_addr,
uint8_t pbuf,
uint32_t  buf_len 
)

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().

Here is the call graph for this function:

uint32_t OTGD_FS_PCD_EP_Stall ( uint8_t  epnum)

References USB_OTG_ep::is_in, USB_OTG_ep::num, OTGD_FS_EPSetStall(), OTGD_FS_PCD_GetInEP(), and OTGD_FS_PCD_GetOutEP().

Here is the call graph for this function:

uint32_t OTGD_FS_PCD_EP_ClrStall ( uint8_t  epnum)

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().

Here is the call graph for this function:

uint32_t OTGD_FS_PCD_EP_Flush ( uint8_t  epnum)

References OTGD_FS_FlushRxFifo(), OTGD_FS_FlushTxFifo(), and OTGD_FS_PCD_EP_ClrStall().

Referenced by OTG_DEV_EP_Init().

Here is the call graph for this function:

uint32_t OTGD_FS_PCD_Handle_ISR ( void  )