From 2a543c0e79b882b054d87f89ee8cf8e83b44e22e Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 24 Jul 2019 23:07:30 +0700 Subject: update vendor device similar to cdc read/write maybe refactor later --- src/device/usbd.c | 2 +- src/device/usbd_pvt.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/device') diff --git a/src/device/usbd.c b/src/device/usbd.c index 4ce056e7f..c94d08a67 100644 --- a/src/device/usbd.c +++ b/src/device/usbd.c @@ -528,7 +528,7 @@ static bool process_set_config(uint8_t rhport, uint8_t cfg_num) _usbd_dev.itf2drv[desc_itf->bInterfaceNumber] = drv_id; uint16_t itf_len=0; - TU_ASSERT( usbd_class_drivers[drv_id].open( rhport, desc_itf, &itf_len ) ); + TU_ASSERT( usbd_class_drivers[drv_id].open(rhport, desc_itf, &itf_len) ); TU_ASSERT( itf_len >= sizeof(tusb_desc_interface_t) ); mark_interface_endpoint(_usbd_dev.ep2drv, p_desc, itf_len, drv_id); diff --git a/src/device/usbd_pvt.h b/src/device/usbd_pvt.h index 06f7a3afe..fbf030ce3 100644 --- a/src/device/usbd_pvt.h +++ b/src/device/usbd_pvt.h @@ -39,11 +39,13 @@ bool usbd_init (void); // USBD Endpoint API //--------------------------------------------------------------------+ +//bool usbd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc); + // Submit a usb transfer -bool usbd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes); +bool usbd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes); // Check if endpoint transferring is complete -bool usbd_edpt_busy (uint8_t rhport, uint8_t ep_addr); +bool usbd_edpt_busy(uint8_t rhport, uint8_t ep_addr); void usbd_edpt_stall(uint8_t rhport, uint8_t ep_addr); void usbd_edpt_clear_stall(uint8_t rhport, uint8_t ep_addr); -- cgit v1.3.1