We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
hi there, i just started learning rtos tiny. This is my first program and it goes like this
#include "rtx51tny.h" #include "reg51f.h" #define LED P1 #define OFF 0XFF #define ON 0X00 void job0 (void) _task_ 0 { unsigned int counter = 0; LED = OFF; os_create_task(1); while(1) { counter++; if(counter == 0) os_send_signal (1); os_wait (K_TMO,50,0); } } void job1 (void) _task_ 1 { while(1) { os_wait1 (K_SIG); if(LED == OFF) LED = ON; else LED = OFF; } }