hw_boot.h
Go to the documentation of this file.00001
00043 #ifndef HW_BOOT_H
00044 #define HW_BOOT_H
00045
00046 #include <avr/io.h>
00047 #include <cfg/compiler.h>
00048
00049
00050 void (*rom_start)(void) NORETURN = 0x0000;
00051
00052 #define START_APP() rom_start()
00053
00054 #define BOOT_INIT do \
00055 { \
00056 \
00057 MCUCR = BV(IVCE); \
00058 \
00059 MCUCR = BV(IVSEL); \
00060 } while(0)
00061
00062 #define BOOT_END do \
00063 { \
00064 \
00065 MCUCR = BV(IVCE); \
00066 \
00067 MCUCR = 0; \
00068 } while(0)
00069
00070 #endif // HW_BOOT_H
00071