Go to the source code of this file.
Defines | |
#define | EXTERN extern |
#define | PLLLOCK 0x08 |
#define | PLLSELOFF 0x7F |
#define | PLLSELON 0x80 |
#define | PLLOFF 0xBF |
#define | PLLON 0x40 |
#define | PLLDIVISOR 0x03 |
#define | PLLMULTIPLIER 0x09 |
#define | PRDIV8 0x40 |
Functions | |
EXTERN void | init (void) FPAGE_FE |
The main top level init. |
Definition in file init.h.
EXTERN void init | ( | void | ) |
The main top level init.
The main init function to be called from main.c before entering the main loop. This function is simply a delegator to the finer grained special purpose init functions.
Definition at line 66 of file init.c.
References ATOMIC_END, ATOMIC_START, initAllPagedRAM(), initConfiguration(), initECTTimer(), initFlash(), initInterrupts(), initIO(), initPITTimer(), initPLL(), initSCIStuff(), initVariables(), and initXgate().
Referenced by main().
00066 { 00067 ATOMIC_START(); /* Disable ALL interrupts while we configure the board ready for use */ 00068 initPLL(); /* Set up the PLL and use it */ 00069 initIO(); /* TODO make this config dependent. Set up all the pins and modules to be in low power harmless states */ 00070 initAllPagedRAM(); /* Copy table and config blocks of data from flash to the paged ram blocks for fast data lookup */ 00071 initVariables(); /* Initialise the rest of the running variables etc */ 00072 initFlash(); /* TODO, finalise this */ 00073 initECTTimer(); /* TODO move this to inside config in an organised way. Set up the timer module and its various aspects */ 00074 initPITTimer(); /* TODO ditto... */ 00075 initSCIStuff(); /* Setup the sci module(s) that we will use. */ 00076 initConfiguration(); /* TODO Set user/feature/config up here! */ 00077 initXgate(); 00078 initInterrupts(); /* still last, reset timers, enable interrupts here TODO move this to inside config in an organised way. Set up the rest of the individual interrupts */ 00079 ATOMIC_END(); /* Re-enable any configured interrupts */ 00080 }