17 #if !defined(__CDCACM_H__)
21 #include <avr/pgmspace.h>
28 #if defined(ARDUINO) && ARDUINO >=100
40 #define bmREQ_CDCOUT USB_SETUP_HOST_TO_DEVICE|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE
41 #define bmREQ_CDCIN USB_SETUP_DEVICE_TO_HOST|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE
44 #define CDC_SUBCLASS_DLCM 0x01 // Direct Line Control Model
45 #define CDC_SUBCLASS_ACM 0x02 // Abstract Control Model
46 #define CDC_SUBCLASS_TCM 0x03 // Telephone Control Model
47 #define CDC_SUBCLASS_MCCM 0x04 // Multi Channel Control Model
48 #define CDC_SUBCLASS_CAPI 0x05 // CAPI Control Model
49 #define CDC_SUBCLASS_ETHERNET 0x06 // Ethernet Network Control Model
50 #define CDC_SUBCLASS_ATM 0x07 // ATM Network Control Model
51 #define CDC_SUBCLASS_WIRELESS_HANDSET 0x08 // Wireless Handset Control Model
52 #define CDC_SUBCLASS_DEVICE_MANAGEMENT 0x09 // Device Management
53 #define CDC_SUBCLASS_MOBILE_DIRECT_LINE 0x0A // Mobile Direct Line Model
54 #define CDC_SUBCLASS_OBEX 0x0B // OBEX
55 #define CDC_SUBCLASS_ETHERNET_EMU 0x0C // Ethernet Emulation Model
58 #define CDC_PROTOCOL_ITU_T_V_250 0x01 // AT Commands defined by ITU-T V.250
59 #define CDC_PROTOCOL_PCCA_101 0x02 // AT Commands defined by PCCA-101
60 #define CDC_PROTOCOL_PCCA_101_O 0x03 // AT Commands defined by PCCA-101 & Annex O
61 #define CDC_PROTOCOL_GSM_7_07 0x04 // AT Commands defined by GSM 7.07
62 #define CDC_PROTOCOL_3GPP_27_07 0x05 // AT Commands defined by 3GPP 27.007
63 #define CDC_PROTOCOL_C_S0017_0 0x06 // AT Commands defined by TIA for CDMA
64 #define CDC_PROTOCOL_USB_EEM 0x07 // Ethernet Emulation Model
67 #define CDC_SEND_ENCAPSULATED_COMMAND 0x00
68 #define CDC_GET_ENCAPSULATED_RESPONSE 0x01
71 #define CDC_SET_COMM_FEATURE 0x02
72 #define CDC_GET_COMM_FEATURE 0x03
73 #define CDC_CLEAR_COMM_FEATURE 0x04
74 #define CDC_SET_AUX_LINE_STATE 0x10
75 #define CDC_SET_HOOK_STATE 0x11
76 #define CDC_PULSE_SETUP 0x12
77 #define CDC_SEND_PULSE 0x13
78 #define CDC_SET_PULSE_TIME 0x14
79 #define CDC_RING_AUX_JACK 0x15
80 #define CDC_SET_LINE_CODING 0x20
81 #define CDC_GET_LINE_CODING 0x21
82 #define CDC_SET_CONTROL_LINE_STATE 0x22
83 #define CDC_SEND_BREAK 0x23
84 #define CDC_SET_RINGER_PARMS 0x30
85 #define CDC_GET_RINGER_PARMS 0x31
86 #define CDC_SET_OPERATION_PARMS 0x32
87 #define CDC_GET_OPERATION_PARMS 0x33
88 #define CDC_SET_LINE_PARMS 0x34
89 #define CDC_GET_LINE_PARMS 0x35
90 #define CDC_DIAL_DIGITS 0x36
93 #define NETWORK_CONNECTION 0x00
94 #define RESPONSE_AVAILABLE 0x01
95 #define AUX_JACK_HOOK_STATE 0x08
96 #define RING_DETECT 0x09
97 #define SERIAL_STATE 0x20
98 #define CALL_STATE_CHANGE 0x28
99 #define LINE_STATE_CHANGE 0x29
100 #define CONNECTION_SPEED_CHANGE 0x2a
155 #define ACM_MAX_ENDPOINTS 4
181 uint8_t
SetCommFeature(uint16_t fid, uint8_t nbytes, uint8_t *dataptr);
182 uint8_t
GetCommFeature(uint16_t fid, uint8_t nbytes, uint8_t *dataptr);
188 uint8_t
GetNotif( uint16_t *bytes_rcvd, uint8_t *dataptr );
191 uint8_t
RcvData(uint16_t *nbytesptr, uint8_t *dataptr);
192 uint8_t
SndData(uint16_t nbytes, uint8_t *dataptr);
195 virtual uint8_t
Init(uint8_t parent, uint8_t port,
bool lowspeed);
197 virtual uint8_t
Poll();
211 #endif // __CDCACM_H__