rename OSAL_TASK_DECLARE to OSAL_TASK_FUNCTION
removing TASK_ASSERT to avoid using goto/continue statement with rtos configure
This commit is contained in:
@@ -97,7 +97,7 @@ void keyboard_app_init(void)
|
||||
}
|
||||
|
||||
//------------- main task -------------//
|
||||
OSAL_TASK_DECLARE( keyboard_app_task )
|
||||
OSAL_TASK_FUNCTION( keyboard_app_task )
|
||||
{
|
||||
tusb_error_t error;
|
||||
tusb_keyboard_report_t kbd_report;
|
||||
@@ -106,12 +106,19 @@ OSAL_TASK_DECLARE( keyboard_app_task )
|
||||
|
||||
osal_queue_receive(q_kbd_report_hdl, &kbd_report, OSAL_TIMEOUT_WAIT_FOREVER, &error);
|
||||
|
||||
bool has_key = false;
|
||||
for(uint8_t i=0; i<6; i++)
|
||||
{
|
||||
if ( kbd_report.keycode[i] != 0 )
|
||||
{
|
||||
printf("%c", keycode_to_ascii(kbd_report.keycode[i]));
|
||||
has_key = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (has_key)
|
||||
printf("\n");
|
||||
|
||||
memclr_(&kbd_report, sizeof(tusb_keyboard_report_t) );
|
||||
|
||||
OSAL_TASK_LOOP_END
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
|
||||
void keyboard_app_init(void);
|
||||
OSAL_TASK_DECLARE( keyboard_app_task );
|
||||
OSAL_TASK_FUNCTION( keyboard_app_task );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ void mouse_app_init(void)
|
||||
}
|
||||
|
||||
//------------- main task -------------//
|
||||
OSAL_TASK_DECLARE( mouse_app_task )
|
||||
OSAL_TASK_FUNCTION( mouse_app_task )
|
||||
{
|
||||
tusb_error_t error;
|
||||
tusb_mouse_report_t mouse_report;
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
#endif
|
||||
|
||||
void mouse_app_init(void);
|
||||
OSAL_TASK_DECLARE( mouse_app_task );
|
||||
OSAL_TASK_FUNCTION( mouse_app_task );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user