From 8eaad2326b26f542ba66ea305a40dd4c8e49f421 Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 11 Mar 2013 12:00:25 +0700 Subject: [PATCH] add semphore reset & queue flush API modify test to check control pipe semaphore created with usbh_init --- tests/test/host/test_usbh.c | 24 +++++++++++++++++++++++- tinyusb/host/ehci/ehci.c | 2 -- tinyusb/host/usbh.c | 19 ++++++++++++++++++- tinyusb/host/usbh_hcd.h | 10 +--------- tinyusb/osal/osal.h | 3 +++ tinyusb/osal/osal_none.h | 13 +++++++++++++ 6 files changed, 58 insertions(+), 13 deletions(-) diff --git a/tests/test/host/test_usbh.c b/tests/test/host/test_usbh.c index e8b38eda6..315fdee58 100644 --- a/tests/test/host/test_usbh.c +++ b/tests/test/host/test_usbh.c @@ -87,6 +87,12 @@ void test_usbh_init_hcd_failed(void) void test_usbh_init_enum_task_create_failed(void) { hcd_init_ExpectAndReturn(TUSB_ERROR_NONE); + for (uint8_t i=0; icount = queue_hdl->rd_idx = queue_hdl->wr_idx = 0; +} + #define osal_queue_receive(queue_hdl, p_data, msec, p_error) \ do {\ timeout = osal_tick_get();\