![]() |
PDL for FM0+
Version1.0
Peripheral Driverl Library for FM0+
|
00001 /******************************************************************************* 00002 * Copyright (C) 2013 Spansion LLC. All Rights Reserved. 00003 * 00004 * This software is owned and published by: 00005 * Spansion LLC, 915 DeGuigne Dr. Sunnyvale, CA 94088-3453 ("Spansion"). 00006 * 00007 * BY DOWNLOADING, INSTALLING OR USING THIS SOFTWARE, YOU AGREE TO BE BOUND 00008 * BY ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT. 00009 * 00010 * This software contains source code for use with Spansion 00011 * components. This software is licensed by Spansion to be adapted only 00012 * for use in systems utilizing Spansion components. Spansion shall not be 00013 * responsible for misuse or illegal use of this software for devices not 00014 * supported herein. Spansion is providing this software "AS IS" and will 00015 * not be responsible for issues arising from incorrect user implementation 00016 * of the software. 00017 * 00018 * SPANSION MAKES NO WARRANTY, EXPRESS OR IMPLIED, ARISING BY LAW OR OTHERWISE, 00019 * REGARDING THE SOFTWARE (INCLUDING ANY ACOOMPANYING WRITTEN MATERIALS), 00020 * ITS PERFORMANCE OR SUITABILITY FOR YOUR INTENDED USE, INCLUDING, 00021 * WITHOUT LIMITATION, THE IMPLIED WARRANTY OF MERCHANTABILITY, THE IMPLIED 00022 * WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE OR USE, AND THE IMPLIED 00023 * WARRANTY OF NONINFRINGEMENT. 00024 * SPANSION SHALL HAVE NO LIABILITY (WHETHER IN CONTRACT, WARRANTY, TORT, 00025 * NEGLIGENCE OR OTHERWISE) FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT 00026 * LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, 00027 * LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) ARISING FROM USE OR 00028 * INABILITY TO USE THE SOFTWARE, INCLUDING, WITHOUT LIMITATION, ANY DIRECT, 00029 * INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOSS OF DATA, 00030 * SAVINGS OR PROFITS, 00031 * EVEN IF SPANSION HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 00032 * YOU ASSUME ALL RESPONSIBILITIES FOR SELECTION OF THE SOFTWARE TO ACHIEVE YOUR 00033 * INTENDED RESULTS, AND FOR THE INSTALLATION OF, USE OF, AND RESULTS OBTAINED 00034 * FROM, THE SOFTWARE. 00035 * 00036 * This software may be replicated in part or whole for the licensed use, 00037 * with the restriction that this Disclaimer and Copyright notice must be 00038 * included with each copy of this software, whether used in part or whole, 00039 * at all times. 00040 */ 00041 /******************************************************************************/ 00050 #ifndef __INTERRUPTS_H__ 00051 #define __INTERRUPTS_H__ 00052 00053 /******************************************************************************/ 00054 /* Include files */ 00055 /******************************************************************************/ 00056 #include "pdl_user.h" 00057 00058 /* C binding of definitions if building with C++ compiler */ 00059 #ifdef __cplusplus 00060 extern "C" 00061 { 00062 #endif 00063 00078 00079 /*****************************************************************************/ 00080 /* Check whether interrupt is enable when peripheral is inactive */ 00081 /*****************************************************************************/ 00082 // Include adc.h if ADC is active and ADC interrupt is enabled. 00083 #if (PDL_INTERRUPT_ENABLE_ADC0) || (PDL_INTERRUPT_ENABLE_ADC1) || (PDL_INTERRUPT_ENABLE_ADC2) 00084 #if defined(PDL_PERIPHERAL_ADC_ACTIVE) 00085 #include "adc\adc.h" 00086 #else 00087 #error Don't enable ADC interrupt when it is inactive! 00088 #endif 00089 #endif 00090 00091 // Include adc.h if BT is active and BT interrupt is enabled. 00092 #if (PDL_INTERRUPT_ENABLE_BT0) || (PDL_INTERRUPT_ENABLE_BT1) || \ 00093 (PDL_INTERRUPT_ENABLE_BT2) || (PDL_INTERRUPT_ENABLE_BT3) || \ 00094 (PDL_INTERRUPT_ENABLE_BT4) || (PDL_INTERRUPT_ENABLE_BT5) || \ 00095 (PDL_INTERRUPT_ENABLE_BT6) || (PDL_INTERRUPT_ENABLE_BT7) 00096 #if defined(PDL_PERIPHERAL_BT_ACTIVE) 00097 #include "bt\bt.h" 00098 #else 00099 #error Don't enable BT interrupt when it is inactive! 00100 #endif 00101 #endif 00102 00103 // Include clk.h if clock is active and clock interrupt is enabled. 00104 #if (PDL_INTERRUPT_ENABLE_CLK == PDL_ON) 00105 #if defined(PDL_PERIPHERAL_CLK_ACTIVE) 00106 #include "clk\clk.h" 00107 #else 00108 #error Don't enable clock interrupt when it is inactive! 00109 #endif 00110 #endif 00111 00112 // Include csv.h if clock is active and clock interrupt is enabled. 00113 #if (PDL_INTERRUPT_ENABLE_CSV == PDL_ON) 00114 #if defined(PDL_PERIPHERAL_CSV_ACTIVE) 00115 #include "csv\csv.h" 00116 #else 00117 #error Don't enable CSV interrupt when it is inactive! 00118 #endif 00119 #endif 00120 00121 // Include dma.h if DMA is active and DMA interrupt is enabled. 00122 #if (PDL_INTERRUPT_ENABLE_DMA0 == PDL_ON) || (PDL_INTERRUPT_ENABLE_DMA1 == PDL_ON) || \ 00123 (PDL_INTERRUPT_ENABLE_DMA2 == PDL_ON) || (PDL_INTERRUPT_ENABLE_DMA3 == PDL_ON) 00124 #if defined(PDL_PERIPHERAL_DMA_ACTIVE) 00125 #include "dma\dma.h" 00126 #else 00127 #error Don't enable DMA interrupt when it is inactive! 00128 #endif 00129 #endif 00130 00131 // Include dt.h if DT is active and DT interrupt is enabled. 00132 #if (PDL_INTERRUPT_ENABLE_DT == PDL_ON) 00133 #if defined(PDL_PERIPHERAL_DT_ACTIVE) 00134 #include "dt\dt.h" 00135 #else 00136 #error Don't enable DT interrupt when it is inactive! 00137 #endif 00138 #endif 00139 00140 // Include exint.h if EXT INT is active and EXT INT is enabled. 00141 #if (PDL_INTERRUPT_ENABLE_EXINT0 == PDL_ON) || (PDL_INTERRUPT_ENABLE_EXINT1 == PDL_ON) || \ 00142 (PDL_INTERRUPT_ENABLE_EXINT2 == PDL_ON) || (PDL_INTERRUPT_ENABLE_EXINT3 == PDL_ON) || \ 00143 (PDL_INTERRUPT_ENABLE_EXINT4 == PDL_ON) || (PDL_INTERRUPT_ENABLE_EXINT5 == PDL_ON) || \ 00144 (PDL_INTERRUPT_ENABLE_EXINT6 == PDL_ON) || (PDL_INTERRUPT_ENABLE_EXINT7 == PDL_ON) || \ 00145 (PDL_INTERRUPT_ENABLE_EXINT8 == PDL_ON) || (PDL_INTERRUPT_ENABLE_EXINT9 == PDL_ON) || \ 00146 (PDL_INTERRUPT_ENABLE_EXINT10 == PDL_ON) || (PDL_INTERRUPT_ENABLE_EXINT11 == PDL_ON) || \ 00147 (PDL_INTERRUPT_ENABLE_EXINT12 == PDL_ON) || (PDL_INTERRUPT_ENABLE_EXINT13 == PDL_ON) || \ 00148 (PDL_INTERRUPT_ENABLE_EXINT14 == PDL_ON) || (PDL_INTERRUPT_ENABLE_EXINT15 == PDL_ON) 00149 #if defined(PDL_PERIPHERAL_EXINT_ACTIVE) 00150 #include "exint\exint.h" 00151 #else 00152 #error Don't enable external interrupt when it is inactive! 00153 #endif 00154 #endif 00155 00156 // Include flash.h if Flash is active and Flash interrupt is enabled. 00157 #if (PDL_INTERRUPT_ENABLE_FLASH == PDL_ON) 00158 #if defined(PDL_PERIPHERAL_FLASH_ACTIVE) 00159 #include "flash\flash.h" 00160 #else 00161 #error Don't enable Flash interrupt when it is inactive! 00162 #endif 00163 #endif 00164 00165 // Include lvd.h if LVD is active and LVD interrupt is enabled. 00166 #if (PDL_INTERRUPT_ENABLE_LVD == PDL_ON) 00167 #if defined(PDL_PERIPHERAL_LVD_ACTIVE) 00168 #include "lvd\lvd.h" 00169 #else 00170 #error Don't enable LVD interrupt when it is inactive! 00171 #endif 00172 #endif 00173 00174 // Include mfs.h if MFS is active and MFS interrupt is enabled. 00175 #if (PDL_INTERRUPT_ENABLE_MFS0 == PDL_ON) || (PDL_INTERRUPT_ENABLE_MFS1 == PDL_ON) || \ 00176 (PDL_INTERRUPT_ENABLE_MFS2 == PDL_ON) || (PDL_INTERRUPT_ENABLE_MFS3 == PDL_ON) || \ 00177 (PDL_INTERRUPT_ENABLE_MFS4 == PDL_ON) || (PDL_INTERRUPT_ENABLE_MFS5 == PDL_ON) || \ 00178 (PDL_INTERRUPT_ENABLE_MFS6 == PDL_ON) || (PDL_INTERRUPT_ENABLE_MFS7 == PDL_ON) || \ 00179 (PDL_INTERRUPT_ENABLE_MFS8 == PDL_ON) || (PDL_INTERRUPT_ENABLE_MFS9 == PDL_ON) || \ 00180 (PDL_INTERRUPT_ENABLE_MFS10 == PDL_ON) || (PDL_INTERRUPT_ENABLE_MFS11 == PDL_ON) || \ 00181 (PDL_INTERRUPT_ENABLE_MFS12 == PDL_ON) || (PDL_INTERRUPT_ENABLE_MFS13 == PDL_ON) || \ 00182 (PDL_INTERRUPT_ENABLE_MFS14 == PDL_ON) || (PDL_INTERRUPT_ENABLE_MFS15 == PDL_ON) 00183 #if defined(PDL_PERIPHERAL_MFS_ACTIVE) 00184 #include "mfs\mfs.h" 00185 #else 00186 #error Don't enable MFS interrupt when it is inactive! 00187 #endif 00188 #endif 00189 00190 // Include mft_frt.h if FRT is active and FRT interrupt is enabled. 00191 #if (PDL_INTERRUPT_ENABLE_MFT0_FRT == PDL_ON) || \ 00192 (PDL_INTERRUPT_ENABLE_MFT1_FRT == PDL_ON) || \ 00193 (PDL_INTERRUPT_ENABLE_MFT2_FRT == PDL_ON) 00194 #if defined(PDL_PERIPHERAL_MFT_FRT_ACTIVE) 00195 #include "mft\mft_frt.h" 00196 #else 00197 #error Don't enable MFT's FRT interrupt when it is inactive! 00198 #endif 00199 #endif 00200 00201 // Include mft_ocu.h if OCU is active and OCU interrupt is enabled. 00202 #if (PDL_INTERRUPT_ENABLE_MFT0_OCU == PDL_ON) || \ 00203 (PDL_INTERRUPT_ENABLE_MFT1_OCU == PDL_ON) || \ 00204 (PDL_INTERRUPT_ENABLE_MFT2_OCU == PDL_ON) 00205 #if defined(PDL_PERIPHERAL_MFT_OCU_ACTIVE) 00206 #include "mft\mft_ocu.h" 00207 #else 00208 #error Don't enable MFT's OCU interrupt when it is inactive! 00209 #endif 00210 #endif 00211 00212 // Include mft_wfg.h if WFG is active and WFG interrupt is enabled. 00213 #if (PDL_INTERRUPT_ENABLE_MFT0_WFG == PDL_ON) || \ 00214 (PDL_INTERRUPT_ENABLE_MFT1_WFG == PDL_ON) || \ 00215 (PDL_INTERRUPT_ENABLE_MFT2_WFG == PDL_ON) 00216 #if defined(PDL_PERIPHERAL_MFT_WFG_ACTIVE) 00217 #include "mft\mft_wfg.h" 00218 #else 00219 #error Don't enable MFT's WFG interrupt when it is inactive! 00220 #endif 00221 #endif 00222 00223 // Include mft_icu.h if ICU is active and ICU interrupt is enabled. 00224 #if (PDL_INTERRUPT_ENABLE_MFT0_ICU == PDL_ON) || \ 00225 (PDL_INTERRUPT_ENABLE_MFT1_ICU == PDL_ON) || \ 00226 (PDL_INTERRUPT_ENABLE_MFT2_ICU == PDL_ON) 00227 #if defined(PDL_PERIPHERAL_MFT_ICU_ACTIVE) 00228 #include "mft\mft_icu.h" 00229 #else 00230 #error Don't enable MFT's ICU interrupt when it is inactive! 00231 #endif 00232 #endif 00233 00234 // Include ppg.h if PPG is active and PPG interrupt is enabled. 00235 #if (PDL_INTERRUPT_ENABLE_PPG == PDL_ON) 00236 #if defined(PDL_PERIPHERAL_PPG_ACTIVE) 00237 #include "ppg\ppg.h" 00238 #else 00239 #error Don't enable PPG interrupt when it is inactive! 00240 #endif 00241 #endif 00242 00243 // Include qprc.h if QPRC is active and QPRC interrupt is enabled. 00244 #if (PDL_INTERRUPT_ENABLE_QPRC0 == PDL_ON) || \ 00245 (PDL_INTERRUPT_ENABLE_QPRC1 == PDL_ON) || \ 00246 (PDL_INTERRUPT_ENABLE_QPRC2 == PDL_ON) 00247 #if defined(PDL_PERIPHERAL_QPRC_ACTIVE) 00248 #include "qprc\qprc.h" 00249 #else 00250 #error Don't enable QPRC interrupt when it is inactive! 00251 #endif 00252 #endif 00253 00254 // Include rtc.h if RTC is active and RTC interrupt is enabled. 00255 #if (PDL_INTERRUPT_ENABLE_RTC == PDL_ON) 00256 #if defined(PDL_PERIPHERAL_RTC_ACTIVE) 00257 #include "rtc\rtc.h" 00258 #else 00259 #error Don't enable RTC interrupt when it is inactive! 00260 #endif 00261 #endif 00262 00263 // Include wc.h if WC is active and WC interrupt is enabled. 00264 #if (PDL_INTERRUPT_ENABLE_WC == PDL_ON) 00265 #if defined(PDL_PERIPHERAL_WC_ACTIVE) 00266 #include "wc\wc.h" 00267 #else 00268 #error Don't enable WC interrupt when it is inactive! 00269 #endif 00270 #endif 00271 00272 // Include wdg.h if watchdog is active and watchdog interrupt is enabled. 00273 #if (PDL_INTERRUPT_ENABLE_HWWDG == PDL_ON) || (PDL_INTERRUPT_ENABLE_SWWDG == PDL_ON) 00274 #if defined(PDL_PERIPHERAL_WDG_ACTIVE) 00275 #include "wdg\wdg.h" 00276 #else 00277 #error Don't enable watchdog interrupt when it is inactive! 00278 #endif 00279 #endif 00280 00282 00283 #ifdef __cplusplus 00284 } 00285 #endif 00286 00287 #endif /* __INTERRUPTS_H__ */ 00288 00289 /******************************************************************************/ 00290 /* EOF (not truncated) */ 00291 /******************************************************************************/