summaryrefslogtreecommitdiff
path: root/tinyusb/class/msc
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-03-11 12:37:07 +0700
committerhathach <[email protected]>2018-03-11 12:37:07 +0700
commit539fbe5d6276575d3f2dd943b7d5d7463a522732 (patch)
treeb5d2020985240da39063d02880c4f34e9785c694 /tinyusb/class/msc
parent6392903fb2b81c24bcbdfea323f58aaaf94e15ce (diff)
rename endpoint_handle_t to edpt_hdl_t
Diffstat (limited to 'tinyusb/class/msc')
-rw-r--r--tinyusb/class/msc/msc_device.c10
-rw-r--r--tinyusb/class/msc/msc_device.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/tinyusb/class/msc/msc_device.c b/tinyusb/class/msc/msc_device.c
index df3a4f327..16dd2e41c 100644
--- a/tinyusb/class/msc/msc_device.c
+++ b/tinyusb/class/msc/msc_device.c
@@ -62,7 +62,7 @@ typedef struct {
uint8_t max_lun;
uint8_t interface_number;
- endpoint_handle_t edpt_in, edpt_out;
+ edpt_hdl_t edpt_in, edpt_out;
}mscd_interface_t;
TUSB_CFG_ATTR_USBRAM STATIC_VAR mscd_interface_t mscd_data;
@@ -98,7 +98,7 @@ tusb_error_t mscd_open(uint8_t port, tusb_descriptor_interface_t const * p_inter
ASSERT(TUSB_DESC_TYPE_ENDPOINT == p_endpoint->bDescriptorType &&
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_msc->edpt_in : &p_msc->edpt_out;
VERIFY( hal_dcd_pipe_open(port, p_endpoint, p_edpt_hdl), TUSB_ERROR_DCD_FAILED );
@@ -142,7 +142,7 @@ tusb_error_t mscd_control_request_subtask(uint8_t port, tusb_control_request_t c
//--------------------------------------------------------------------+
// MSCD APPLICATION CALLBACK
//--------------------------------------------------------------------+
-tusb_error_t mscd_xfer_cb(endpoint_handle_t edpt_hdl, tusb_event_t event, uint32_t xferred_bytes)
+tusb_error_t mscd_xfer_cb(edpt_hdl_t edpt_hdl, tusb_event_t event, uint32_t xferred_bytes)
{
static bool is_waiting_read10_write10 = false; // indicate we are transferring data in READ10, WRITE10 command
@@ -182,7 +182,7 @@ tusb_error_t mscd_xfer_cb(endpoint_handle_t edpt_hdl, tusb_event_t event, uint32
ASSERT( p_cbw->xfer_bytes >= actual_length, TUSB_ERROR_INVALID_PARA );
ASSERT( sizeof(p_msc->scsi_data) >= actual_length, TUSB_ERROR_NOT_ENOUGH_MEMORY); // needs to increase size for scsi_data
- endpoint_handle_t const edpt_data = BIT_TEST_(p_cbw->dir, 7) ? p_msc->edpt_in : p_msc->edpt_out;
+ edpt_hdl_t const edpt_data = BIT_TEST_(p_cbw->dir, 7) ? p_msc->edpt_in : p_msc->edpt_out;
if ( p_buffer == NULL || actual_length == 0 )
{ // application does not provide data to response --> possibly unsupported SCSI command
@@ -224,7 +224,7 @@ static bool read10_write10_data_xfer(mscd_interface_t* p_msc)
scsi_read10_t* p_readwrite = (scsi_read10_t*) &p_cbw->command; // read10 & write10 has the same format
- endpoint_handle_t const edpt_hdl = BIT_TEST_(p_cbw->dir, 7) ? p_msc->edpt_in : p_msc->edpt_out;
+ edpt_hdl_t const edpt_hdl = BIT_TEST_(p_cbw->dir, 7) ? p_msc->edpt_in : p_msc->edpt_out;
uint32_t const lba = __be2n(p_readwrite->lba);
uint16_t const block_count = __be2n_16(p_readwrite->block_count);
diff --git a/tinyusb/class/msc/msc_device.h b/tinyusb/class/msc/msc_device.h
index 0fde78a47..1c8e3c8f9 100644
--- a/tinyusb/class/msc/msc_device.h
+++ b/tinyusb/class/msc/msc_device.h
@@ -124,7 +124,7 @@ msc_csw_status_t tud_msc_scsi_cb (uint8_t port, uint8_t lun, uint8_t scsi_cmd[16
void mscd_init(void);
tusb_error_t mscd_open(uint8_t port, tusb_descriptor_interface_t const * p_interface_desc, uint16_t *p_length);
tusb_error_t mscd_control_request_subtask(uint8_t port, tusb_control_request_t const * p_request);
-tusb_error_t mscd_xfer_cb(endpoint_handle_t edpt_hdl, tusb_event_t event, uint32_t xferred_bytes);
+tusb_error_t mscd_xfer_cb(edpt_hdl_t edpt_hdl, tusb_event_t event, uint32_t xferred_bytes);
void mscd_close(uint8_t port);
#endif