Skip to content

Commit 11233e4

Browse files
committed
minor clean up
1 parent c99af90 commit 11233e4

File tree

2 files changed

+9
-23
lines changed

2 files changed

+9
-23
lines changed

examples/host/cdc_msc_hid/src/tusb_config.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@
108108
#define CFG_TUH_HID_EPIN_BUFSIZE 64
109109
#define CFG_TUH_HID_EPOUT_BUFSIZE 64
110110

111+
//------------- CDC -------------//
112+
// Set both DTR ( bit 0), RTS (bit 1) on enumeration/mounted
113+
#define CFG_TUH_CDC_SET_DTRRTS_ON_ENUM 0x03
114+
111115
#ifdef __cplusplus
112116
}
113117
#endif

src/class/cdc/cdc_host.h

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
// RX Endpoint size
5151
#ifndef CFG_TUH_CDC_RX_EPSIZE
52-
#define CFG_TUH_CDC_RX_EPSIZE USBH_EPSIZE_BULK_MAX
52+
#define CFG_TUH_CDC_RX_EPSIZE USBH_EPSIZE_BULK_MAX
5353
#endif
5454

5555
// TX FIFO size
@@ -59,7 +59,7 @@
5959

6060
// TX Endpoint size
6161
#ifndef CFG_TUH_CDC_TX_EPSIZE
62-
#define CFG_TUH_CDC_TX_EPSIZE USBH_EPSIZE_BULK_MAX
62+
#define CFG_TUH_CDC_TX_EPSIZE USBH_EPSIZE_BULK_MAX
6363
#endif
6464

6565
//--------------------------------------------------------------------+
@@ -145,7 +145,9 @@ static inline bool tuh_cdc_disconnect(uint8_t idx, tuh_xfer_cb_t complete_cb, ui
145145
return tuh_cdc_set_control_line_state(idx, 0x00, complete_cb, user_data);
146146
}
147147

148-
//------------- Application Callback -------------//
148+
//--------------------------------------------------------------------+
149+
// CDC APPLICATION CALLBACKS
150+
//--------------------------------------------------------------------+
149151

150152
// Invoked when a device with CDC interface is mounted
151153
// idx is index of cdc interface in the internal pool.
@@ -160,26 +162,6 @@ TU_ATTR_WEAK extern void tuh_cdc_rx_cb(uint8_t idx);
160162
// Invoked when a TX is complete and therefore space becomes available in TX buffer
161163
TU_ATTR_WEAK extern void tuh_cdc_tx_complete_cb(uint8_t idx);
162164

163-
//--------------------------------------------------------------------+
164-
// CDC APPLICATION CALLBACKS
165-
//--------------------------------------------------------------------+
166-
167-
/** \brief Callback function that is invoked when an transferring event occurred
168-
* \param[in] dev_addr Address of device
169-
* \param[in] event an value from \ref xfer_result_t
170-
* \param[in] pipe_id value from \ref cdc_pipeid_t indicate the pipe
171-
* \param[in] xferred_bytes Number of bytes transferred via USB bus
172-
* \note event can be one of following
173-
* - XFER_RESULT_SUCCESS : previously scheduled transfer completes successfully.
174-
* - XFER_RESULT_FAILED : previously scheduled transfer encountered a transaction error.
175-
* - XFER_RESULT_STALLED : previously scheduled transfer is stalled by device.
176-
* \note
177-
*/
178-
// void tuh_cdc_xfer_isr(uint8_t dev_addr, xfer_result_t event, cdc_pipeid_t pipe_id, uint32_t xferred_bytes);
179-
180-
/// @} // group CDC_Serial_Host
181-
/// @}
182-
183165
//--------------------------------------------------------------------+
184166
// Internal Class Driver API
185167
//--------------------------------------------------------------------+

0 commit comments

Comments
 (0)