Beispiel #1
0
/* The following task is used to initialize the operating system data structures
 * and to create the task.   The task deletes itself as it is not
 * needed after initialization is complete.  The convention of creating a task
 * that is used to initialize the reset of the application is used by Labrosse.
 * The main purpose for doing this is to ensure that stack checking will
 * initialize correctly if enabled. See MicroC/OS-II The Real-Time Kernal text
 * book for details.
 */
void  initialize_task(void* pdata)
{
  INT8U return_code = OS_NO_ERR;

  /*create os data structures */
  initOSDataStructs();

  /* create the tasks */
  initCreateTasks();

  /*This task is deleted because there is no need for it to run again */
  return_code = OSTaskDel(OS_PRIO_SELF);
  alt_ucosii_check_return_code(return_code);
  while (1);
}
Beispiel #2
0
int main(int argc, char* argv[], char* envp[])
{
	printf("Started\n");
	initOSDataStructs();
	printf("Init structs\n");
	initInterrupts();
	printf("Init interrupts\n");
	initVGA();
	printf("Init vga\n");
	initCreateTasks();
	printf("Init tasks\n");
	vTaskStartScheduler();
	printf("Init scheduler\n");
	for (;;);
	return 0;
}