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 /demos/host/src | |
| parent | d86523b16ce4e2512661477b85f8a7447ab91efa (diff) | |
use hcd_pipe_is_busy instead of hcd_pipe_is_idle
remove hcd_pipe_is_idle
Diffstat (limited to 'demos/host/src')
| -rw-r--r-- | demos/host/src/cdc_serial_app.c | 8 | ||||
| -rw-r--r-- | demos/host/src/tusb_config.h | 4 |
2 files changed, 4 insertions, 8 deletions
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<received_bytes; i++)
- {
- printf("%c", serial_in_buffer[i]);
- }
+ for(uint8_t i=0; i<received_bytes; i++) printf("%c", serial_in_buffer[i]);
for(uint8_t dev_addr=1; dev_addr <= TUSB_CFG_HOST_DEVICE_MAX; dev_addr++)
{
diff --git a/demos/host/src/tusb_config.h b/demos/host/src/tusb_config.h index a90dde4d2..ef01e87c0 100644 --- a/demos/host/src/tusb_config.h +++ b/demos/host/src/tusb_config.h @@ -71,8 +71,8 @@ #define TUSB_CFG_HOST_HID_KEYBOARD 0
#define TUSB_CFG_HOST_HID_MOUSE 0
#define TUSB_CFG_HOST_HID_GENERIC 0
-#define TUSB_CFG_HOST_MSC 1
-#define TUSB_CFG_HOST_CDC 0
+#define TUSB_CFG_HOST_MSC 0
+#define TUSB_CFG_HOST_CDC 1
#define TUSB_CFG_HOST_CDC_RNDIS 0
//--------------------------------------------------------------------+
|
