Skip to content

Commit 6481d69

Browse files
authored
Merge pull request #363 from adafruit/update-tinyusb-for-ch34x-host
update tinyusb for ch34x host support
2 parents eb09bb4 + 5bbad8d commit 6481d69

File tree

7 files changed

+738
-245
lines changed

7 files changed

+738
-245
lines changed

src/class/cdc/cdc.h

+9-11
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,7 @@ typedef enum{
136136
//--------------------------------------------------------------------+
137137

138138
/// Communication Interface Management Element Request Codes
139-
typedef enum
140-
{
139+
typedef enum {
141140
CDC_REQUEST_SEND_ENCAPSULATED_COMMAND = 0x00, ///< is used to issue a command in the format of the supported control protocol of the Communications Class interface
142141
CDC_REQUEST_GET_ENCAPSULATED_RESPONSE = 0x01, ///< is used to request a response in the format of the supported control protocol of the Communications Class interface.
143142
CDC_REQUEST_SET_COMM_FEATURE = 0x02,
@@ -180,39 +179,38 @@ typedef enum
180179
CDC_REQUEST_GET_ATM_VC_STATISTICS = 0x53,
181180

182181
CDC_REQUEST_MDLM_SEMANTIC_MODEL = 0x60,
183-
}cdc_management_request_t;
182+
} cdc_management_request_t;
184183

185-
enum {
184+
typedef enum {
186185
CDC_CONTROL_LINE_STATE_DTR = 0x01,
187186
CDC_CONTROL_LINE_STATE_RTS = 0x02,
188-
};
187+
} cdc_control_line_state_t;
189188

190-
enum {
189+
typedef enum {
191190
CDC_LINE_CODING_STOP_BITS_1 = 0, // 1 bit
192191
CDC_LINE_CODING_STOP_BITS_1_5 = 1, // 1.5 bits
193192
CDC_LINE_CODING_STOP_BITS_2 = 2, // 2 bits
194-
};
193+
} cdc_line_coding_stopbits_t;
195194

196195
// TODO Backward compatible for typos. Maybe removed in the future release
197196
#define CDC_LINE_CONDING_STOP_BITS_1 CDC_LINE_CODING_STOP_BITS_1
198197
#define CDC_LINE_CONDING_STOP_BITS_1_5 CDC_LINE_CODING_STOP_BITS_1_5
199198
#define CDC_LINE_CONDING_STOP_BITS_2 CDC_LINE_CODING_STOP_BITS_2
200199

201-
enum {
200+
typedef enum {
202201
CDC_LINE_CODING_PARITY_NONE = 0,
203202
CDC_LINE_CODING_PARITY_ODD = 1,
204203
CDC_LINE_CODING_PARITY_EVEN = 2,
205204
CDC_LINE_CODING_PARITY_MARK = 3,
206205
CDC_LINE_CODING_PARITY_SPACE = 4,
207-
};
206+
} cdc_line_coding_parity_t;
208207

209208
//--------------------------------------------------------------------+
210209
// Management Element Notification (Notification Endpoint)
211210
//--------------------------------------------------------------------+
212211

213212
/// 6.3 Notification Codes
214-
typedef enum
215-
{
213+
typedef enum {
216214
CDC_NOTIF_NETWORK_CONNECTION = 0x00, ///< This notification allows the device to notify the host about network connection status.
217215
CDC_NOTIF_RESPONSE_AVAILABLE = 0x01, ///< This notification allows the device to notify the hostthat a response is available. This response can be retrieved with a subsequent \ref CDC_REQUEST_GET_ENCAPSULATED_RESPONSE request.
218216
CDC_NOTIF_AUX_JACK_HOOK_STATE = 0x08,

0 commit comments

Comments
 (0)