dwc_otg_pcd.h File Reference

This file contains the structures, constants, and interfaces for the Perpherial Contoller Driver (PCD). More...

#include "usb.h"
#include "dwc_otg_cil.h"
#include "dwc_otg_pcd_if.h"

Go to the source code of this file.

Data Structures

struct  dwc_otg_pcd_request
 DWC_otg request structure. More...
struct  dwc_otg_pcd_ep
 PCD EP structure. More...
struct  dwc_otg_pcd
 DWC_otg PCD Structure. More...

Defines

#define __DWC_PCD_H__
#define DDMA_MAX_TRANSFER_SIZE   65535
 Max Transfer size for any EP.
#define MAX_DMA_DESC_CNT   64
 Max DMA Descriptor count for any EP.
#define GET_CORE_IF(_pcd)   (_pcd->core_if)
 Get the pointer to the core_if from the pcd pointer.

Typedefs

typedef enum ep0_state ep0state_e
 States of EP0.
typedef usb_iso_request dwc_otg_pcd_iso_request_t
 DWC_otg iso request structure.
typedef dwc_otg_pcd_request dwc_otg_pcd_request_t
 DWC_otg request structure.
typedef dwc_otg_pcd_ep dwc_otg_pcd_ep_t
 PCD EP structure.

Enumerations

enum  ep0_state {
  EP0_DISCONNECT, EP0_IDLE, EP0_IN_DATA_PHASE, EP0_OUT_DATA_PHASE,
  EP0_IN_STATUS_PHASE, EP0_OUT_STATUS_PHASE, EP0_STALL
}
 States of EP0.

Functions

 DWC_CIRCLEQ_HEAD (req_list, dwc_otg_pcd_request)
void dwc_otg_request_nuke (dwc_otg_pcd_ep_t *ep)
 This function terminates all the requsts in the EP request queue.
void dwc_otg_request_done (dwc_otg_pcd_ep_t *ep, dwc_otg_pcd_request_t *req, int32_t status)
 This function completes a request.
void dwc_otg_iso_buffer_done (dwc_otg_pcd_t *pcd, dwc_otg_pcd_ep_t *ep, void *req_handle)
 This function is used for perodical data exchnage between PCD and gadget drivers.
void do_test_mode (void *data)
 This function is called when the SET_FEATURE TEST_MODE Setup packet is sent from the host.


Detailed Description

This file contains the structures, constants, and interfaces for the Perpherial Contoller Driver (PCD).

The Peripheral Controller Driver (PCD) for Linux will implement the Gadget API, so that the existing Gadget drivers can be used. For the Mass Storage Function driver the File-backed USB Storage Gadget (FBS) driver will be used. The FBS driver supports the Control-Bulk (CB), Control-Bulk-Interrupt (CBI), and Bulk-Only transports.

Definition in file dwc_otg_pcd.h.


Typedef Documentation

typedef struct dwc_otg_pcd_request dwc_otg_pcd_request_t

DWC_otg request structure.

This structure is a list of requests.

typedef struct dwc_otg_pcd_ep dwc_otg_pcd_ep_t

PCD EP structure.

This structure describes an EP, there is an array of EPs in the PCD structure.


Function Documentation

void dwc_otg_request_done ( dwc_otg_pcd_ep_t ep,
dwc_otg_pcd_request_t req,
int32_t  status 
)

This function completes a request.

It call's the request call back.

Definition at line 78 of file dwc_otg_pcd.c.

void dwc_otg_iso_buffer_done ( dwc_otg_pcd_t pcd,
dwc_otg_pcd_ep_t ep,
void *  req_handle 
)

This function is used for perodical data exchnage between PCD and gadget drivers.

for Isochronous EPs

Definition at line 830 of file dwc_otg_pcd.c.

void do_test_mode ( void *  data  ) 

This function is called when the SET_FEATURE TEST_MODE Setup packet is sent from the host.

The Device Control register is written with the Test Mode bits set to the specified Test Mode. This is done as a tasklet so that the "Status" phase of the control transfer completes before transmitting the TEST packets.

Todo:
This has not been tested since the tasklet struct was put into the PCD struct!

Definition at line 1284 of file dwc_otg_pcd_intr.c.


Generated on Tue May 5 02:22:49 2009 for DesignWare USB 2.0 OTG Controller (DWC_otg) Device Driver by  doxygen 1.4.7