Main C code file. More...
Files | |
file | main.c |
Program main file. | |
Macros | |
#define | MAIN_TASK_SCH_SPI main_taskSchedule[0] |
#define | MAIN_TASK_SCH_CCAI main_taskSchedule[1] |
#define | MAIN_TASK_SCH_NWK main_taskSchedule[2] |
#define | MAIN_TASK_SCH_ADC main_taskSchedule[3] |
#define | MAIN_TASK_SCH_UART main_taskSchedule[4] |
#define | MAIN_TASK_SCH_LED main_taskSchedule[5] |
#define | MAIN_TASK_SCH_BUT main_taskSchedule[6] |
#define | MAIN_TASK_SCH_REP main_taskSchedule[7] |
#define | MAIN_TASK_SCH_WDT main_taskSchedule[8] |
#define | MAIN_TASK_COUNT 9 |
#define | MAIN_FLAG_WDT_BIT 1 |
Functions | |
void | main () |
Main function of the program. More... | |
UInt8 | TMRB0_ISR () |
Tiner B0 ISR. More... | |
Variables | |
UInt16 | main_taskSchedule [MAIN_TASK_COUNT] |
Task schedule for each task. | |
Main C code file.
#define MAIN_FLAG_WDT_BIT 1 |
#define MAIN_TASK_COUNT 9 |
void main | ( | ) |
Main function of the program.
The main function calls the initializations of each code unit and controls schedules for each task. After checking for scheduled tasks the micro controller is put on low power mode (LPM), after exiting LPM, there is a new check for scheduled tasks. The LPM exits each 1ms interval, but this may be delayed if the tasks combined takes more than 1ms. The delay is in units of ms. No schedules are lost, only delayed. The accuracy of the check period depends upon the oscillator.
Definition at line 142 of file main.c.
References adc_init(), adc_proccess(), but_init(), but_proccess(), ccai_init(), ccai_proccess(), clock_init(), led_init(), led_proccess(), MAIN_FLAG_WDT_BIT, MAIN_TASK_COUNT, main_taskSchedule, nwk_init(), nwk_process(), rep_hello(), rep_init(), rep_proccess(), spi_init(), spi_proccess(), uart_endFrame(), uart_init(), uart_proccess(), uart_snd(), and uart_startFrame().
UInt8 TMRB0_ISR | ( | ) |
Tiner B0 ISR.
Timer B Interrupt Service Request.
Definition at line 255 of file main.c.
References clock_tick().