Hello, i wanna use event in my project and its doesnt work
help me please
#include <xdc/std.h> #include <xdc/runtime/System.h> /* BIOS Header files */ #include <ti/sysbios/BIOS.h> #include <ti/sysbios/knl/Clock.h> #include <ti/sysbios/knl/Task.h> #include <ti/sysbios/knl/Event.h> #include <xdc/cfg/global.h> #include <xdc/runtime/Error.h> #include "Board.h" #define TASKSTACKSIZE 768 Task_Struct task0Struct; Char task0Stack[TASKSTACKSIZE]; Task_Handle firstTask; Event_Handle myEvent; Void firstFxn(UArg a0, UArg a1){ uint32_t i = 0; while(1){ i++; System_flush(); System_printf(" %d", i); if(i==5){ Event_post(myEvent, Event_Id_00); } Task_sleep(1000000 / Clock_tickPeriod); } } void secondFxn(void){ UInt evt; while(1){ evt = Event_pend(myEvent, Event_Id_NONE, Event_Id_00, BIOS_NO_WAIT); System_printf("Timeout expired for Event_pend()\n"); if (evt == 0) { System_flush(); System_printf(" 111111111"); break; } if (evt & Event_Id_00) { System_flush(); System_printf(" 22222222222"); } } } int main(void) { Error_Block eb; Error_init(&eb); myEvent = Event_create(NULL, &eb); Task_Params taskParams; Board_initGeneral(); Task_Params_init(&taskParams); taskParams.stackSize = TASKSTACKSIZE; taskParams.stack = &task0Stack; taskParams.priority = 1; taskParams.instance->name = "firstFxn"; Task_construct(&task0Struct, (Task_FuncPtr)firstFxn, &taskParams, NULL); firstTask = Task_handle(&task0Struct); BIOS_start(); return (0); }