initial versioin

This commit is contained in:
Wang Chen
2021-03-31 14:32:02 +08:00
committed by unicornx
parent 8ad78e0e0a
commit ad15280f3a
277 changed files with 15119 additions and 1 deletions

View File

@@ -0,0 +1,31 @@
#include "os.h"
#define DELAY 1000
void user_task0(void)
{
uart_puts("Task 0: Created!\n");
while (1) {
uart_puts("Task 0: Running...\n");
task_delay(DELAY);
task_yield();
}
}
void user_task1(void)
{
uart_puts("Task 1: Created!\n");
while (1) {
uart_puts("Task 1: Running...\n");
task_delay(DELAY);
task_yield();
}
}
/* NOTICE: DON'T LOOP INFINITELY IN main() */
void os_main(void)
{
task_create(user_task0);
task_create(user_task1);
}