/* main.c - C main() module */ /* * RTXC Quadros Version 1.0 * Copyright (c) 1999-2003 * Quadros Systems, Inc. * ALL RIGHTS RESERVED * * THE INFORMATION HEREIN IS CONFIDENTIAL AND PROPRIETARY. * UNAUTHORIZED DISCLOSURE OR DISTRIBUTION IS PROHIBITED. */ #include "rtxcapi.h" #include "rtxcuapi.h" #include "sysinit.h" #include "rtxcuart.h" #include "enable.h" #include "example.h" extern KSRC rtxcinit(void); volatile int brkflag = 0; /* C main() module */ int main(void) { DISABLE; /* forces HW to known state */ mcf5282_init(); /* initialize RTXC */ if (rtxcinit() != RC_GOOD) for(;;) #ifdef __GNUC__ /* { */ asm("nop"); #else asm(NOP); /* spin here - resolve error */ #endif /* } __GNUC__ */ /* set system IRQ at level 7 */ UKS_SetSysIRQ(7); /* Initialize Timer */ mcf5282_pit_init(); #if defined(HAS_UART0) || defined(HAS_UART1) || defined(HAS_UART2) /* { */ /* Initialize Uart */ mcf5282_uart_init(); #endif /* } HAS_UART0 || HAS_UART1 || HAS_UART2 */ /* set system IRQ to level 0 before starting */ UKS_SetSysIRQ(0); /* Initialize Example Application */ example_init(); /* loop forever */ for(;;) { /* Execute example application's Null Task routine. */ example_null_run(); if (brkflag) break; /* exit infinite loop - abort RTXC */ //STOP; } /* ** user supplied shutdown code should be inserted here ** typically, the null task never stops, but it may ** be aborted in some circumstances where it is desirable ** to stop multi-tasking. */ return(1); } /* end of file - main.c */