clean up osal semaphore/queue/mutex
This commit is contained in:
@@ -52,10 +52,7 @@
|
||||
//--------------------------------------------------------------------+
|
||||
// INTERNAL OBJECT & FUNCTION DECLARATION
|
||||
//--------------------------------------------------------------------+
|
||||
OSAL_TASK_DEF(mouse_host_app_task, 128, MOUSE_APP_TASK_PRIO);
|
||||
OSAL_QUEUE_DEF(queue_mouse_def, QUEUE_MOUSE_REPORT_DEPTH, hid_mouse_report_t);
|
||||
|
||||
static osal_queue_handle_t queue_mouse_hdl;
|
||||
static osal_queue_t queue_mouse_hdl;
|
||||
TUSB_CFG_ATTR_USBRAM static hid_mouse_report_t usb_mouse_report;
|
||||
|
||||
static inline void process_mouse_report(hid_mouse_report_t const * p_report);
|
||||
@@ -106,17 +103,16 @@ void mouse_host_app_init(void)
|
||||
{
|
||||
memclr_(&usb_mouse_report, sizeof(hid_mouse_report_t));
|
||||
|
||||
queue_mouse_hdl = osal_queue_create( OSAL_QUEUE_REF(queue_mouse_def) );
|
||||
queue_mouse_hdl = osal_queue_create( QUEUE_MOUSE_REPORT_DEPTH, sizeof(hid_mouse_report_t) );
|
||||
ASSERT_PTR( queue_mouse_hdl, VOID_RETURN);
|
||||
|
||||
ASSERT( TUSB_ERROR_NONE == osal_task_create( OSAL_TASK_REF(mouse_host_app_task) ),
|
||||
VOID_RETURN );
|
||||
VERIFY( osal_task_create(mouse_host_app_task, "mouse", 128, NULL, MOUSE_APP_TASK_PRIO, NULL), );
|
||||
}
|
||||
|
||||
//------------- main task -------------//
|
||||
OSAL_TASK_FUNCTION( mouse_host_app_task, p_task_para)
|
||||
void mouse_host_app_task(void* param)
|
||||
{
|
||||
(void) p_task_para;
|
||||
(void) param;
|
||||
|
||||
OSAL_TASK_LOOP_BEGIN
|
||||
|
||||
|
||||
Reference in New Issue
Block a user