diff options
| author | hathach <[email protected]> | 2019-03-27 17:48:42 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2019-03-27 17:48:42 +0700 |
| commit | da452d4ba6127b2b3b83832ba142bece911e2490 (patch) | |
| tree | 24867b63622d6d72e65ab522987403bf2ded299f /src/class/cdc | |
| parent | 3dfb251c1e2c7d1b6f91cf4bb2f3010e333592b3 (diff) | |
cleanup, remove the use of _TINY_USB_SOURCE_FILE_
Diffstat (limited to 'src/class/cdc')
| -rw-r--r-- | src/class/cdc/cdc_device.c | 2 | ||||
| -rw-r--r-- | src/class/cdc/cdc_device.h | 7 | ||||
| -rw-r--r-- | src/class/cdc/cdc_host.c | 2 | ||||
| -rw-r--r-- | src/class/cdc/cdc_host.h | 6 | ||||
| -rw-r--r-- | src/class/cdc/cdc_rndis_host.c | 2 | ||||
| -rw-r--r-- | src/class/cdc/cdc_rndis_host.h | 6 |
6 files changed, 4 insertions, 21 deletions
diff --git a/src/class/cdc/cdc_device.c b/src/class/cdc/cdc_device.c index 48e94a6e1..2ac8d471c 100644 --- a/src/class/cdc/cdc_device.c +++ b/src/class/cdc/cdc_device.c @@ -28,8 +28,6 @@ #if (TUSB_OPT_DEVICE_ENABLED && CFG_TUD_CDC)
-#define _TINY_USB_SOURCE_FILE_
-
#include "cdc_device.h"
#include "device/usbd_pvt.h"
diff --git a/src/class/cdc/cdc_device.h b/src/class/cdc/cdc_device.h index 3375fc98d..468edef45 100644 --- a/src/class/cdc/cdc_device.h +++ b/src/class/cdc/cdc_device.h @@ -96,10 +96,9 @@ ATTR_WEAK void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts); ATTR_WEAK void tud_cdc_line_coding_cb(uint8_t itf, cdc_line_coding_t const* p_line_coding);
//--------------------------------------------------------------------+
-// USBD-CLASS DRIVER API
-//--------------------------------------------------------------------+
-#ifdef _TINY_USB_SOURCE_FILE_
+// INTERNAL USBD-CLASS DRIVER API
+//--------------------------------------------------------------------+
void cdcd_init (void);
bool cdcd_open (uint8_t rhport, tusb_desc_interface_t const * p_interface_desc, uint16_t *p_length);
bool cdcd_control_request (uint8_t rhport, tusb_control_request_t const * p_request);
@@ -107,8 +106,6 @@ bool cdcd_control_request_complete (uint8_t rhport, tusb_control_request_t const bool cdcd_xfer_cb (uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint32_t xferred_bytes);
void cdcd_reset (uint8_t rhport);
-#endif
-
#ifdef __cplusplus
}
#endif
diff --git a/src/class/cdc/cdc_host.c b/src/class/cdc/cdc_host.c index 4932a61ac..75c805152 100644 --- a/src/class/cdc/cdc_host.c +++ b/src/class/cdc/cdc_host.c @@ -28,8 +28,6 @@ #if (TUSB_OPT_HOST_ENABLED && CFG_TUH_CDC)
-#define _TINY_USB_SOURCE_FILE_
-
#include "common/tusb_common.h"
#include "cdc_host.h"
diff --git a/src/class/cdc/cdc_host.h b/src/class/cdc/cdc_host.h index 716203b96..7a302eb0f 100644 --- a/src/class/cdc/cdc_host.h +++ b/src/class/cdc/cdc_host.h @@ -109,17 +109,13 @@ void tuh_cdc_xfer_isr(uint8_t dev_addr, xfer_result_t event, cdc_pipeid_t pipe_i /// @}
//--------------------------------------------------------------------+
-// USBH-CLASS API
+// Internal Class Driver API
//--------------------------------------------------------------------+
-#ifdef _TINY_USB_SOURCE_FILE_
-
void cdch_init(void);
bool cdch_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *itf_desc, uint16_t *p_length);
void cdch_isr(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t event, uint32_t xferred_bytes);
void cdch_close(uint8_t dev_addr);
-#endif
-
#ifdef __cplusplus
}
#endif
diff --git a/src/class/cdc/cdc_rndis_host.c b/src/class/cdc/cdc_rndis_host.c index d377ddca3..587e9ddc8 100644 --- a/src/class/cdc/cdc_rndis_host.c +++ b/src/class/cdc/cdc_rndis_host.c @@ -28,8 +28,6 @@ #if (TUSB_OPT_HOST_ENABLED && CFG_TUH_CDC && CFG_TUH_CDC_RNDIS) -#define _TINY_USB_SOURCE_FILE_ - //--------------------------------------------------------------------+ // INCLUDE //--------------------------------------------------------------------+ diff --git a/src/class/cdc/cdc_rndis_host.h b/src/class/cdc/cdc_rndis_host.h index 377ae64ba..24becee07 100644 --- a/src/class/cdc/cdc_rndis_host.h +++ b/src/class/cdc/cdc_rndis_host.h @@ -40,10 +40,8 @@ #endif //--------------------------------------------------------------------+ -// RNDIS-CDC Driver API +// INTERNAL RNDIS-CDC Driver API //--------------------------------------------------------------------+ -#ifdef _TINY_USB_SOURCE_FILE_ - typedef struct { OSAL_SEM_DEF(semaphore_notification); osal_semaphore_handle_t sem_notification_hdl; // used to wait on notification pipe @@ -56,8 +54,6 @@ tusb_error_t rndish_open_subtask(uint8_t dev_addr, cdch_data_t *p_cdc); void rndish_xfer_isr(cdch_data_t *p_cdc, pipe_handle_t pipe_hdl, xfer_result_t event, uint32_t xferred_bytes); void rndish_close(uint8_t dev_addr); -#endif - #ifdef __cplusplus } #endif |
