PDL for FM4  Version1.2
Peripheral Driverl Library for FM4
UsbDeviceCdcCom.h File Reference
#include "usb.h"
#include "UsbDevice.h"
Include dependency graph for UsbDeviceCdcCom.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  stc_cdc_linecoding
 

Macros

#define USBDEVICECDCCOM_ENABLED   OFF
 
#define USBDEVICECDCCOM_EPOUT_BUFFERSIZE   128
 
#define USBDEVICECDCCOM_MAX_RECEIVE_BUFFER   512
 
#define USBDEVICECDCCOM_USE_UARTCOMMANDS   0
 
#define SEND_ENCAPSULATED_COMMAND   0x00
 
#define GET_ENCAPSULATED_RESPONSE   0x01
 
#define SET_COMM_FEATURE   0x02
 
#define GET_COMM_FEATURE   0x03
 
#define CLEAR_COMM_FEATURE   0x04
 
#define SET_AUX_LINE_STATE   0x10
 
#define SET_HOOK_STATE   0x11
 
#define PULSE_SETUP   0x12
 
#define SEND_PULSE   0x13
 
#define SET_PULSE_TIME   0x14
 
#define RING_AUX_JACK   0x15
 
#define SET_LINE_CODING   0x20
 
#define GET_LINE_CODING   0x21
 
#define SET_CONTROL_LINE_STATE   0x22
 
#define SEND_BREAK   0x23
 
#define SET_RINGER_PARMS   0x30
 
#define GET_RINGER_PARMS   0x31
 
#define SET_OPERATION_PARMS   0x32
 
#define GET_OPERATION_PARMS   0x33
 
#define SET_LINE_PARMS   0x34
 
#define GET_LINE_PARMS   0x35
 
#define DIAL_DIGITS   0x36
 
#define SET_UNIT_PARAMETER   0x37
 
#define GET_UNIT_PARAMETER   0x38
 
#define CLEAR_UNIT_PARAMETER   0x39
 
#define GET_PROFILE   0x3A
 
#define SET_ETHERNET_MULTICAST_FILTERS   0x40
 
#define SET_ETHERNET_POWER_MANAGEMENT_PATTERN_FILTER   0x41
 
#define GET_ETHERNET_POWER_MANAGEMENT_PATTERN_FILTER   0x42
 
#define SET_ETHERNET_PACKET_FILTER   0x43
 
#define GET_ETHERNET_STATISTIC   0x44
 
#define SET_ATM_DATA_FORMAT   0x50
 
#define GET_ATM_DEVICE_STATISTICS   0x51
 
#define SET_ATM_DEFAULT_VC   0x52
 
#define GET_ATM_VC_STATISTICS   0x53
 
#define DEC   0
 
#define HEX   1
 
#define USBCLASSCDC_CHARFORMAT_1STOPBIT   0
 
#define USBCLASSCDC_CHARFORMAT_1_5STOPBIT   1
 
#define USBCLASSCDC_CHARFORMAT_2STOPBIT   2
 
#define USBCLASSCDC_PARITYTYPE_NONE   0
 
#define USBCLASSCDC_PARITYTYPE_ODD   1
 
#define USBCLASSCDC_PARITYTYPE_EVEN   2
 
#define USBCLASSCDC_PARITYTYPE_MARK   3
 
#define USBCLASSCDC_PARITYTYPE_SPACE   4
 

Typedefs

typedef void(* cdc_data_received_t )(uint8_t *pu8Data, uint32_t u32ReceviedSize)
 
typedef void(* cdc_data_sent_t )(void)
 
typedef struct stc_cdc_linecoding stc_cdc_linecoding_t
 
typedef void(* usbdevicecdccom_linecodingchange_func_ptr_t )(stc_cdc_linecoding_t *pstcLineCoding)
 

Functions

void UsbDeviceCdcCom_Init (stc_usbn_t *pstcUsb)
 Initialisation callback. More...
 
boolean_t UsbDeviceCdcCom_DataSent (void)
 
boolean_t UsbDeviceCdcCom_IsConnected (void)
 
uint8_t UsbDeviceCdcCom_SendByte (char_t c)
 
uint8_t UsbDeviceCdcCom_SendString (char_t *pcBuffer)
 
uint8_t UsbDeviceCdcCom_SendBuffer (uint8_t *pu8Buffer, uint32_t u32Size)
 
void UsbDeviceCdcCom_SetSeparator (const char_t cNewSeperator)
 
void UsbDeviceCdcCom_SetEchomode (boolean_t bEchoOnOff)
 
void UsbDeviceCdcCom_SetEchoAtSeperatorOnly (boolean_t bEchoAtSeperatorOnlyOnOff)
 
uint32_t UsbDeviceCdcCom_ReceivedLength (void)
 
uint32_t UsbDeviceCdcCom_ReceiveBuffer (uint8_t *pu8Buffer)
 
uint8_t UsbDeviceCdcCom_ReceiveByte (void)
 
uint8_t UsbDeviceCdcCom_ReceiveLastByte (void)
 
uint8_t UsbDeviceCdcCom_SendHex (uint32_t n, uint8_t digits)
 
uint8_t UsbDeviceCdcCom_SendDec (uint32_t x)
 
void UsbDeviceCdcCom_SendBinAsci4 (uint16_t a, uint8_t base, char_t fill)
 
void UsbDeviceCdcCom_SendBinAsci8 (uint16_t a, uint8_t base, char_t fill)
 
void UsbDeviceCdcCom_SendBin2DotDec99 (uint8_t a)
 
uint32_t UsbDeviceCdcCom_ReceiveHex (uint8_t digits)
 
void UsbDeviceCdcCom_SetReceivedCallback (cdc_data_received_t pstnCallback)
 
void UsbDeviceCdcCom_SetSentCallback (cdc_data_sent_t pstnCallback)
 
void UsbDeviceCdcCom_SetCallbackLineCodingChange (usbdevicecdccom_linecodingchange_func_ptr_t pfnLineCodingChangeCallback)
 

Detailed Description

CONST USB_ASSISTANT_OFF

A detailed description is available at USB Device Cdc Com Module description

History:

  • 2009-08-31 1.0 MSc First version (works with 16FX)
  • 2010-04-16 1.1 MSc new USB library added - API had changed
  • 2011-08-30 1.2 MSc bug fixes while echo data added UsbDeviceCdcCom_SetEchoAtSeperatorOnly for echo data only after seperator received
  • 2012-07-24 1.3 MSc Version for USB Library >= FM3
  • 2012-11-26 1.4 MSc Data received routine added
  • 2013-01-30 1.5 MSc DMA routines added
  • 2013-04-24 1.6 MSc Data sent handle added
  • 2013-10-14 1.7 MSc PDL support added

Definition in file UsbDeviceCdcCom.h.

Macro Definition Documentation

#define USBDEVICECDCCOM_ENABLED   OFF

Definition at line 72 of file UsbDeviceCdcCom.h.