diff options
| author | hathach <[email protected]> | 2014-02-20 10:41:31 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2014-02-20 10:41:31 +0700 |
| commit | 533c8d2eed68fe76242fa5dcd2b1733d6278a4e8 (patch) | |
| tree | 1e7340ffc17d5716cdf58abe7ebf567487a3e221 /tinyusb/class | |
| parent | d86523b16ce4e2512661477b85f8a7447ab91efa (diff) | |
use hcd_pipe_is_busy instead of hcd_pipe_is_idle
remove hcd_pipe_is_idle
Diffstat (limited to 'tinyusb/class')
| -rw-r--r-- | tinyusb/class/cdc_host.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/tinyusb/class/cdc_host.c b/tinyusb/class/cdc_host.c index a71982ca7..0d2b1dcc3 100644 --- a/tinyusb/class/cdc_host.c +++ b/tinyusb/class/cdc_host.c @@ -126,10 +126,7 @@ tusb_error_t tusbh_cdc_send(uint8_t dev_addr, void const * p_data, uint32_t leng ASSERT( p_data != NULL && length, TUSB_ERROR_INVALID_PARA); pipe_handle_t pipe_out = cdch_data[dev_addr-1].pipe_out; - if ( !hcd_pipe_is_idle(pipe_out) ) - { - return TUSB_ERROR_INTERFACE_IS_BUSY; - } + if ( hcd_pipe_is_busy(pipe_out) ) return TUSB_ERROR_INTERFACE_IS_BUSY; return hcd_pipe_xfer( pipe_out, (void *) p_data, length, is_notify); } @@ -140,10 +137,7 @@ tusb_error_t tusbh_cdc_receive(uint8_t dev_addr, void * p_buffer, uint32_t lengt ASSERT( p_buffer != NULL && length, TUSB_ERROR_INVALID_PARA); pipe_handle_t pipe_in = cdch_data[dev_addr-1].pipe_in; - if ( !hcd_pipe_is_idle(pipe_in) ) - { - return TUSB_ERROR_INTERFACE_IS_BUSY; - } + if ( hcd_pipe_is_busy(pipe_in) ) return TUSB_ERROR_INTERFACE_IS_BUSY; return hcd_pipe_xfer( pipe_in, p_buffer, length, is_notify); } |
