summaryrefslogtreecommitdiff
path: root/tinyusb/class/custom_class_host.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-03-23 12:32:40 +0700
committerhathach <[email protected]>2018-03-23 12:32:40 +0700
commit5f26c57b286ecdc555856c1e3e486923a43f4d04 (patch)
tree0cb8d52def0cab79f76d6a0911ac4e0f874edc18 /tinyusb/class/custom_class_host.c
parent2c18805aa9b3b46777e0fcfb8d97efba209f9115 (diff)
shorten descriptor type
Diffstat (limited to 'tinyusb/class/custom_class_host.c')
-rw-r--r--tinyusb/class/custom_class_host.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tinyusb/class/custom_class_host.c b/tinyusb/class/custom_class_host.c
index 38d240541..2642a9ec8 100644
--- a/tinyusb/class/custom_class_host.c
+++ b/tinyusb/class/custom_class_host.c
@@ -107,7 +107,7 @@ void cush_init(void)
memclr_(&custom_interface, sizeof(custom_interface_info_t) * TUSB_CFG_HOST_DEVICE_MAX);
}
-tusb_error_t cush_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t const *p_interface_desc, uint16_t *p_length)
+tusb_error_t cush_open_subtask(uint8_t dev_addr, tusb_desc_interface_t const *p_interface_desc, uint16_t *p_length)
{
// FIXME quick hack to test lpc1k custom class with 2 bulk endpoints
uint8_t const *p_desc = (uint8_t const *) p_interface_desc;
@@ -116,7 +116,7 @@ tusb_error_t cush_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t con
//------------- Bulk Endpoints Descriptor -------------//
for(uint32_t i=0; i<2; i++)
{
- tusb_descriptor_endpoint_t const *p_endpoint = (tusb_descriptor_endpoint_t const *) p_desc;
+ tusb_desc_endpoint_t const *p_endpoint = (tusb_desc_endpoint_t const *) p_desc;
ASSERT_INT(TUSB_DESC_ENDPOINT, p_endpoint->bDescriptorType, TUSB_ERROR_INVALID_PARA);
pipe_handle_t * p_pipe_hdl = ( p_endpoint->bEndpointAddress & TUSB_DIR_IN_MASK ) ?
@@ -127,7 +127,7 @@ tusb_error_t cush_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t con
p_desc = descriptor_next(p_desc);
}
- (*p_length) = sizeof(tusb_descriptor_interface_t) + 2*sizeof(tusb_descriptor_endpoint_t);
+ (*p_length) = sizeof(tusb_desc_interface_t) + 2*sizeof(tusb_desc_endpoint_t);
return TUSB_ERROR_NONE;
}