Contiki 2.5
banked.h
Go to the documentation of this file.
1 /**
2  * \file
3  *
4  * SDCC bank switching macro define file
5  *
6  * \author
7  *
8  * Anthony "Asterisk" Ambuehl
9  *
10  * SDCC (small device cross compiler) has built-in support for bank switching using predefined macros __banked.
11  * To avoid compilation issues on other compilers include this file which will replace __banked with the empty string on unsupported compilers.
12  *
13  * In addition, the file can add the codeseg pragma to place code into specific banks, if specific macro is set.
14  * However the same result can be achieved by using the segment.rules file.
15  *
16  */
17 
18 #ifndef __BANKED_H
19 #ifdef SDCC
20 #ifndef HAVE_SDCC_BANKING
21 #define __banked
22 #else
23 #ifdef BANKED_IN_HOME
24 #pragma codeseg HOME
25 #endif
26 #ifdef BANKED_IN_BANK1
27 #pragma codeseg BANK1
28 #endif
29 #ifdef BANKED_IN_BANK2
30 #pragma codeseg BANK2
31 #endif
32 #ifdef BANKED_IN_BANK3
33 #pragma codeseg BANK3
34 #endif
35 #endif
36 #else
37 #define __banked
38 #endif
39 
40 #endif /*__BANKED_H*/