PDL for FM0+  Version1.0
Peripheral Driverl Library for FM0+
C:/pdl_v10/library/driver/lvd/lvd.h
Go to the documentation of this file.
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 __LVD_H__
00052 #define __LVD_H__
00053 
00054 /******************************************************************************/
00055 /* Include files                                                              */
00056 /******************************************************************************/
00057 #include "mcu.h"
00058 #include "pdl_user.h"
00059 
00060 #if (defined(PDL_PERIPHERAL_LVD_ACTIVE))
00061 
00062 /* C binding of definitions if building with C++ compiler */
00063 #ifdef __cplusplus
00064 extern "C"
00065 {
00066 #endif
00067 
00101 
00102 /******************************************************************************/
00103 /* Global pre-processor symbols/macros ('#define')                            */
00104 /******************************************************************************/
00105  
00106 /******************************************************************************
00107  * Global type definitions
00108  ******************************************************************************/
00109 
00117 typedef enum en_lvd_int_volt
00118 {
00119     LvdIntVoltage280 = 0,   
00120     LvdIntVoltage300 = 1,   
00121     LvdIntVoltage320 = 2,   
00122     LvdIntVoltage360 = 3,   
00123     LvdIntVoltage370 = 4,   
00124     LvdIntVoltage400 = 5,   
00125     LvdIntVoltage410 = 6,   
00126     LvdIntVoltage420 = 7,   
00127       
00128 } en_lvd_int_volt_t;
00129 
00137 typedef enum en_lvd_reset_volt
00138 {
00139     LvdResetVoltage245 = 0,   
00140     LvdResetVoltage260 = 1,   
00141     LvdResetVoltage270 = 2,   
00142     LvdResetVoltage280 = 3,   
00143     LvdResetVoltage300 = 4,   
00144     LvdResetVoltage320 = 5,   
00145     LvdResetVoltage360 = 6,   
00146     LvdResetVoltage370 = 7,   
00147     LvdResetVoltage400 = 8,   
00148     LvdResetVoltage410 = 9,   
00149     LvdResetVoltage420 = 10,  
00150       
00151 } en_lvd_reset_volt_t;
00152 
00157 typedef enum en_lvd_func
00158 {
00159     LvdIntFunc   = 0u,   
00160     LvdResetFunc = 1u,   
00161      
00162 }en_lvd_func_t;
00163 
00164 /******************************************************************************/
00165 /* Global variable definitions ('extern')                                     */
00166 /******************************************************************************/
00167 
00168 /******************************************************************************/
00169 /* Global function prototypes (definition in C source)                        */
00170 /******************************************************************************/
00171 #if (PDL_INTERRUPT_ENABLE_LVD == PDL_ON)
00172 void LvdIrqHandler(void);
00173 en_result_t Lvd_ConfigInt(func_ptr_t pfnCallback);
00174 #endif
00175 
00176 en_result_t Lvd_SetIntDetectVoltage(en_lvd_int_volt_t enVolt);
00177 en_result_t Lvd_SetResetDetectVoltage(en_lvd_reset_volt_t enVolt);
00178 en_result_t Lvd_EnableFunc(en_lvd_func_t enFunc);
00179 en_result_t Lvd_DisableFunc(en_lvd_func_t enFunc);
00180 boolean_t Lvd_GetIntStatus(void);
00181 void Lvd_ClearIntStatus(void);
00182 
00184 
00185 #ifdef __cplusplus
00186 }
00187 #endif
00188 
00189 #endif /* #if (defined(PDL_PERIPHERAL_LVD_ACTIVE)) */
00190 
00191 #endif /* __LVD_H__ */
00192 /******************************************************************************/
00193 /* EOF (not truncated)                                                        */
00194 /******************************************************************************/