![]() |
![]() |
00001 /* ============================================================================ 00002 * Copyright (c) Texas Instruments Inc 2002, 2003, 2004, 2005, 2008 00003 * 00004 * Use of this software is controlled by the terms and conditions found in the 00005 * license agreement under which this software has been supplied. 00006 * ============================================================================ 00007 */ 00008 00016 /* ============================================================================ 00017 * Revision History 00018 * ================ 00019 * 17-Oct-2008 Created 00020 * 22-Dec-2009 Modified as per new register layer definition 00021 * ============================================================================ 00022 */ 00023 00034 #ifndef _CSL_WDT_H_ 00035 #define _CSL_WDT_H_ 00036 00037 #ifdef __cplusplus 00038 extern "C" { 00039 #endif 00040 00041 #include "soc.h" 00042 #include "csl_error.h" 00043 #include "csl_types.h" 00044 #include "csl_general.h" 00045 00071 /*****************************************************************************\ 00072 * WDT global macro declarations 00073 \*****************************************************************************/ 00080 #define CSl_WDT_WDKCKLK_FIRST_SEQ 0x5555 00081 00082 #define CSl_WDT_WDKCKLK_SECOND_SEQ 0xAAAA 00083 00084 #define CSl_WDT_WDSVLR_FIRST_SEQ 0x6666 00085 00086 #define CSl_WDT_WDSVLR_SECOND_SEQ 0xBBBB 00087 00088 #define CSl_WDT_WDENLOK_FIRST_SEQ 0x7777 00089 00090 #define CSl_WDT_WDENLOK_SECOND_SEQ 0xCCCC 00091 00092 #define CSl_WDT_WDENLOK_THIRD_SEQ 0xDDDD 00093 00094 #define CSl_WDT_WDPSLR_FIRST_SEQ 0x5A5A 00095 00096 #define CSl_WDT_WDPSLR_SECOND_SEQ 0xA5A5 00097 00098 #define CSl_WDT_WDKICK_RESET 0x0001 00099 00102 /**************************************************************************\ 00103 * WDT global enum declaration * 00104 \**************************************************************************/ 00115 typedef enum{ 00116 WDT_INST_0 = 0, 00117 WDT_INST_INVALID 00118 }WDT_Instance; 00119 00124 /**************************************************************************\ 00125 * WDT global data structures * 00126 \**************************************************************************/ 00137 typedef struct { 00138 WDT_Instance wdtInstance; 00139 CSL_WdtRegsOvly hwRegs; 00140 }CSL_WdtObj; 00141 00145 typedef CSL_WdtObj *CSL_WdtHandle; 00146 00147 00153 typedef struct { 00154 Uint16 counter; 00155 Uint16 prescale; 00156 }WDTIM_Config; 00157 00161 /*****************************************************************************\ 00162 * WDT function declarations * 00163 \*****************************************************************************/ 00164 00213 CSL_WdtHandle WDTIM_open(WDT_Instance wdtNum, 00214 CSL_WdtObj *wdtObj, 00215 CSL_Status *status); 00216 00254 CSL_Status WDTIM_start(CSL_WdtHandle hWdt); 00255 00293 CSL_Status WDTIM_stop(CSL_WdtHandle hWdt); 00294 00333 CSL_Status WDTIM_getCnt(CSL_WdtHandle hWdt, Uint32 *timeCnt); 00334 00370 CSL_Status WDTIM_close(CSL_WdtHandle hWdt); 00371 00408 CSL_Status WDTIM_service(CSL_WdtHandle hWdt); 00409 00450 CSL_Status WDTIM_config(CSL_WdtHandle hWdt, 00451 WDTIM_Config *hwConfig); 00452 00493 CSL_Status WDTIM_getConfig(CSL_WdtHandle hWdt, 00494 WDTIM_Config *getConfig); 00495 00498 #ifdef __cplusplus 00499 } 00500 #endif 00501 #endif /* _CSL_WDT_H_ */ 00502 00503 00504
1.7.4