USB Host Shield 2.0
Classes | Macros | Enumerations
cdcprolific.h File Reference
#include "cdcacm.h"
Include dependency graph for cdcprolific.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  PL2303
 

Macros

#define PL_VID   0x067B
 
#define CHECK_PID(pid)   ( pid != 0x2303 && pid != 0x0609 )
 
#define PROLIFIC_REV_H   0x0202
 
#define PROLIFIC_REV_X   0x0300
 
#define PROLIFIC_REV_HX_CHIP_D   0x0400
 
#define PROLIFIC_REV_1   0x0001
 
#define kXOnChar   '\x11'
 
#define kXOffChar   '\x13'
 
#define SPECIAL_SHIFT   (5)
 
#define SPECIAL_MASK   ((1<<SPECIAL_SHIFT) - 1)
 
#define STATE_ALL   ( PD_RS232_S_MASK | PD_S_MASK )
 
#define FLOW_RX_AUTO   ( PD_RS232_A_RFR | PD_RS232_A_DTR | PD_RS232_A_RXO )
 
#define FLOW_TX_AUTO   ( PD_RS232_A_CTS | PD_RS232_A_DSR | PD_RS232_A_TXO | PD_RS232_A_DCD )
 
#define CAN_BE_AUTO   ( FLOW_RX_AUTO | FLOW_TX_AUTO )
 
#define CAN_NOTIFY   ( PD_RS232_N_MASK )
 
#define EXTERNAL_MASK   ( PD_S_MASK | (PD_RS232_S_MASK & ~PD_RS232_S_LOOP) )
 
#define INTERNAL_DELAY   ( PD_RS232_S_LOOP )
 
#define DEFAULT_AUTO   ( PD_RS232_A_DTR | PD_RS232_A_RFR | PD_RS232_A_CTS | PD_RS232_A_DSR )
 
#define DEFAULT_NOTIFY   0x00
 
#define DEFAULT_STATE   ( PD_S_TX_ENABLE | PD_S_RX_ENABLE | PD_RS232_A_TXO | PD_RS232_A_RXO )
 
#define CONTINUE_SEND   1
 
#define PAUSE_SEND   2
 
#define kRxAutoFlow   ((UInt32)( PD_RS232_A_RFR | PD_RS232_A_DTR | PD_RS232_A_RXO ))
 
#define kTxAutoFlow   ((UInt32)( PD_RS232_A_CTS | PD_RS232_A_DSR | PD_RS232_A_TXO | PD_RS232_A_DCD ))
 
#define kControl_StateMask   ((UInt32)( PD_RS232_S_CTS | PD_RS232_S_DSR | PD_RS232_S_CAR | PD_RS232_S_RI ))
 
#define kRxQueueState   ((UInt32)( PD_S_RXQ_EMPTY | PD_S_RXQ_LOW_WATER | PD_S_RXQ_HIGH_WATER | PD_S_RXQ_FULL ))
 
#define kTxQueueState   ((UInt32)( PD_S_TXQ_EMPTY | PD_S_TXQ_LOW_WATER | PD_S_TXQ_HIGH_WATER | PD_S_TXQ_FULL ))
 
#define kCONTROL_DTR   0x01
 
#define kCONTROL_RTS   0x02
 
#define kStateTransientMask   0x74
 
#define kBreakError   0x04
 
#define kFrameError   0x10
 
#define kParityError   0x20
 
#define kOverrunError   0x40
 
#define kCTS   0x80
 
#define kDSR   0x02
 
#define kRI   0x08
 
#define kDCD   0x01
 
#define kHandshakeInMask   ((UInt32)( PD_RS232_S_CTS | PD_RS232_S_DSR | PD_RS232_S_CAR | PD_RS232_S_RI ))
 
#define VENDOR_WRITE_REQUEST_TYPE   0x40
 
#define VENDOR_WRITE_REQUEST   0x01
 
#define VENDOR_READ_REQUEST_TYPE   0xc0
 
#define VENDOR_READ_REQUEST   0x01
 
#define SET_DCR0   0x00
 
#define GET_DCR0   0x80
 
#define DCR0_INIT   0x01
 
#define DCR0_INIT_H   0x41
 
#define DCR0_INIT_X   0x61
 
#define SET_DCR1   0x01
 
#define GET_DCR1   0x81
 
#define DCR1_INIT_H   0x80
 
#define DCR1_INIT_X   0x00
 
#define SET_DCR2   0x02
 
#define GET_DCR2   0x82
 
#define DCR2_INIT_H   0x24
 
#define DCR2_INIT_X   0x44
 
#define RESET_DOWNSTREAM_DATA_PIPE   0x08
 
#define RESET_UPSTREAM_DATA_PIPE   0x09
 
#define PL_MAX_ENDPOINTS   4
 

Enumerations

enum  tXO_State {
  kXOnSent = -2, kXOffSent = -1, kXO_Idle = 0, kXOffNeeded = 1,
  kXOnNeeded = 2
}
 
