clean up osal semaphore/queue/mutex

This commit is contained in:
hathach
2018-03-01 11:17:11 +07:00
parent 30124b9b02
commit a789fad4b7
24 changed files with 225 additions and 249 deletions

View File

@@ -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