00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065 #include "config.h"
00066 #include "modules/scheduler/scheduler.h"
00067 #include "lib_mcu/wdt/wdt_drv.h"
00068 #include "lib_mcu/power/power_drv.h"
00069
00070
00071
00072
00073
00074 void main(void)
00075 {
00076 #ifndef AVRGCC
00077 Wdt_off();
00078 #else
00079 wdt_reset();
00080 Wdt_clear_flag();
00081 Wdt_change_enable();
00082 Wdt_stop();
00083 #endif
00084 Clear_prescaler();
00085 scheduler();
00086 }
00087
00088 #ifdef __cplusplus
00089 extern "C" {
00090 #endif
00091 char __low_level_init()
00092 {
00093 Clear_prescaler();
00094 return 1;
00095 }
00096 #ifdef __cplusplus
00097 }
00098 #endif