summaryrefslogtreecommitdiff
path: root/src/class/cdc
diff options
context:
space:
mode:
authorWini-Buh <[email protected]>2021-06-03 22:17:30 +0200
committerWini-Buh <[email protected]>2021-06-03 22:17:30 +0200
commit5a554508caba50bda2a82095a66a1896b960daaf (patch)
treec2a1aaafb98689d8827061a37cdbc7788a0eb4ad /src/class/cdc
parente26cf6b26ca0d7c54f71332896d4bed9c418844a (diff)
parentce30109b5bdb3ecd82f08c9dd48fe0f6f7f1713e (diff)
Merge remote-tracking branch 'upstream/master' into CCRX_Port
Diffstat (limited to 'src/class/cdc')
-rw-r--r--src/class/cdc/cdc_device.c4
-rw-r--r--src/class/cdc/cdc_device.h1
-rw-r--r--src/class/cdc/cdc_host.c8
-rw-r--r--src/class/cdc/cdc_host.h2
-rw-r--r--src/class/cdc/cdc_rndis_host.c2
5 files changed, 9 insertions, 8 deletions
diff --git a/src/class/cdc/cdc_device.c b/src/class/cdc/cdc_device.c
index cf2ec64c8..57bb804a8 100644
--- a/src/class/cdc/cdc_device.c
+++ b/src/class/cdc/cdc_device.c
@@ -28,9 +28,11 @@
#if (TUSB_OPT_DEVICE_ENABLED && CFG_TUD_CDC)
-#include "cdc_device.h"
+#include "device/usbd.h"
#include "device/usbd_pvt.h"
+#include "cdc_device.h"
+
#if defined(TU_HAS_NO_ATTR_WEAK)
static void (*const MAKE_WEAK_FUNC(tud_cdc_rx_cb))(uint8_t) = TUD_CDC_RX_CB;
static void (*const MAKE_WEAK_FUNC(tud_cdc_rx_wanted_cb))(uint8_t, char) = TUD_CDC_RX_WANTED_CB;
diff --git a/src/class/cdc/cdc_device.h b/src/class/cdc/cdc_device.h
index ed816b707..389516883 100644
--- a/src/class/cdc/cdc_device.h
+++ b/src/class/cdc/cdc_device.h
@@ -28,7 +28,6 @@
#define _TUSB_CDC_DEVICE_H_
#include "common/tusb_common.h"
-#include "device/usbd.h"
#include "cdc.h"
//--------------------------------------------------------------------+
diff --git a/src/class/cdc/cdc_host.c b/src/class/cdc/cdc_host.c
index a897fb58a..facf86d56 100644
--- a/src/class/cdc/cdc_host.c
+++ b/src/class/cdc/cdc_host.c
@@ -28,7 +28,7 @@
#if (TUSB_OPT_HOST_ENABLED && CFG_TUH_CDC)
-#include "common/tusb_common.h"
+#include "host/usbh.h"
#include "cdc_host.h"
//--------------------------------------------------------------------+
@@ -96,24 +96,26 @@ bool tuh_cdc_serial_is_mounted(uint8_t dev_addr)
bool tuh_cdc_send(uint8_t dev_addr, void const * p_data, uint32_t length, bool is_notify)
{
+ (void) is_notify;
TU_VERIFY( tuh_cdc_mounted(dev_addr) );
TU_VERIFY( p_data != NULL && length, TUSB_ERROR_INVALID_PARA);
uint8_t const ep_out = cdch_data[dev_addr-1].ep_out;
if ( hcd_edpt_busy(dev_addr, ep_out) ) return false;
- return hcd_pipe_xfer(dev_addr, ep_out, (void *) p_data, length, is_notify);
+ return usbh_edpt_xfer(dev_addr, ep_out, (void *) p_data, length);
}
bool tuh_cdc_receive(uint8_t dev_addr, void * p_buffer, uint32_t length, bool is_notify)
{
+ (void) is_notify;
TU_VERIFY( tuh_cdc_mounted(dev_addr) );
TU_VERIFY( p_buffer != NULL && length, TUSB_ERROR_INVALID_PARA);
uint8_t const ep_in = cdch_data[dev_addr-1].ep_in;
if ( hcd_edpt_busy(dev_addr, ep_in) ) return false;
- return hcd_pipe_xfer(dev_addr, ep_in, p_buffer, length, is_notify);
+ return usbh_edpt_xfer(dev_addr, ep_in, p_buffer, length);
}
bool tuh_cdc_set_control_line_state(uint8_t dev_addr, bool dtr, bool rts, tuh_control_complete_cb_t complete_cb)
diff --git a/src/class/cdc/cdc_host.h b/src/class/cdc/cdc_host.h
index 66c2f0727..6ff392709 100644
--- a/src/class/cdc/cdc_host.h
+++ b/src/class/cdc/cdc_host.h
@@ -27,8 +27,6 @@
#ifndef _TUSB_CDC_HOST_H_
#define _TUSB_CDC_HOST_H_
-#include "common/tusb_common.h"
-#include "host/usbh.h"
#include "cdc.h"
#ifdef __cplusplus
diff --git a/src/class/cdc/cdc_rndis_host.c b/src/class/cdc/cdc_rndis_host.c
index 767b917a1..42b9993bc 100644
--- a/src/class/cdc/cdc_rndis_host.c
+++ b/src/class/cdc/cdc_rndis_host.c
@@ -239,7 +239,7 @@ static tusb_error_t send_message_get_response_subtask( uint8_t dev_addr, cdch_da
if ( TUSB_ERROR_NONE != error ) STASK_RETURN(error);
//------------- waiting for Response Available notification -------------//
- (void) hcd_pipe_xfer(p_cdc->pipe_notification, msg_notification[dev_addr-1], 8, true);
+ (void) usbh_edpt_xfer(p_cdc->pipe_notification, msg_notification[dev_addr-1], 8);
osal_semaphore_wait(rndish_data[dev_addr-1].sem_notification_hdl, OSAL_TIMEOUT_NORMAL, &error);
if ( TUSB_ERROR_NONE != error ) STASK_RETURN(error);
STASK_ASSERT(msg_notification[dev_addr-1][0] == 1);