diff options
| author | hathach <[email protected]> | 2018-06-06 13:40:02 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-06-06 13:40:02 +0700 |
| commit | 567725878254530eaf313cf69c5ce8f31ba4ee17 (patch) | |
| tree | 565944086f16d0472cf043c5731ebaef2ee0658b /tinyusb/class | |
| parent | 3a64acaa28222cda74d9b1dc97a028951ed26688 (diff) | |
clean up
Diffstat (limited to 'tinyusb/class')
| -rw-r--r-- | tinyusb/class/cdc/cdc_device.c | 4 | ||||
| -rw-r--r-- | tinyusb/class/cdc/cdc_device.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/tinyusb/class/cdc/cdc_device.c b/tinyusb/class/cdc/cdc_device.c index 735a1ff72..9237e1945 100644 --- a/tinyusb/class/cdc/cdc_device.c +++ b/tinyusb/class/cdc/cdc_device.c @@ -314,11 +314,11 @@ tusb_error_t cdcd_xfer_cb(uint8_t rhport, uint8_t ep_addr, tusb_event_t event, u return TUSB_ERROR_NONE;
}
+#if CFG_TUD_CDC_FLUSH_ON_SOF
void cdcd_sof(uint8_t rhport)
{
-#if CFG_TUD_CDC_FLUSH_ON_SOF
tud_n_cdc_flush(rhport);
-#endif
}
+#endif
#endif
diff --git a/tinyusb/class/cdc/cdc_device.h b/tinyusb/class/cdc/cdc_device.h index 60b7a787b..c1a790fc8 100644 --- a/tinyusb/class/cdc/cdc_device.h +++ b/tinyusb/class/cdc/cdc_device.h @@ -102,7 +102,11 @@ tusb_error_t cdcd_control_request_st(uint8_t rhport, tusb_control_request_t cons tusb_error_t cdcd_xfer_cb(uint8_t rhport, uint8_t edpt_addr, tusb_event_t event, uint32_t xferred_bytes);
void cdcd_close(uint8_t rhport);
+#if CFG_TUD_CDC_FLUSH_ON_SOF
void cdcd_sof(uint8_t rhport);
+#else
+#define cdcd_sof NULL
+#endif
#endif
|
