From 533c8d2eed68fe76242fa5dcd2b1733d6278a4e8 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 20 Feb 2014 10:41:31 +0700 Subject: use hcd_pipe_is_busy instead of hcd_pipe_is_idle remove hcd_pipe_is_idle --- demos/host/src/cdc_serial_app.c | 8 ++------ demos/host/src/tusb_config.h | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'demos/host/src') diff --git a/demos/host/src/cdc_serial_app.c b/demos/host/src/cdc_serial_app.c index b86c4869a..2fe9b871d 100644 --- a/demos/host/src/cdc_serial_app.c +++ b/demos/host/src/cdc_serial_app.c @@ -123,7 +123,6 @@ void cdc_serial_app_init(void) //------------- main task -------------// OSAL_TASK_FUNCTION( cdc_serial_app_task ) (void* p_task_para) { - // This task can be separated into 2 Task : sending & receiving. OSAL_TASK_LOOP_BEGIN //------------- send characters got from uart terminal to the first CDC device -------------// @@ -147,14 +146,11 @@ OSAL_TASK_FUNCTION( cdc_serial_app_task ) (void* p_task_para) //------------- print out received characters -------------// tusb_error_t error; - osal_semaphore_wait(sem_hdl, 100, &error); // timeout to allow getchar from uart terminal can be executed + osal_semaphore_wait(sem_hdl, 100, &error); // waiting for incoming data if ( TUSB_ERROR_NONE == error) { - for(uint8_t i=0; i