| PDL for FM0+ Version1.0 Peripheral Driverl Library for FM0+

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

C:/pdl_v10/library/driver/csv/csv.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 /******************************************************************************/
    00052 #ifndef _CSV_H_
    00053 #define _CSV_H_
    00054
    00055 /******************************************************************************/
    00056 /* Include files                                                              */
    00057 /******************************************************************************/
    00058 #include "mcu.h"
    00059 #include "pdl_user.h"
    00060
    00061 #if (defined(PDL_PERIPHERAL_CSV_ACTIVE))
    00062
    00128 /******************************************************************************
    00129  * Global type definitions
    00130  ******************************************************************************/
    00135 typedef enum en_fcs_cr_div
    00136 {
    00137     FcsCrDiv256 = 5,
    00138     FcsCrDiv512 = 6,
    00139     FcsCrDiv1024 = 7,
    00140
    00141 }en_fcs_cr_div_t;
    00142
    00147 typedef struct stc_csv_status
    00148 {
    00149     boolean_t bCsvMainClockStatus;
    00150     boolean_t bCsvSubClockStatus;
    00151
    00152 }stc_csv_status_t;
    00153
    00158 typedef void fn_fcs_int_callback(void);
    00159
    00160 /******************************************************************************/
    00161 /* Global function prototypes (definition in C source)                        */
    00162 /******************************************************************************/
    00163 /* C binding of definitions if building with C++ compiler */
    00164 #ifdef __cplusplus
    00165 extern "C" {
    00166 #endif
    00167 /* CSV */
    00168 void Csv_EnableMainCsv(void);
    00169 void Csv_DisableMainCsv(void);
    00170 void Csv_EnableSubCsv(void);
    00171 void Csv_DisableSubCsv(void);
    00172 uint8_t Csv_GetCsvFailCause(stc_csv_status_t* pstcCsvStatus);
    00173 /* FCS */
    00174 void Csv_EnableFcs(void);
    00175 void Csv_DisableFcs(void);
    00176 void Csv_EnableFcsReset(void);
    00177 void Csv_DisableFcsReset(void);
    00178 en_result_t Csv_EnableFcsInt(fn_fcs_int_callback* pfnIntCallback);
    00179 void Csv_DisableFcsInt(void);
    00180 void Csv_ClrFcsIntFlag(void);
    00181 uint8_t Csv_GetFcsIntFlag(void);
    00182 en_result_t Csv_SetFcsCrDiv(en_fcs_cr_div_t enDiv) ;
    00183 void Csv_SetFcsDetectRange(uint16_t u16LowerVal, uint16_t u16UpperVal);
    00184 uint16_t Csv_GetFcsDetectCount(void);
    00185 /* IRQ */
    00186 void Csv_IrqHandler(void);
    00187 #ifdef __cplusplus
    00188 }
    00189 #endif
    00190
    00191 #endif
    00192
    00193 #endif /* _CLOCK_FM3_H_ */
    00194 /*****************************************************************************/
    00195 /* END OF FILE */