// sysInit.c #include <912d60.h> #include #include "kernel.h" // TASK PROTOTYPES int task1(void); int task2(void); int sysInit(void) { // LOCAL VARIABLES int id; /* must create all the tasks without interrupt, because this task will die when it finishes. */ //INTR_OFF(); // set up the serial port //setbaud(BAUD38K); // actually running at 19K baud due to xtal speed // any additional user setup goes here //---------------------------------------- //| | //---------------------------------------- // create task1 if (create_task("dummy", &task1, 18, IDLE, 0) < 0) puts("task1 failure"); // create task2 if (create_task("timer", &task2, 0, STOPPED, 255) < 0) puts("task2 failure"); // create the COM2 sem if (create_sem(COM2, "COM2") < 0) puts("COM1 failure"); return 0; }