static assert to check OSAL_QUEUE_DEF's queue_depth parameter < 256

enable HOST_HCD_XFER_INTERRUPT by default (previously only enabled with HID), as it is widely used
implement tusbh_cdc_is_busy
add compilation switch in usbh enumeration for hub
rewrite CDC serial application to address usb-serial race condition
This commit is contained in:
hathach
2013-10-27 19:34:36 +07:00
parent 0d9e1163df
commit 318a058d3c
11 changed files with 7286 additions and 8352 deletions
+3 -3
View File
@@ -170,7 +170,7 @@ void test_task_with_semaphore(void)
TEST_ASSERT_EQUAL(1, statements[3]);
// timeout
for(uint32_t i=0; i<(OSAL_TIMEOUT_NORMAL*TUSB_CFG_OS_TICKS_PER_SECOND)/1000 ; i++) // not enough time
for(uint32_t i=0; i<(OSAL_TIMEOUT_NORMAL*TUSB_CFG_OS_TICKS_PER_SECOND)/1000 - 1 ; i++) // not enough time
osal_tick_tock();
sample_task_semaphore();
TEST_ASSERT_EQUAL(0, statements[4]);
@@ -241,7 +241,7 @@ void test_task_with_mutex(void)
TEST_ASSERT_EQUAL(0, statements[5]);
// timeout
for(uint32_t i=0; i<(OSAL_TIMEOUT_NORMAL*TUSB_CFG_OS_TICKS_PER_SECOND)/1000 ; i++){ // one tick less
for(uint32_t i=0; i<(OSAL_TIMEOUT_NORMAL*TUSB_CFG_OS_TICKS_PER_SECOND)/1000 - 1 ; i++){ // one tick less
osal_tick_tock();
}
mutex_sample_task2();
@@ -311,7 +311,7 @@ void test_task_with_queue(void)
TEST_ASSERT_EQUAL(1, statements[3]);
// timeout
for(uint32_t i=0; i<(OSAL_TIMEOUT_NORMAL*TUSB_CFG_OS_TICKS_PER_SECOND)/1000 ; i++) // not enough time
for(uint32_t i=0; i<(OSAL_TIMEOUT_NORMAL*TUSB_CFG_OS_TICKS_PER_SECOND)/1000 - 1 ; i++) // not enough time
osal_tick_tock();
sample_task_with_queue();
TEST_ASSERT_EQUAL(0, statements[4]);