From 07f36e8a6100549073657e3276dbe9ccf1bd9614 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 21 Jun 2013 14:52:18 +0700 Subject: [PATCH] fix a stupid bug --- tinyusb/class/custom_class_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinyusb/class/custom_class_host.c b/tinyusb/class/custom_class_host.c index 568c20f3..87e910bb 100644 --- a/tinyusb/class/custom_class_host.c +++ b/tinyusb/class/custom_class_host.c @@ -68,7 +68,7 @@ tusb_error_t tusbh_custom_read(uint8_t dev_addr, uint16_t vendor_id, uint16_t pr } ASSERT( p_buffer != NULL && length != 0, TUSB_ERROR_INVALID_PARA); - if ( hcd_pipe_is_idle(custom_interface[dev_addr-1].pipe_in) ) + if ( !hcd_pipe_is_idle(custom_interface[dev_addr-1].pipe_in) ) { return TUSB_ERROR_INTERFACE_IS_BUSY; }