diff options
| author | hathach <[email protected]> | 2018-03-11 12:37:07 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-03-11 12:37:07 +0700 |
| commit | 539fbe5d6276575d3f2dd943b7d5d7463a522732 (patch) | |
| tree | b5d2020985240da39063d02880c4f34e9785c694 /tinyusb/class/cdc | |
| parent | 6392903fb2b81c24bcbdfea323f58aaaf94e15ce (diff) | |
rename endpoint_handle_t to edpt_hdl_t
Diffstat (limited to 'tinyusb/class/cdc')
| -rw-r--r-- | tinyusb/class/cdc/cdc_device.c | 8 | ||||
| -rw-r--r-- | tinyusb/class/cdc/cdc_device.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tinyusb/class/cdc/cdc_device.c b/tinyusb/class/cdc/cdc_device.c index 657bac860..c121a97f7 100644 --- a/tinyusb/class/cdc/cdc_device.c +++ b/tinyusb/class/cdc/cdc_device.c @@ -58,7 +58,7 @@ typedef struct { bool connected;
- endpoint_handle_t edpt_hdl[3]; // notification, data in, data out
+ edpt_hdl_t edpt_hdl[3]; // notification, data in, data out
}cdcd_data_t;
// TODO multiple port
@@ -177,7 +177,7 @@ tusb_error_t cdcd_open(uint8_t port, tusb_descriptor_interface_t const * p_inter ASSERT_(TUSB_DESC_TYPE_ENDPOINT == p_endpoint->bDescriptorType, TUSB_ERROR_DESCRIPTOR_CORRUPTED);
ASSERT_(TUSB_XFER_BULK == p_endpoint->bmAttributes.xfer, TUSB_ERROR_DESCRIPTOR_CORRUPTED);
- endpoint_handle_t * p_edpt_hdl = ( p_endpoint->bEndpointAddress & TUSB_DIR_DEV_TO_HOST_MASK ) ?
+ 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);
@@ -255,7 +255,7 @@ tusb_error_t cdcd_control_request_subtask(uint8_t port, tusb_control_request_t c return TUSB_ERROR_NONE;
}
-tusb_error_t cdcd_xfer_cb(endpoint_handle_t edpt_hdl, tusb_event_t event, uint32_t xferred_bytes)
+tusb_error_t cdcd_xfer_cb(edpt_hdl_t edpt_hdl, tusb_event_t event, uint32_t xferred_bytes)
{
cdcd_data_t const * p_cdc = &cdcd_data[edpt_hdl.port];
@@ -277,7 +277,7 @@ void cdcd_sof(uint8_t port) {
if ( !tud_cdc_connected(port) ) return;
- endpoint_handle_t ep = cdcd_data[port].edpt_hdl[CDC_PIPE_DATA_IN];
+ edpt_hdl_t ep = cdcd_data[port].edpt_hdl[CDC_PIPE_DATA_IN];
if ( !dcd_pipe_is_busy( ep ) )
{
diff --git a/tinyusb/class/cdc/cdc_device.h b/tinyusb/class/cdc/cdc_device.h index 942d447b7..aaf7920a2 100644 --- a/tinyusb/class/cdc/cdc_device.h +++ b/tinyusb/class/cdc/cdc_device.h @@ -79,7 +79,7 @@ void tud_cdc_rx_cb(uint8_t port); void cdcd_init(void);
tusb_error_t cdcd_open(uint8_t port, tusb_descriptor_interface_t const * p_interface_desc, uint16_t *p_length);
tusb_error_t cdcd_control_request_subtask(uint8_t port, tusb_control_request_t const * p_request);
-tusb_error_t cdcd_xfer_cb(endpoint_handle_t edpt_hdl, tusb_event_t event, uint32_t xferred_bytes);
+tusb_error_t cdcd_xfer_cb(edpt_hdl_t edpt_hdl, tusb_event_t event, uint32_t xferred_bytes);
void cdcd_close(uint8_t port);
void cdcd_sof(uint8_t port);
|
