From bc46dc6edf3ff4bb72fb36e74b8a7d3da447d2d4 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 13 Dec 2018 13:49:09 +0700 Subject: osal clean up remove OSAL_TASK_DEF, osal_task_create. Applicaton should create a task and call tinyusb_task(). This make API consistent with NO OS. --- src/host/usbh.c | 44 ++++++++++---------------------------------- 1 file changed, 10 insertions(+), 34 deletions(-) (limited to 'src/host') diff --git a/src/host/usbh.c b/src/host/usbh.c index 39de4f7e7..7bcf7aaaf 100644 --- a/src/host/usbh.c +++ b/src/host/usbh.c @@ -46,15 +46,6 @@ #define CFG_TUH_TASK_QUEUE_SZ 16 #endif -#ifndef CFG_TUH_TASK_STACK_SZ -#define CFG_TUH_TASK_STACK_SZ 200 -#endif - -#ifndef CFG_TUH_TASK_PRIO -#define CFG_TUH_TASK_PRIO 0 -#endif - - //--------------------------------------------------------------------+ // INCLUDE //--------------------------------------------------------------------+ @@ -123,9 +114,9 @@ enum { USBH_CLASS_DRIVER_COUNT = TU_ARRAY_SZIE(usbh_class_drivers) }; //--------------------------------------------------------------------+ // INTERNAL OBJECT & FUNCTION DECLARATION //--------------------------------------------------------------------+ -CFG_TUSB_MEM_SECTION usbh_device_t _usbh_devices[CFG_TUSB_HOST_DEVICE_MAX+1]; // including zero-address -OSAL_TASK_DEF(_usbh_task_def, "usbh", usbh_task, CFG_TUH_TASK_PRIO, CFG_TUH_TASK_STACK_SZ); +// including zero-address +CFG_TUSB_MEM_SECTION usbh_device_t _usbh_devices[CFG_TUSB_HOST_DEVICE_MAX+1]; // Event queue // role device/host is used by OS NONE for mutex (disable usb isr) only @@ -161,8 +152,6 @@ bool usbh_init(void) _usbh_q = osal_queue_create( &_usbh_qdef ); TU_ASSERT(_usbh_q != NULL); - osal_task_create(&_usbh_task_def); - //------------- Semaphore, Mutex for Control Pipe -------------// for(uint8_t i=0; i