// sysInit.c

#include <912d60.h>
#include <stdio.h>
#include "kernel.h"




// TASK PROTOTYPES
void shell(void);
void sysTime(void);
void task1(void);
void task2(void);






void 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("task1", &task1, 18, IDLE, 0) < 0)
	 	puts("task1 failure");
	 
	 
	 // create task2	
	 if (create_task("timer", &task2, 0, STOPPED, 255) < 0)
	 	puts("task2 failure");
		
		
	 
	 // stop this sysInit task
	 set_task_state(get_task_id(), STOPPED);

}

