summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-02-01 12:46:17 +0700
committerhathach <[email protected]>2013-02-01 12:46:17 +0700
commit7fc3e4f8fed38cd41574976fbfa21f8be43b2eba (patch)
tree6963a8fd79d199117b71c1a928a8b43d4e6fd3e2
parentc24d461d19634f4b592697e698fa31c59a7128c3 (diff)
house keeping
-rw-r--r--tests/test/host/test_usbd_host.c6
-rw-r--r--tinyusb/host/usbd_host.c16
2 files changed, 11 insertions, 11 deletions
diff --git a/tests/test/host/test_usbd_host.c b/tests/test/host/test_usbd_host.c
index 654178dc5..c93eee44f 100644
--- a/tests/test/host/test_usbd_host.c
+++ b/tests/test/host/test_usbd_host.c
@@ -117,7 +117,7 @@ void test_usbh_status_get_succeed(void)
//--------------------------------------------------------------------+
// enum task
//--------------------------------------------------------------------+
-extern osal_queue_handle_t enumeration_queue_hdl;
+extern osal_queue_handle_t enum_queue_hdl;
usbh_enumerate_t enum_connect =
{
.core_id = 0,
@@ -128,7 +128,7 @@ usbh_enumerate_t enum_connect =
void queue_recv_stub (osal_queue_handle_t const queue_hdl, uint32_t *p_data, uint32_t msec, tusb_error_t *p_error, int num_call)
{
- TEST_ASSERT_EQUAL_PTR(enumeration_queue_hdl, queue_hdl);
+ TEST_ASSERT_EQUAL_PTR(enum_queue_hdl, queue_hdl);
memcpy(p_data, &enum_connect, 4);
(*p_error) = TUSB_ERROR_NONE;
}
@@ -138,7 +138,7 @@ void test_enum_task_connect(void)
osal_queue_receive_StubWithCallback(queue_recv_stub);
hcd_port_connect_status_ExpectAndReturn(enum_connect.core_id, true);
- usbh_enumerate_task();
+ usbh_enumeration_task();
}
void test_enum_task_disconnect(void)
diff --git a/tinyusb/host/usbd_host.c b/tinyusb/host/usbd_host.c
index 3c8c9ce83..3e8c05389 100644
--- a/tinyusb/host/usbd_host.c
+++ b/tinyusb/host/usbd_host.c
@@ -70,19 +70,19 @@ tusbh_device_status_t tusbh_device_status_get (tusb_handle_device_t const device
//--------------------------------------------------------------------+
// ENUMERATION TASK & ITS DATA
//--------------------------------------------------------------------+
-OSAL_TASK_DEF(enumeration_task, usbh_enumerate_task, 128, OSAL_PRIO_HIGH);
+OSAL_TASK_DEF(enum_task, usbh_enumeration_task, 128, OSAL_PRIO_HIGH);
#define ENUM_QUEUE_DEPTH 5
-OSAL_DEF_QUEUE(enumeration_queue, ENUM_QUEUE_DEPTH, uin32_t);
-osal_queue_handle_t enumeration_queue_hdl;
+OSAL_DEF_QUEUE(enum_queue, ENUM_QUEUE_DEPTH, uin32_t);
+osal_queue_handle_t enum_queue_hdl;
-void usbh_enumerate_task(void)
+void usbh_enumeration_task(void)
{
OSAL_TASK_LOOP
{
OSAL_TASK_LOOP_BEGIN
-
+// osal_queue_receive(enumeration_queue_hdl, )
OSAL_TASK_LOOP_END
}
@@ -102,9 +102,9 @@ tusb_error_t usbh_init(void)
ASSERT_STATUS( hcd_init(i) );
}
- ASSERT_STATUS( osal_task_create(&enumeration_task) );
- enumeration_queue_hdl = osal_queue_create(&enumeration_queue);
- ASSERT_PTR(enumeration_queue_hdl, TUSB_ERROR_OSAL_QUEUE_FAILED);
+ ASSERT_STATUS( osal_task_create(&enum_task) );
+ enum_queue_hdl = osal_queue_create(&enum_queue);
+ ASSERT_PTR(enum_queue_hdl, TUSB_ERROR_OSAL_QUEUE_FAILED);
return TUSB_ERROR_NONE;
}