summaryrefslogtreecommitdiff
path: root/tinyusb/device
diff options
context:
space:
mode:
Diffstat (limited to 'tinyusb/device')
-rw-r--r--tinyusb/device/dcd.h4
-rw-r--r--tinyusb/device/dcd_lpc175x_6x.c4
-rw-r--r--tinyusb/device/dcd_lpc_11uxx_13uxx.c4
-rw-r--r--tinyusb/device/usbd.c2
4 files changed, 5 insertions, 9 deletions
diff --git a/tinyusb/device/dcd.h b/tinyusb/device/dcd.h
index 13cdbbbba..a2948af52 100644
--- a/tinyusb/device/dcd.h
+++ b/tinyusb/device/dcd.h
@@ -91,12 +91,12 @@ bool hal_dcd_pipe_open(uint8_t coreid, tusb_descriptor_endpoint_t const * p_endp
tusb_error_t dcd_pipe_queue_xfer(endpoint_handle_t edpt_hdl, uint8_t * buffer, uint16_t total_bytes); // only queue, not transferring yet
tusb_error_t hal_dcd_pipe_xfer(endpoint_handle_t edpt_hdl, uint8_t * buffer, uint16_t total_bytes, bool int_on_complete);
-void hal_dcd_pipe_stall(endpoint_handle_t edpt_hdl);
bool dcd_pipe_is_busy(endpoint_handle_t edpt_hdl);
// TODO coreid + endpoint address are part of endpoint handle, not endpoint handle, data toggle also need to be reset
-tusb_error_t dcd_pipe_clear_stall(uint8_t coreid, uint8_t edpt_addr);
+void hal_dcd_pipe_stall(endpoint_handle_t edpt_hdl);
+void hal_dcd_pipe_clear_stall(uint8_t coreid, uint8_t edpt_addr);
#ifdef __cplusplus
}
diff --git a/tinyusb/device/dcd_lpc175x_6x.c b/tinyusb/device/dcd_lpc175x_6x.c
index bdd06497a..2f5d069a4 100644
--- a/tinyusb/device/dcd_lpc175x_6x.c
+++ b/tinyusb/device/dcd_lpc175x_6x.c
@@ -458,13 +458,11 @@ void hal_dcd_pipe_stall(endpoint_handle_t edpt_hdl)
sie_write(SIE_CMDCODE_ENDPOINT_SET_STATUS+edpt_hdl.index, 1, SIE_SET_ENDPOINT_STALLED_MASK);
}
-tusb_error_t dcd_pipe_clear_stall(uint8_t coreid, uint8_t edpt_addr)
+void hal_dcd_pipe_clear_stall(uint8_t coreid, uint8_t edpt_addr)
{
uint8_t ep_id = edpt_addr2phy(edpt_addr);
sie_write(SIE_CMDCODE_ENDPOINT_SET_STATUS+ep_id, 1, 0);
-
- return TUSB_ERROR_FAILED;
}
void dd_xfer_init(dcd_dma_descriptor_t* p_dd, void* buffer, uint16_t total_bytes)
diff --git a/tinyusb/device/dcd_lpc_11uxx_13uxx.c b/tinyusb/device/dcd_lpc_11uxx_13uxx.c
index f5422e990..151abe798 100644
--- a/tinyusb/device/dcd_lpc_11uxx_13uxx.c
+++ b/tinyusb/device/dcd_lpc_11uxx_13uxx.c
@@ -438,7 +438,7 @@ bool dcd_pipe_is_stalled(endpoint_handle_t edpt_hdl)
return dcd_data.qhd[edpt_hdl.index][0].stall || dcd_data.qhd[edpt_hdl.index][1].stall;
}
-tusb_error_t dcd_pipe_clear_stall(uint8_t coreid, uint8_t edpt_addr)
+void hal_dcd_pipe_clear_stall(uint8_t coreid, uint8_t edpt_addr)
{
uint8_t ep_id = edpt_addr2phy(edpt_addr);
// uint8_t active_buffer = BIT_TEST_(LPC_USB->EPINUSE, ep_id) ? 1 : 0;
@@ -454,8 +454,6 @@ tusb_error_t dcd_pipe_clear_stall(uint8_t coreid, uint8_t edpt_addr)
{
queue_xfer_in_next_td(ep_id);
}
-
- return TUSB_ERROR_NONE;
}
endpoint_handle_t hal_dcd_pipe_open(uint8_t coreid, tusb_descriptor_endpoint_t const * p_endpoint_desc, uint8_t class_code)
diff --git a/tinyusb/device/usbd.c b/tinyusb/device/usbd.c
index 3a3bb6220..e16afbfb1 100644
--- a/tinyusb/device/usbd.c
+++ b/tinyusb/device/usbd.c
@@ -297,7 +297,7 @@ tusb_error_t usbd_control_request_subtask(uint8_t coreid, tusb_control_request_t
TUSB_REQUEST_TYPE_STANDARD == p_request->bmRequestType_bit.type &&
TUSB_REQUEST_CLEAR_FEATURE == p_request->bRequest )
{
- dcd_pipe_clear_stall(coreid, u16_low_u8(p_request->wIndex) );
+ hal_dcd_pipe_clear_stall(coreid, u16_low_u8(p_request->wIndex) );
} else
{
error = TUSB_ERROR_DCD_CONTROL_REQUEST_NOT_SUPPORT;