summaryrefslogtreecommitdiff
path: root/tinyusb/host/usbd_host.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-01-29 11:06:30 +0700
committerhathach <[email protected]>2013-01-29 11:06:30 +0700
commit6db8af20236cfecba5aef54da148309982b28396 (patch)
tree7ab84b2947702c8860d799b1e4234d6af37e8609 /tinyusb/host/usbd_host.c
parent06f923c7bb95e146ee545194eba1c9357c4baf45 (diff)
update usbh_init and test
Diffstat (limited to 'tinyusb/host/usbd_host.c')
-rw-r--r--tinyusb/host/usbd_host.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tinyusb/host/usbd_host.c b/tinyusb/host/usbd_host.c
index adf741548..134bdc038 100644
--- a/tinyusb/host/usbd_host.c
+++ b/tinyusb/host/usbd_host.c
@@ -46,6 +46,7 @@
//--------------------------------------------------------------------+
#include "common/common.h"
#include "usbd_host.h"
+#include "osal/osal.h"
//--------------------------------------------------------------------+
// MACRO CONSTANT TYPEDEF
@@ -57,6 +58,10 @@
//--------------------------------------------------------------------+
STATIC_ usbh_device_info_t device_info_pool[TUSB_CFG_HOST_DEVICE_MAX];
+#define ENUM_DEPTH 2
+STATIC_ osal_queue_t queue_enumerate;
+STATIC_ uint8_t queue_enumerate_buffer[ENUM_DEPTH*sizeof(usbh_enumerate_t)];
+
//--------------------------------------------------------------------+
// PUBLIC API (Parameter Verification is required)
//--------------------------------------------------------------------+
@@ -69,21 +74,16 @@ tusbh_device_status_t tusbh_device_status_get (tusb_handle_device_t const device
//--------------------------------------------------------------------+
// CLASS-USBD API (don't require to verify parameters)
//--------------------------------------------------------------------+
-void usbh_init(void)
+tusb_error_t usbh_init(void)
{
memset(device_info_pool, 0, sizeof(usbh_device_info_t)*TUSB_CFG_HOST_DEVICE_MAX);
+// ASSERT_STATUS(osal_queue_create());
+ return TUSB_ERROR_NONE;
}
-#if 0
-tusb_error_t tusbh_keyboard_open(tusb_handle_device_t device_hdl, uint8_t configure_num, tusb_handle_keyboard_t *keyboard_hdl)
+void usbh_enumerate_task(void)
{
- ASSERT(device_hdl < TUSB_CFG_HOST_DEVICE_MAX, TUSB_ERROR_INVALID_PARA);
- ASSERT_INT_WITHIN(1, TUSB_CFG_CONFIGURATION_MAX, configure_num, TUSB_ERROR_INVALID_PARA);
- ASSERT_PTR(keyboard_hdl, TUSB_ERROR_INVALID_PARA);
- return TUSB_ERROR_NONE;
}
-#endif
-
#endif