Data Structures | Defines | Typedefs | Enumerations | Functions | Variables
csl_cdc.h File Reference

USB CDC functional layer API header file. More...

#include <cslr.h>
#include <csl_error.h>
#include <csl_types.h>
#include <cslr_usb.h>
#include <csl_usb.h>
#include <soc.h>
#include <csl_general.h>

Go to the source code of this file.

Data Structures

struct  CSL_CdcLineCoding
 CDC line coding structure. More...
struct  CSL_CdcInitStructApp
 CDC application data structure. More...
struct  CSL_CdcObject
 CDC Mass Storage Object structure. More...
struct  CSL_CdcCtrlObject
 CDC Control Object structure. More...
struct  CSL_CdcClassStruct
 CDC Control Object structure. More...

Defines

#define CSL_CDC_PORT_MAX   1
#define CSL_CDC_NO_ENDPTOBJECT   8
#define CSL_CDC_ERROR_BASE   (CSL_EUSB_FIRST)
#define CSL_CDC_INVALID_REQUEST_HANDLER   (CSL_CDC_ERROR_BASE - 1)
#define CSL_CDC_INTR_IN_EP   CSL_USB_EP1
 Symbolic constants for USB CDC Endpoints.
#define CSL_CDC_BULK_OUT_EP   CSL_USB_EP2
#define CSL_CDC_BULK_IN_EP   CSL_USB_EP3
#define CSL_USB_CDC_DATA_BUF_SIZE   512
#define CSL_CDC_REQUEST_SEND_ENCAPSULATED_COMMAND   (0x2100)
 Symbolic constants for USB CDC requests.
#define CSL_CDC_REQUEST_GET_ENCAPSULATED_RESPONSE   (0xA101)
#define CSL_CDC_REQUEST_SET_COMM_FEATURE   (0x2102)
#define CSL_CDC_REQUEST_GET_COMM_FEATURE   (0xA103)
#define CSL_CDC_REQUEST_CLEAR_COMM_FEATURE   (0x2104)
#define CSL_CDC_REQUEST_SET_LINE_CODING   (0x2120)
#define CSL_CDC_REQUEST_GET_LINE_CODING   (0xA121)
#define CSL_CDC_REQUEST_SET_CONTROL_LINE_STATE   (0x2122)
#define CSL_CDC_REQUEST_SEND_BREAK   (0x2123)
#define CSL_CDC_REQUEST_ARGS
 CDC Request arguments.

Typedefs

typedef struct CSL_CdcInitStructApp CSL_CdcInitStructApp
 CDC application data structure.
typedef CSL_CdcInitStructApppCdcAppClassHandle
 MSc application class handle.
typedef CSL_CdcRequestRet(* fpCDC_REQ_HANDLER )(CSL_CDC_REQUEST_ARGS)
 CDC application Logical unit attribute structure.
typedef struct CSL_CdcObject CSL_CdcObject
 CDC Mass Storage Object structure.
typedef struct CSL_CdcCtrlObject CSL_CdcCtrlObject
 CDC Control Object structure.
typedef struct CSL_CdcClassStruct CSL_CdcClassStruct
 CDC Control Object structure.
typedef CSL_CdcClassStructpCdcClassHandle
 CDC class handle.

Enumerations

enum  CSL_CdcRequestRet {
  CSL_CDC_REQUEST_DONE = 0,
  CSL_CDC_REQUEST_STALL,
  CSL_CDC_REQUEST_SEND_ACK,
  CSL_CDC_REQUEST_GET_ACK,
  CSL_CDC_REQUEST_DATA_IN,
  CSL_CDC_REQUEST_DATA_OUT
}
 This Enum defines the Cdc request return values.
enum  CSL_CdcMediaStatus {
  CSL_CDC_MEDIACCESS_OVERFLOW,
  CSL_CDC_MEDIACCESS_SUCCESS,
  CSL_CDC_MEDIACCESS_NOTPRESENT,
  CSL_CDC_MEDIACCESS_WRITEPROTECT,
  CSL_CDC_MEDIACCESS_BADMEDIA
}
 This Enum defines the Cdc media access status. More...

Functions

CSL_Status CDC_Open (pCdcAppClassHandle pAppClassHandle)
CSL_Status CDC_OpenFullspeed (pCdcAppClassHandle pAppClassHandle)
static CSL_Status CDC_Setup (pCdcAppClassHandle pAppClassHandle, Bool usbSpeedCfg)
CSL_Status CDC_Close (pCdcAppClassHandle pAppClassHandle)
Uint16 CDC_GetactivityFlagStatus (void *pCDC)
Uint16 CDC_GetsuspendFlagStatus (void *pCDC)
CSL_CdcRequestRet CDC_eventHandler (pUsbContext pContext, CSL_CdcClassStruct *hCdcClass)
CSL_Status CDC_bulkOutHandler (pUsbContext pContext, CSL_CdcInitStructApp *cdcAppHandle)
CSL_Status CDC_bulkInHandler (pUsbContext pContext, CSL_CdcInitStructApp *cdcAppHandle)
Uint16 CDC_getData (pUsbContext pContext, CSL_CdcInitStructApp *cdcAppHandle, Uint16 *data)
Uint16 CDC_putData (pUsbContext pContext, CSL_CdcInitStructApp *cdcAppHandle, Uint16 *data, Uint16 size)

Variables

CSL_UsbContext gUsbContext
CSL_UsbRegsOvly usbRegisters

Detailed Description

USB CDC functional layer API header file.

Path: \(CSLPATH)\ inc