Merge remote-tracking branch 'upstream/master' into CCRX_Port

This commit is contained in:
Wini-Buh
2021-06-03 22:17:30 +02:00
103 changed files with 1429 additions and 1543 deletions

View File

@@ -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;

View File

@@ -28,7 +28,6 @@
#define _TUSB_CDC_DEVICE_H_
#include "common/tusb_common.h"
#include "device/usbd.h"
#include "cdc.h"
//--------------------------------------------------------------------+

View File

@@ -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)

View File

@@ -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

View File

@@ -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);