summaryrefslogtreecommitdiff
path: root/tinyusb/class/cdc
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-03-11 13:13:04 +0700
committerhathach <[email protected]>2018-03-11 13:13:04 +0700
commitd0a810317fe9943d34effc021591ff78516ace51 (patch)
treeb6884029d7d9ed6e2ab24cedb0bb438847e2c41b /tinyusb/class/cdc
parent276603fead99065ce89557dab6286ceec8ea9995 (diff)
rename dcd_* API to tusb_dcd_*
Diffstat (limited to 'tinyusb/class/cdc')
-rw-r--r--tinyusb/class/cdc/cdc_device.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tinyusb/class/cdc/cdc_device.c b/tinyusb/class/cdc/cdc_device.c
index c121a97f7..75b7da204 100644
--- a/tinyusb/class/cdc/cdc_device.c
+++ b/tinyusb/class/cdc/cdc_device.c
@@ -157,7 +157,7 @@ tusb_error_t cdcd_open(uint8_t port, tusb_descriptor_interface_t const * p_inter
if ( TUSB_DESC_TYPE_ENDPOINT == p_desc[DESCRIPTOR_OFFSET_TYPE])
{ // notification endpoint if any
- VERIFY( hal_dcd_pipe_open(port, (tusb_descriptor_endpoint_t const *) p_desc, &p_cdc->edpt_hdl[CDC_PIPE_NOTIFICATION]), TUSB_ERROR_DCD_OPEN_PIPE_FAILED);
+ VERIFY( tusb_dcd_pipe_open(port, (tusb_descriptor_endpoint_t const *) p_desc, &p_cdc->edpt_hdl[CDC_PIPE_NOTIFICATION]), TUSB_ERROR_DCD_OPEN_PIPE_FAILED);
(*p_length) += p_desc[DESCRIPTOR_OFFSET_LENGTH];
p_desc = descriptor_next(p_desc);
@@ -180,7 +180,7 @@ tusb_error_t cdcd_open(uint8_t port, tusb_descriptor_interface_t const * p_inter
edpt_hdl_t * p_edpt_hdl = ( p_endpoint->bEndpointAddress & TUSB_DIR_DEV_TO_HOST_MASK ) ?
&p_cdc->edpt_hdl[CDC_PIPE_DATA_IN] : &p_cdc->edpt_hdl[CDC_PIPE_DATA_OUT] ;
- ASSERT_( hal_dcd_pipe_open(port, p_endpoint, p_edpt_hdl), TUSB_ERROR_DCD_OPEN_PIPE_FAILED);
+ ASSERT_( tusb_dcd_pipe_open(port, p_endpoint, p_edpt_hdl), TUSB_ERROR_DCD_OPEN_PIPE_FAILED);
(*p_length) += p_desc[DESCRIPTOR_OFFSET_LENGTH];
p_desc = descriptor_next( p_desc );
@@ -190,7 +190,7 @@ tusb_error_t cdcd_open(uint8_t port, tusb_descriptor_interface_t const * p_inter
p_cdc->interface_number = p_interface_desc->bInterfaceNumber;
// Prepare for incoming data
- hal_dcd_pipe_xfer(p_cdc->edpt_hdl[CDC_PIPE_DATA_OUT], _tmp_rx_buf, sizeof(_tmp_rx_buf), true);
+ tusb_dcd_pipe_xfer(p_cdc->edpt_hdl[CDC_PIPE_DATA_OUT], _tmp_rx_buf, sizeof(_tmp_rx_buf), true);
return TUSB_ERROR_NONE;
@@ -213,12 +213,12 @@ tusb_error_t cdcd_control_request_subtask(uint8_t port, tusb_control_request_t c
switch(p_request->bRequest)
{
case CDC_REQUEST_GET_LINE_CODING:
- hal_dcd_control_xfer(port, (tusb_direction_t) p_request->bmRequestType_bit.direction,
+ tusb_dcd_control_xfer(port, (tusb_direction_t) p_request->bmRequestType_bit.direction,
(uint8_t*) &cdcd_line_coding[port], min16_of(sizeof(cdc_line_coding_t), p_request->wLength), false );
break;
case CDC_REQUEST_SET_LINE_CODING:
- hal_dcd_control_xfer(port, (tusb_direction_t) p_request->bmRequestType_bit.direction,
+ tusb_dcd_control_xfer(port, (tusb_direction_t) p_request->bmRequestType_bit.direction,
(uint8_t*) &cdcd_line_coding[port], min16_of(sizeof(cdc_line_coding_t), p_request->wLength), false );
// TODO notify application on xfer completea
break;
@@ -264,7 +264,7 @@ tusb_error_t cdcd_xfer_cb(edpt_hdl_t edpt_hdl, tusb_event_t event, uint32_t xfer
fifo_write_n(&_rx_ff, _tmp_rx_buf, xferred_bytes);
// preparing for next
- hal_dcd_pipe_xfer(p_cdc->edpt_hdl[CDC_PIPE_DATA_OUT], _tmp_rx_buf, sizeof(_tmp_rx_buf), true);
+ tusb_dcd_pipe_xfer(p_cdc->edpt_hdl[CDC_PIPE_DATA_OUT], _tmp_rx_buf, sizeof(_tmp_rx_buf), true);
// fire callback
tud_cdc_rx_cb(edpt_hdl.port);
@@ -283,7 +283,7 @@ void cdcd_sof(uint8_t port)
{
uint16_t count = fifo_read_n(&_tx_ff, _tmp_tx_buf, sizeof(_tmp_tx_buf));
- hal_dcd_pipe_xfer(ep, _tmp_tx_buf, count, false);
+ tusb_dcd_pipe_xfer(ep, _tmp_tx_buf, count, false);
}
}