enum  pl2303_type {
  unknown, type_0, type_1, rev_X,
  rev_HX, rev_H
}
 

Macro Definition Documentation

◆ PL_VID

#define PL_VID   0x067B

Definition at line 24 of file cdcprolific.h.

◆ CHECK_PID

#define CHECK_PID (   pid)    ( pid != 0x2303 && pid != 0x0609 )

Definition at line 25 of file cdcprolific.h.

◆ PROLIFIC_REV_H

#define PROLIFIC_REV_H   0x0202

Definition at line 29 of file cdcprolific.h.

◆ PROLIFIC_REV_X

#define PROLIFIC_REV_X   0x0300

Definition at line 30 of file cdcprolific.h.

◆ PROLIFIC_REV_HX_CHIP_D

#define PROLIFIC_REV_HX_CHIP_D   0x0400

Definition at line 31 of file cdcprolific.h.

◆ PROLIFIC_REV_1

#define PROLIFIC_REV_1   0x0001

Definition at line 32 of file cdcprolific.h.

◆ kXOnChar

#define kXOnChar   '\x11'

Definition at line 34 of file cdcprolific.h.

◆ kXOffChar

#define kXOffChar   '\x13'

Definition at line 35 of file cdcprolific.h.

◆ SPECIAL_SHIFT

#define SPECIAL_SHIFT   (5)

Definition at line 37 of file cdcprolific.h.

◆ SPECIAL_MASK

#define SPECIAL_MASK   ((1<<SPECIAL_SHIFT) - 1)

Definition at line 38 of file cdcprolific.h.

◆ STATE_ALL

#define STATE_ALL   ( PD_RS232_S_MASK | PD_S_MASK )

Definition at line 39 of file cdcprolific.h.

◆ FLOW_RX_AUTO

#define FLOW_RX_AUTO   ( PD_RS232_A_RFR | PD_RS232_A_DTR | PD_RS232_A_RXO )

Definition at line 40 of file cdcprolific.h.

◆ FLOW_TX_AUTO

#define FLOW_TX_AUTO   ( PD_RS232_A_CTS | PD_RS232_A_DSR | PD_RS232_A_TXO | PD_RS232_A_DCD )

Definition at line 41 of file cdcprolific.h.

◆ CAN_BE_AUTO

#define CAN_BE_AUTO   ( FLOW_RX_AUTO | FLOW_TX_AUTO )

Definition at line 42 of file cdcprolific.h.

◆ CAN_NOTIFY

#define CAN_NOTIFY   ( PD_RS232_N_MASK )

Definition at line 43 of file cdcprolific.h.

◆ EXTERNAL_MASK

#define EXTERNAL_MASK   ( PD_S_MASK | (PD_RS232_S_MASK & ~PD_RS232_S_LOOP) )

Definition at line 44 of file cdcprolific.h.

◆ INTERNAL_DELAY

#define INTERNAL_DELAY   ( PD_RS232_S_LOOP )

Definition at line 45 of file cdcprolific.h.

◆ DEFAULT_AUTO

#define DEFAULT_AUTO   ( PD_RS232_A_DTR | PD_RS232_A_RFR | PD_RS232_A_CTS | PD_RS232_A_DSR )

Definition at line 46 of file cdcprolific.h.

◆ DEFAULT_NOTIFY

#define DEFAULT_NOTIFY   0x00

Definition at line 47 of file cdcprolific.h.

◆ DEFAULT_STATE

#define DEFAULT_STATE   ( PD_S_TX_ENABLE | PD_S_RX_ENABLE | PD_RS232_A_TXO | PD_RS232_A_RXO )

Definition at line 48 of file cdcprolific.h.

◆ CONTINUE_SEND

#define CONTINUE_SEND   1

Definition at line 50 of file cdcprolific.h.

◆ PAUSE_SEND

#define PAUSE_SEND   2

Definition at line 51 of file cdcprolific.h.

◆ kRxAutoFlow

#define kRxAutoFlow   ((UInt32)( PD_RS232_A_RFR | PD_RS232_A_DTR | PD_RS232_A_RXO ))

Definition at line 53 of file cdcprolific.h.

◆ kTxAutoFlow

#define kTxAutoFlow   ((UInt32)( PD_RS232_A_CTS | PD_RS232_A_DSR | PD_RS232_A_TXO | PD_RS232_A_DCD ))

Definition at line 54 of file cdcprolific.h.

◆ kControl_StateMask

#define kControl_StateMask   ((UInt32)( PD_RS232_S_CTS | PD_RS232_S_DSR | PD_RS232_S_CAR | PD_RS232_S_RI ))

Definition at line 55 of file cdcprolific.h.

◆ kRxQueueState

#define kRxQueueState   ((UInt32)( PD_S_RXQ_EMPTY | PD_S_RXQ_LOW_WATER | PD_S_RXQ_HIGH_WATER | PD_S_RXQ_FULL ))

