xref: /utopia/UTPA2-700.0.x/mxlib/include/drvWDT.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1 //<MStar Software>
2 //******************************************************************************
3 // MStar Software
4 // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved.
5 // All software, firmware and related documentation herein ("MStar Software") are
6 // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by
7 // law, including, but not limited to, copyright law and international treaties.
8 // Any use, modification, reproduction, retransmission, or republication of all
9 // or part of MStar Software is expressly prohibited, unless prior written
10 // permission has been granted by MStar.
11 //
12 // By accessing, browsing and/or using MStar Software, you acknowledge that you
13 // have read, understood, and agree, to be bound by below terms ("Terms") and to
14 // comply with all applicable laws and regulations:
15 //
16 // 1. MStar shall retain any and all right, ownership and interest to MStar
17 //    Software and any modification/derivatives thereof.
18 //    No right, ownership, or interest to MStar Software and any
19 //    modification/derivatives thereof is transferred to you under Terms.
20 //
21 // 2. You understand that MStar Software might include, incorporate or be
22 //    supplied together with third party`s software and the use of MStar
23 //    Software may require additional licenses from third parties.
24 //    Therefore, you hereby agree it is your sole responsibility to separately
25 //    obtain any and all third party right and license necessary for your use of
26 //    such third party`s software.
27 //
28 // 3. MStar Software and any modification/derivatives thereof shall be deemed as
29 //    MStar`s confidential information and you agree to keep MStar`s
30 //    confidential information in strictest confidence and not disclose to any
31 //    third party.
32 //
33 // 4. MStar Software is provided on an "AS IS" basis without warranties of any
34 //    kind. Any warranties are hereby expressly disclaimed by MStar, including
35 //    without limitation, any warranties of merchantability, non-infringement of
36 //    intellectual property rights, fitness for a particular purpose, error free
37 //    and in conformity with any international standard.  You agree to waive any
38 //    claim against MStar for any loss, damage, cost or expense that you may
39 //    incur related to your use of MStar Software.
40 //    In no event shall MStar be liable for any direct, indirect, incidental or
41 //    consequential damages, including without limitation, lost of profit or
42 //    revenues, lost or damage of data, and unauthorized system use.
43 //    You agree that this Section 4 shall still apply without being affected
44 //    even if MStar Software has been modified by MStar in accordance with your
45 //    request or instruction for your use, except otherwise agreed by both
46 //    parties in writing.
47 //
48 // 5. If requested, MStar may from time to time provide technical supports or
49 //    services in relation with MStar Software to you for your use of
50 //    MStar Software in conjunction with your or your customer`s product
51 //    ("Services").
52 //    You understand and agree that, except otherwise agreed by both parties in
53 //    writing, Services are provided on an "AS IS" basis and the warranty
54 //    disclaimer set forth in Section 4 above shall apply.
55 //
56 // 6. Nothing contained herein shall be construed as by implication, estoppels
57 //    or otherwise:
58 //    (a) conferring any license or right to use MStar name, trademark, service
59 //        mark, symbol or any other identification;
60 //    (b) obligating MStar or any of its affiliates to furnish any person,
61 //        including without limitation, you and your customers, any assistance
62 //        of any kind whatsoever, or any information; or
63 //    (c) conferring any license or right under any intellectual property right.
64 //
65 // 7. These terms shall be governed by and construed in accordance with the laws
66 //    of Taiwan, R.O.C., excluding its conflict of law rules.
67 //    Any and all dispute arising out hereof or related hereto shall be finally
68 //    settled by arbitration referred to the Chinese Arbitration Association,
69 //    Taipei in accordance with the ROC Arbitration Law and the Arbitration
70 //    Rules of the Association by three (3) arbitrators appointed in accordance
71 //    with the said Rules.
72 //    The place of arbitration shall be in Taipei, Taiwan and the language shall
73 //    be English.
74 //    The arbitration award shall be final and binding to both parties.
75 //
76 //******************************************************************************
77 //<MStar Software>
78 ////////////////////////////////////////////////////////////////////////////////
79 //
80 // Copyright (c) 2008-2009 MStar Semiconductor, Inc.
81 // All rights reserved.
82 //
83 // Unless otherwise stipulated in writing, any and all information contained
84 // herein regardless in any format shall remain the sole proprietary of
85 // MStar Semiconductor Inc. and be kept in strict confidence
86 // ("MStar Confidential Information") by the recipient.
87 // Any unauthorized act including without limitation unauthorized disclosure,
88 // copying, use, reproduction, sale, distribution, modification, disassembling,
89 // reverse engineering and compiling of the contents of MStar Confidential
90 // Information is unlawful and strictly prohibited. MStar hereby reserves the
91 // rights to any and all damages, losses, costs and expenses resulting therefrom.
92 //
93 ////////////////////////////////////////////////////////////////////////////////
94 
95 ///////////////////////////////////////////////////////////////////////////////////////////////////
96 ///
97 /// @file   drvWDT.h
98 /// @brief  Piu Watch Dog Timer Driver Interface
99 /// @author MStar Semiconductor Inc.
100 ///////////////////////////////////////////////////////////////////////////////////////////////////
101 
102 /*!
103 	\defgroup G_WDT WDT interface
104     \ingroup  G_PERIPHERAL
105 
106 	WDT(WatchDog) is a program to moniter every registered programs, and will restart these programs while thy are up and down.
107 
108 	<b> Features </b>
109 	- 32-bit counter;
110 	- WDT clock uses live crystal clock;
111 	- Adjustable length of the WDT reset;
112 	- Interrupt asserted (if enabled) when counter hits the reg_wdt_int??
113 	- A flag for WDT tracking (un-touchable by global IP reset).
114 
115 	\image html WDT.png
116 
117 	<b> Usage </b>
118 	-# WDT on/off/restart:
119 		WDT will be enabled after system is turned-on;
120 		WDT will be disabled when set reg_wdt_max??to zero;
121 		WDT will be re-started when set reg_wdt_clr??
122 	-# Set  reg_wdt_max??for length of WDT period;
123 	-# Set  reg_wdt_int??to enable interrupt if needed;
124 		Interrupt asserted when "WDT counter [31:16]" is equal to reg_wdt_int??and "WDT counter[15:0]" is equal to 0x0000
125 	-# Set  reg_wdt_rst_len??to adjust the length of WDT reset.
126 	-# Read reg_wdt_rst_flag??to see if WDT reset ever happened.
127 
128 
129     \defgroup G_WDT_INIT Initialization Task relative
130     \ingroup  G_WDT
131     \defgroup G_WDT_COMMON Common Task relative
132     \ingroup  G_WDT
133     \defgroup G_WDT_CONTROL Control relative
134     \ingroup  G_WDT
135     \defgroup G_WDT_OTHER  other relative
136     \ingroup  G_WDT
137     \defgroup G_WDT_ToBeModified WDT api to be modified
138     \ingroup  G_WDT
139     \defgroup G_WDT_ToBeRemove WDT api to be removed
140     \ingroup  G_WDT
141 */
142 
143 #ifndef _DRV_WDT_H_
144 #define _DRV_WDT_H_
145 
146 
147 
148 #ifdef __cplusplus
149 extern "C"
150 {
151 #endif
152 
153 #include "MsTypes.h"
154 #include "MsDevice.h"
155 
156 ////////////////////////////////////////////////////////////////////////////////
157 //  Type and Structure
158 ////////////////////////////////////////////////////////////////////////////////
159 #define MSIF_WDT_LIB_CODE              {'W','D','T','_'}    //Lib code
160 #define MSIF_WDT_LIBVER                {'0','1'}            //LIB version
161 #define MSIF_WDT_BUILDNUM              {'0','4'}            //Build Number
162 #define MSIF_WDT_CHANGELIST            {'0','0','3','8','2','1','7','1'} //P4 ChangeList Number
163 
164 #define WDT_DRV_VERSION                /* Character String for DRV/API version             */  \
165     MSIF_TAG,                           /* 'MSIF'                                           */  \
166     MSIF_CLASS,                         /* '00'                                             */  \
167     MSIF_CUS,                           /* 0x0000                                           */  \
168     MSIF_MOD,                           /* 0x0000                                           */  \
169     MSIF_CHIP,                                                                                  \
170     MSIF_CPU,                                                                                   \
171     MSIF_WDT_LIB_CODE,                  /* IP__                                             */  \
172     MSIF_WDT_LIBVER,                    /* 0.0 ~ Z.Z                                        */  \
173     MSIF_WDT_BUILDNUM,                  /* 00 ~ 99                                          */  \
174     MSIF_WDT_CHANGELIST,                /* CL#                                              */  \
175     MSIF_OS
176 
177 #define MAX_TIMER_NUM			2
178 
179 typedef enum _WDT_DbgLv
180 {
181     E_WDT_DBGLV_NONE,			/* no debug message */
182     E_WDT_DBGLV_ERR_ONLY,		/* show error only */
183     E_WDT_DBGLV_INFO,			/* show error & informaiton */
184     E_WDT_DBGLV_ALL			/* show error, information & funciton name */
185 }WDT_DbgLv;
186 
187 typedef enum
188 {
189     E_WDT_FAIL,
190     E_WDT_OK,
191 } WDT_Result;
192 
193 typedef enum _E_PIU_Timer
194 {
195     E_TIMER_0,
196     E_TIMER_1,
197 } E_PIU_Timer;
198 
199 typedef struct _tmr_interrupt {
200 	MS_U32 		u32TmrInit;						/* Initial value of timer 						*/
201  	MS_U32 		u32TmrMax;						/* Max value of timer 						*/
202 	void 		(*TmrFnct)(void *, void *, void *);	/* Function to execute when timer times out	*/
203 	void			*TmrFnctArg0;					/* Arguments supplied to user defined function 	*/
204 	void			*TmrFnctArg1;					/* Arguments supplied to user defined function 	*/
205 	void			*TmrFnctArg2;					/* Arguments supplied to user defined function 	*/
206 	MS_BOOL 	bTmrEn;							/* Flag indicating whether timer is enable 		*/
207 }tmr_interrupt;
208 
209 ////////////////////////////////////////////////////////////////////////////////
210 //  Function and Variable
211 ////////////////////////////////////////////////////////////////////////////////
212 ////////////////////////////////////////////////////////////////////////////////
213 /// @brief \b Function \b Name: MDrv_WDT_GetLibVer
214 /// @brief \b Function \b Description: Show the WDT driver version
215 /// @ingroup G_WDT_COMMON
216 /// @param <IN>        \b None:
217 /// @param <OUT>       \b **pVerString : output WDT driver version
218 /// @param <RET>       \b eRETCODE :
219 /// @param <GLOBAL>    \b VER: Library version string
220 ////////////////////////////////////////////////////////////////////////////////
221 WDT_Result MDrv_WDT_GetLibVer(const MSIF_Version **ppVersion);
222 
223 ////////////////////////////////////////////////////////////////////////////////
224 /// @brief \b Function  \b Name: MDrv_WDT_Init
225 /// @brief \b Function  \b Description: Init and Start WDT
226 /// @ingroup G_WDT_INIT
227 /// @param <IN>         \b eLevel: E_WDT_DBGLV_NONE/E_WDT_DBGLV_ERR_ONLY/E_WDT_DBGLV_INFO/E_WDT_DBGLV_ALL
228 /// @param <OUT>        \b None:
229 /// @param <RET>        \b TRUE: Initial FALSE: Not initial
230 /// @param <GLOBAL>     \b None :
231 ////////////////////////////////////////////////////////////////////////////////
232 WDT_Result MDrv_WDT_Init(WDT_DbgLv eLevel);
233 
234 ////////////////////////////////////////////////////////////////////////////////
235 /// @brief \b Function  \b Name: MDrv_WDT_Stop
236 /// @brief \b Function  \b Description: Init WDT Stop
237 /// @ingroup G_WDT_CONTROL
238 /// @param <IN>         \b eLevel: E_WDT_DBGLV_NONE/E_WDT_DBGLV_ERR_ONLY/E_WDT_DBGLV_INFO/E_WDT_DBGLV_ALL
239 /// @param <OUT>        \b None :
240 /// @param <RET>        \b WDT_Result
241 /// @param <GLOBAL>     \b None :
242 ////////////////////////////////////////////////////////////////////////////////
243 WDT_Result MDrv_WDT_Stop(WDT_DbgLv eLevel);
244 
245 ////////////////////////////////////////////////////////////////////////////////
246 /// @brief \b Function  \b Name: MDrv_WDT_Clear
247 /// @brief \b Function  \b Description: clear WDT.
248 /// @ingroup G_WDT_CONTROL
249 /// @param <IN>         \b None:
250 /// @param <OUT>        \b None:
251 /// @param <RET>        \b TRUE: Initial FALSE: Not initial
252 /// @param <GLOBAL>     \b None :
253 ////////////////////////////////////////////////////////////////////////////////
254 WDT_Result MDrv_WDT_Clear(void);
255 
256 ////////////////////////////////////////////////////////////////////////////////
257 /// @brief \b Function  \b Name: MDrv_WDT_ClearRstFlag
258 /// @brief \b Function  \b Description: clear WDT reset flag.
259 /// @ingroup G_WDT_CONTROL
260 /// @param <IN>         \b None:
261 /// @param <OUT>        \b None:
262 /// @param <RET>        \b TRUE: Initial FALSE: Not initial
263 /// @param <GLOBAL>     \b None :
264 ////////////////////////////////////////////////////////////////////////////////
265 WDT_Result MDrv_WDT_ClearRstFlag(void);
266 
267 ////////////////////////////////////////////////////////////////////////////////
268 /// @brief \b Function  \b Name: MDrv_WDT_IsReset
269 /// @brief \b Function  \b Description: check if WDT is reset
270 /// @ingroup G_WDT_COMMON
271 /// @param <IN>         \b None:
272 /// @param <OUT>        \b None:
273 /// @param <RET>        \b TRUE: Initial FALSE: Not initial
274 /// @param <GLOBAL>     \b None :
275 ////////////////////////////////////////////////////////////////////////////////
276 WDT_Result MDrv_WDT_IsReset(void);
277 
278 ////////////////////////////////////////////////////////////////////////////////
279 /// @brief \b Function  \b Name: MDrv_WDT_IsEnable
280 /// @brief \b Function  \b Description: check if WDT is Enable
281 /// @ingroup G_WDT_COMMON
282 /// @param <IN>         \b None:
283 /// @param <OUT>        \b None:
284 /// @param <RET>        \b TRUE: Initial FALSE: Not initial
285 /// @param <GLOBAL>     \b None :
286 ////////////////////////////////////////////////////////////////////////////////
287 WDT_Result MDrv_WDT_IsEnable(void);
288 
289 ////////////////////////////////////////////////////////////////////////////////
290 /// @brief \b Function  \b Name: MDrv_WDT_SetTimer
291 /// @brief \b Function  \b Description: Set Timer
292 /// @ingroup G_WDT_CONTROL
293 /// @param <IN>         \b eLevel: E_WDT_DBGLV_NONE/E_WDT_DBGLV_ERR_ONLY/E_WDT_DBGLV_INFO/E_WDT_DBGLV_ALL
294 /// @param <IN>         \b MS_U16: sec
295 /// @param <OUT>        \b None :
296 /// @param <RET>        \b WDT_Result
297 /// @param <GLOBAL>     \b None :
298 ////////////////////////////////////////////////////////////////////////////////
299 WDT_Result MDrv_WDT_SetTimer(WDT_DbgLv eLevel, MS_U16 sec);
300 
301 ////////////////////////////////////////////////////////////////////////////////
302 /// @brief \b Function  \b Name: MDrv_WDT_SetTimer_ms
303 /// @brief \b Function  \b Description: Set Timer
304 /// @ingroup G_WDT_CONTROL
305 /// @param <IN>         \b eLevel: E_WDT_DBGLV_NONE/E_WDT_DBGLV_ERR_ONLY/E_WDT_DBGLV_INFO/E_WDT_DBGLV_ALL
306 /// @param <IN>         \b MS_U16: msec
307 /// @param <OUT>        \b None :
308 /// @param <RET>        \b WDT_Result
309 /// @param <GLOBAL>     \b None :
310 ////////////////////////////////////////////////////////////////////////////////
311 WDT_Result MDrv_WDT_SetTimer_ms(WDT_DbgLv eLevel, MS_U16 msec);
312 
313 ////////////////////////////////////////////////////////////////////////////////
314 /// @brief \b Function  \b Name: MDrv_WDT_SetTimer_us
315 /// @brief \b Function  \b Description: Set Timer
316 /// @ingroup G_WDT_CONTROL
317 /// @param <IN>         \b eLevel: E_WDT_DBGLV_NONE/E_WDT_DBGLV_ERR_ONLY/E_WDT_DBGLV_INFO/E_WDT_DBGLV_ALL
318 /// @param <IN>         \b MS_U16: msec
319 /// @param <OUT>        \b None :
320 /// @param <RET>        \b WDT_Result
321 /// @param <GLOBAL>     \b None :
322 ////////////////////////////////////////////////////////////////////////////////
323 WDT_Result MDrv_WDT_SetTimer_us(WDT_DbgLv eLevel, MS_U16 usec);
324 
325 ////////////////////////////////////////////////////////////////////////////////
326 /// @brief \b Function  \b Name: MDrv_WDT_SetIntTimer
327 /// @brief \b Function  \b Description: Set INT Timer
328 /// @ingroup G_WDT_CONTROL
329 /// @param <IN>         \b eLevel: E_WDT_DBGLV_NONE/E_WDT_DBGLV_ERR_ONLY/E_WDT_DBGLV_INFO/E_WDT_DBGLV_ALL
330 /// @param <IN>         \b MS_U16: sec
331 /// @param <OUT>        \b None :
332 /// @param <RET>        \b WDT_Result
333 /// @param <GLOBAL>     \b None :
334 ////////////////////////////////////////////////////////////////////////////////
335 WDT_Result MDrv_WDT_SetIntTimer(WDT_DbgLv eLevel, MS_U16 sec);
336 
337 //Attribute
338 //muti-paremeter
339 //------- ------------------------------------------------------------------------------------------
340 /// Description : Store and resume WDT initial status for fast booting.
341 /// @ingroup G_WDT_INIT
342 /// @param  EN_POWER_MODE    \b IN: The mode of power on/off
343 /// @return TRUE : succeed
344 /// @return FALSE : failed
345 /// @return 1: Resume OK; 2: Suspend OK; 3: Suspend failed
346 //-------------------------------------------------------------------------------------------------
347 void MDrv_TIMER_Init(void);
348 //-------------------------------------------------------------------------------------------------
349 /// MOBF Encrypt
350 /// @ingroup G_WDT_ToBeRemove
351 /// @param u32Key \b IN: Key
352 /// @param bEnable \b IN: TRUE/FLASE
353 /// @return DRVAESDMA_OK : Success
354 /// @return Others : Fail
355 //-------------------------------------------------------------------------------------------------
356 void MDrv_TIMER_CfgFnct(E_PIU_Timer eTimer, void (*fnct)(void *, void *, void *), void *arg0, void *arg1, void *arg2 );
357 //------- ------------------------------------------------------------------------------------------
358 /// Description : Store and resume WDT initial status for fast booting.
359 /// @ingroup G_WDT_COMMON
360 /// @param  EN_POWER_MODE    \b IN: The mode of power on/off
361 /// @return TRUE : succeed
362 /// @return FALSE : failed
363 /// @return 1: Resume OK; 2: Suspend OK; 3: Suspend failed
364 //-------------------------------------------------------------------------------------------------
365 void MDrv_TIMER_Count(E_PIU_Timer eTimer, MS_BOOL bEnable);
366 //-------------------------------------------------------------------------------------------------
367 /// MOBF Encrypt
368 /// @ingroup G_WDT_ToBeRemove
369 /// @param u32Key \b IN: Key
370 /// @param bEnable \b IN: TRUE/FLASE
371 /// @return DRVAESDMA_OK : Success
372 /// @return Others : Fail
373 //-------------------------------------------------------------------------------------------------
374 void MDrv_TIMER_INT(E_PIU_Timer eTimer, MS_BOOL bEnable);
375 //-------------------------------------------------------------------------------------------------
376 /// MOBF Encrypt
377 /// @ingroup G_WDT_ToBeRemove
378 /// @param u32Key \b IN: Key
379 /// @param bEnable \b IN: TRUE/FLASE
380 /// @return DRVAESDMA_OK : Success
381 /// @return Others : Fail
382 //-------------------------------------------------------------------------------------------------
383 void MDrv_TIMER_Rst(E_PIU_Timer eTimer);
384 //-------------------------------------------------------------------------------------------------
385 /// MOBF Encrypt
386 /// @ingroup G_WDT_ToBeRemove
387 /// @param u32Key \b IN: Key
388 /// @param bEnable \b IN: TRUE/FLASE
389 /// @return DRVAESDMA_OK : Success
390 /// @return Others : Fail
391 //-------------------------------------------------------------------------------------------------
392 void MDrv_TIMER_SetMaxMatch(E_PIU_Timer eTimer, MS_U32 u32MaxTimer);
393 //-------------------------------------------------------------------------------------------------
394 /// MOBF Encrypt
395 /// @ingroup G_WDT_ToBeRemove
396 /// @param u32Key \b IN: Key
397 /// @param bEnable \b IN: TRUE/FLASE
398 /// @return DRVAESDMA_OK : Success
399 /// @return Others : Fail
400 //-------------------------------------------------------------------------------------------------
401 MS_BOOL MDrv_TIMER_HitMaxMatch(E_PIU_Timer eTimer);
402 //-------------------------------------------------------------------------------------------------
403 /// MOBF Encrypt
404 /// @ingroup G_WDT_ToBeRemove
405 /// @param u32Key \b IN: Key
406 /// @param bEnable \b IN: TRUE/FLASE
407 /// @return DRVAESDMA_OK : Success
408 /// @return Others : Fail
409 //-------------------------------------------------------------------------------------------------
410 MS_U32 MDrv_TIMER_GetMaxMatch(E_PIU_Timer eTimer);
411 //------- ------------------------------------------------------------------------------------------
412 /// Description : Store and resume WDT initial status for fast booting.
413 /// @ingroup G_WDT_COMMON
414 /// @param  EN_POWER_MODE    \b IN: The mode of power on/off
415 /// @return TRUE : succeed
416 /// @return FALSE : failed
417 /// @return 1: Resume OK; 2: Suspend OK; 3: Suspend failed
418 //-------------------------------------------------------------------------------------------------
419 MS_U32 MDrv_TIMER_GetCounter(E_PIU_Timer eTimer);
420 //-------------------------------------------------------------------------------------------------
421 /// MOBF Encrypt
422 /// @ingroup G_WDT_ToBeRemove
423 /// @param u32Key \b IN: Key
424 /// @param bEnable \b IN: TRUE/FLASE
425 /// @return DRVAESDMA_OK : Success
426 /// @return Others : Fail
427 //-------------------------------------------------------------------------------------------------
428 MS_U32 MDrv_TIMER_GetSecond(E_PIU_Timer eTimer);
429 //-------------------------------------------------------------------------------------------------
430 /// MOBF Encrypt
431 /// @ingroup G_WDT_ToBeRemove
432 /// @param u32Key \b IN: Key
433 /// @param bEnable \b IN: TRUE/FLASE
434 /// @return DRVAESDMA_OK : Success
435 /// @return Others : Fail
436 //-------------------------------------------------------------------------------------------------
437 MS_U32 MDrv_TIMER_GetMs(E_PIU_Timer eTimer);
438 //-------------------------------------------------------------------------------------------------
439 /// MOBF Encrypt
440 /// @ingroup G_WDT_ToBeRemove
441 /// @param u32Key \b IN: Key
442 /// @param bEnable \b IN: TRUE/FLASE
443 /// @return DRVAESDMA_OK : Success
444 /// @return Others : Fail
445 //-------------------------------------------------------------------------------------------------
446 MS_U32 MDrv_TIMER_GetUs(E_PIU_Timer eTimer);
447 //-------------------------------------------------------------------------------------------------
448 /// MOBF Encrypt
449 /// @ingroup G_WDT_ToBeRemove
450 /// @param u32Key \b IN: Key
451 /// @param bEnable \b IN: TRUE/FLASE
452 /// @return DRVAESDMA_OK : Success
453 /// @return Others : Fail
454 //-------------------------------------------------------------------------------------------------
455 void MDrv_TIMER_Delay(E_PIU_Timer eTimer, MS_U32 u32Second);
456 //-------------------------------------------------------------------------------------------------
457 /// MOBF Encrypt
458 /// @ingroup G_WDT_ToBeRemove
459 /// @param u32Key \b IN: Key
460 /// @param bEnable \b IN: TRUE/FLASE
461 /// @return DRVAESDMA_OK : Success
462 /// @return Others : Fail
463 //-------------------------------------------------------------------------------------------------
464 void MDrv_TIMER_DelayMs(E_PIU_Timer eTimer, MS_U32 u32MS);
465 /// MOBF Encrypt
466 /// @ingroup G_WDT_ToBeRemove
467 /// @param u32Key \b IN: Key
468 /// @param bEnable \b IN: TRUE/FLASE
469 /// @return DRVAESDMA_OK : Success
470 /// @return Others : Fail
471 //-------------------------------------------------------------------------------------------------
472 void MDrv_TIMER_DelayUs(E_PIU_Timer eTimer, MS_U32 u32US);
473 //------- ------------------------------------------------------------------------------------------
474 /// Description : Store and resume WDT initial status for fast booting.
475 /// @ingroup G_WDT_COMMON
476 /// @param  EN_POWER_MODE    \b IN: The mode of power on/off
477 /// @return TRUE : succeed
478 /// @return FALSE : failed
479 /// @return 1: Resume OK; 2: Suspend OK; 3: Suspend failed
480 //-------------------------------------------------------------------------------------------------
481 void MDrv_TIMER_Exit(void);
482 
483 //------- ------------------------------------------------------------------------------------------
484 /// Description : Store and resume WDT initial status for fast booting.
485 /// @ingroup G_WDT_COMMON
486 /// @param  EN_POWER_MODE    \b IN: The mode of power on/off
487 /// @return TRUE : succeed
488 /// @return FALSE : failed
489 /// @return 1: Resume OK; 2: Suspend OK; 3: Suspend failed
490 //-------------------------------------------------------------------------------------------------
491 MS_U16 MDrv_WDT_SetPowerState(EN_POWER_MODE u16PowerState);
492 
493 #ifdef __cplusplus
494 }
495 #endif
496 
497 
498 #endif // _DRV_WDT_H_
499 
500