![]() |
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 /******************************************************************************/ 00051 #ifndef __EXINT_H__ 00052 #define __EXINT_H__ 00053 00054 /******************************************************************************/ 00055 /* Include files */ 00056 /******************************************************************************/ 00057 #include "mcu.h" 00058 #include "pdl_user.h" 00059 00060 /* C binding of definitions if building with C++ compiler */ 00061 #ifdef __cplusplus 00062 extern "C" 00063 { 00064 #endif 00065 00090 00091 #if (defined(PDL_PERIPHERAL_EXINT_ACTIVE)) 00092 /******************************************************************************/ 00093 /* Global pre-processor symbols/macros ('#define') */ 00094 /******************************************************************************/ 00095 #define EXINT_CHANNEL_NUM (8u) 00096 #define EXINT_MAX_CH_INDEX (31u) 00097 00098 /******************************************************************************/ 00099 /* Local type definitions ('typedef') */ 00100 /******************************************************************************/ 00101 00102 typedef enum en_exint_level 00103 { 00104 ExIntLowLevel = 0, 00105 ExIntHighLevel = 1, 00106 ExIntRisingEdge = 2, 00107 ExIntFallingEdge = 3 00108 } en_exint_level_t; 00109 00111 typedef enum en_exint_instance_index 00112 { 00113 ExintInstanceIndexExint0, 00114 ExintInstanceIndexExint1, 00115 ExintInstanceIndexExint2, 00116 ExintInstanceIndexExint3, 00117 ExintInstanceIndexExint4, 00118 ExintInstanceIndexExint5, 00119 ExintInstanceIndexExint6, 00120 ExintInstanceIndexExint7, 00121 ExintInstanceIndexExint8, 00122 ExintInstanceIndexExint9, 00123 ExintInstanceIndexExint10, 00124 ExintInstanceIndexExint11, 00125 ExintInstanceIndexExint12, 00126 ExintInstanceIndexExint13, 00127 ExintInstanceIndexExint14, 00128 ExintInstanceIndexExint15, 00129 ExintInstanceIndexExint16, 00130 ExintInstanceIndexExint17, 00131 ExintInstanceIndexExint18, 00132 ExintInstanceIndexExint19, 00133 ExintInstanceIndexExint20, 00134 ExintInstanceIndexExint21, 00135 ExintInstanceIndexExint22, 00136 ExintInstanceIndexExint23, 00137 ExintInstanceIndexExint24, 00138 ExintInstanceIndexExint25, 00139 ExintInstanceIndexExint26, 00140 ExintInstanceIndexExint27, 00141 ExintInstanceIndexExint28, 00142 ExintInstanceIndexExint29, 00143 ExintInstanceIndexExint30, 00144 ExintInstanceIndexExint31, 00145 ExintInstanceIndexMax 00146 } en_exint_instance_index_t; 00147 00148 /******************************************************************************/ 00149 /* Global function prototypes (definition in C source) */ 00150 /******************************************************************************/ 00151 /* external interrupt */ 00152 en_result_t Exint_Enable(uint8_t u8Ch, func_ptr_t pfnIntCb); 00153 en_result_t Exint_Disable(uint8_t u8Ch); 00154 en_result_t Exint_SetIntDetectMode(uint8_t u8Ch, en_exint_level_t enLevel); 00155 en_exint_level_t Exint_GetIntDetectMode(uint8_t u8Ch); 00156 void Exint_IrqHandler(uint8_t u8Channel); 00157 #endif // #if (defined(PDL_PERIPHERAL_EXINT_ACTIVE)) 00158 00159 #if (defined(PDL_PERIPHERAL_NMI_ACTIVE)) 00160 /* NMI */ 00161 en_result_t Exint_Nmi_SetIntCallback(func_ptr_t pfnIntCb); 00162 void Nmi_IrqHandler(void); 00163 #endif 00164 00166 00167 #ifdef __cplusplus 00168 } 00169 #endif 00170 00171 00172 00173 #endif /* __EXINT_H__ */ 00174 /******************************************************************************/ 00175 /* EOF (not truncated) */ 00176 /******************************************************************************/