banked.h

Go to the documentation of this file.
00001 /**
00002  * \file
00003  *
00004  *   SDCC bank switching macro define file
00005  *
00006  * \author
00007  * 
00008  *   Anthony "Asterisk" Ambuehl
00009  *
00010  *   SDCC (small device cross compiler) has built-in support for bank switching using predefined macros __banked.
00011  *   To avoid compilation issues on other compilers include this file which will replace __banked with the empty string on unsupported compilers.
00012  *
00013  *   In addition, the file can add the codeseg pragma to place code into specific banks, if specific macro is set.
00014  *   However the same result can be achieved by using the segment.rules file.
00015  *
00016  */
00017 
00018 #ifndef __BANKED_H
00019 #ifdef SDCC
00020 #ifndef HAVE_SDCC_BANKING
00021 #define __banked 
00022 #else
00023 #ifdef BANKED_IN_HOME
00024 #pragma codeseg HOME
00025 #endif
00026 #ifdef BANKED_IN_BANK1
00027 #pragma codeseg BANK1
00028 #endif
00029 #ifdef BANKED_IN_BANK2
00030 #pragma codeseg BANK2
00031 #endif
00032 #ifdef BANKED_IN_BANK3
00033 #pragma codeseg BANK3
00034 #endif
00035 #endif
00036 #else
00037 #define __banked
00038 #endif
00039 
00040 #endif /*__BANKED_H*/

Generated on Mon Apr 11 14:23:38 2011 for Contiki 2.5 by  doxygen 1.6.1