Definition at line 56 of file cdcprolific.h.

◆ kTxQueueState

#define kTxQueueState   ((UInt32)( PD_S_TXQ_EMPTY | PD_S_TXQ_LOW_WATER | PD_S_TXQ_HIGH_WATER | PD_S_TXQ_FULL ))

Definition at line 57 of file cdcprolific.h.

◆ kCONTROL_DTR

#define kCONTROL_DTR   0x01

Definition at line 59 of file cdcprolific.h.

◆ kCONTROL_RTS

#define kCONTROL_RTS   0x02

Definition at line 60 of file cdcprolific.h.

◆ kStateTransientMask

#define kStateTransientMask   0x74

Definition at line 62 of file cdcprolific.h.

◆ kBreakError

#define kBreakError   0x04

Definition at line 63 of file cdcprolific.h.

◆ kFrameError

#define kFrameError   0x10

Definition at line 64 of file cdcprolific.h.

◆ kParityError

#define kParityError   0x20

Definition at line 65 of file cdcprolific.h.

◆ kOverrunError

#define kOverrunError   0x40

Definition at line 66 of file cdcprolific.h.

◆ kCTS

#define kCTS   0x80

Definition at line 68 of file cdcprolific.h.

◆ kDSR

#define kDSR   0x02

Definition at line 69 of file cdcprolific.h.

◆ kRI

#define kRI   0x08

Definition at line 70 of file cdcprolific.h.

◆ kDCD

#define kDCD   0x01

Definition at line 71 of file cdcprolific.h.

◆ kHandshakeInMask

#define kHandshakeInMask   ((UInt32)( PD_RS232_S_CTS | PD_RS232_S_DSR | PD_RS232_S_CAR | PD_RS232_S_RI ))

Definition at line 72 of file cdcprolific.h.

◆ VENDOR_WRITE_REQUEST_TYPE

#define VENDOR_WRITE_REQUEST_TYPE   0x40

Definition at line 74 of file cdcprolific.h.

◆ VENDOR_WRITE_REQUEST

#define VENDOR_WRITE_REQUEST   0x01

Definition at line 75 of file cdcprolific.h.

◆ VENDOR_READ_REQUEST_TYPE

#define VENDOR_READ_REQUEST_TYPE   0xc0

Definition at line 77 of file cdcprolific.h.

◆ VENDOR_READ_REQUEST

#define VENDOR_READ_REQUEST   0x01

Definition at line 78 of file cdcprolific.h.

◆ SET_DCR0

#define SET_DCR0   0x00

Definition at line 81 of file cdcprolific.h.

◆ GET_DCR0

#define GET_DCR0   0x80

Definition at line 82 of file cdcprolific.h.

◆ DCR0_INIT

#define DCR0_INIT   0x01

Definition at line 83 of file cdcprolific.h.

◆ DCR0_INIT_H

#define DCR0_INIT_H   0x41

Definition at line 84 of file cdcprolific.h.

◆ DCR0_INIT_X

#define DCR0_INIT_X   0x61

Definition at line 85 of file cdcprolific.h.

◆ SET_DCR1

#define SET_DCR1   0x01

Definition at line 87 of file cdcprolific.h.

◆ GET_DCR1

#define GET_DCR1   0x81

Definition at line 88 of file cdcprolific.h.

◆ DCR1_INIT_H

#define DCR1_INIT_H   0x80

Definition at line 89 of file cdcprolific.h.

◆ DCR1_INIT_X

#define DCR1_INIT_X   0x00

Definition at line 90 of file cdcprolific.h.

◆ SET_DCR2

#define SET_DCR2   0x02

Definition at line 92 of file cdcprolific.h.

◆ GET_DCR2

#define GET_DCR2   0x82

Definition at line 93 of file cdcprolific.h.

◆ DCR2_INIT_H

#define DCR2_INIT_H   0x24

Definition at line 94 of file cdcprolific.h.

◆ DCR2_INIT_X

#define DCR2_INIT_X   0x44

Definition at line 95 of file cdcprolific.h.

◆ RESET_DOWNSTREAM_DATA_PIPE

#define RESET_DOWNSTREAM_DATA_PIPE   0x08

Definition at line 98 of file cdcprolific.h.

◆ RESET_UPSTREAM_DATA_PIPE

#define RESET_UPSTREAM_DATA_PIPE   0x09

Definition at line 99 of file cdcprolific.h.

◆ PL_MAX_ENDPOINTS

#define PL_MAX_ENDPOINTS   4

Definition at line 102 of file cdcprolific.h.

Enumeration Type Documentation

◆ tXO_State

enum tXO_State
Enumerator
kXOnSent 
kXOffSent 
kXO_Idle 
kXOffNeeded 
kXOnNeeded 

Definition at line 104 of file cdcprolific.h.

◆ pl2303_type

Enumerator
unknown 
type_0 
type_1 
rev_X 
rev_HX 
rev_H 

Definition at line 112 of file cdcprolific.h.