]> git.sur5r.net Git - freertos/blob - Demo/MB91460_Softune/SRC/watchdog/watchdog.h
Remove unnecessary use of portLONG, portCHAR and portSHORT.
[freertos] / Demo / MB91460_Softune / SRC / watchdog / watchdog.h
1 /* THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS. FUJITSU */\r
2 /* MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR */\r
3 /* ELIGIBILITY FOR ANY PURPOSES.                                             */\r
4 /*                 (C) Fujitsu Microelectronics Europe GmbH                  */\r
5 /*------------------------------------------------------------------------\r
6   watchdog.h\r
7   - This file contains the defines and function declaration for hardware watchdog.\r
8 -------------------------------------------------------------------------*/\r
9 \r
10 #ifndef WATCHDOG_H\r
11 #define WATCHDOG_H\r
12 \r
13 /* \r
14  * Clear watchdog defines \r
15  */\r
16 #define WTC_NONE        0               /* Don't initialize and clear watchdog */\r
17 #define WTC_IN_TASK     1               /* Clear Watchdog in dedicated task */\r
18 #define WTC_IN_TICK     2               /* Clear Watchdog in TICK Hook */\r
19 #define WTC_IN_IDLE     3               /* Clear Watchdog in Idle Hook */\r
20 \r
21 #define WATCHDOG WTC_IN_TASK    /* Clear Watchdog in vWatchdogTask() */\r
22 /*------------------------------------------------------------------------*/\r
23 /* \r
24  * Watchdog period defines\r
25  */\r
26 #define WTC_PER_2_16    0       /* The watchdog period is 2^16 CLKRC cycles */\r
27 #define WTC_PER_2_17    1       /* The watchdog period is 2^17 CLKRC cycles */\r
28 #define WTC_PER_2_18    2       /* The watchdog period is 2^18 CLKRC cycles */\r
29 #define WTC_PER_2_19    3       /* The watchdog period is 2^19 CLKRC cycles */\r
30 /*------------------------------------------------------------------------*/\r
31 /* \r
32  * After every WTC_CLR_PER ticks the watchdog would be cleared in the prvWatchdogTask(). \r
33  * This period needs to be chosen in accordance with the current CLKRC (100KHz or 2MHz)\r
34  * and the above setting WTC_PER_2_XX.\r
35  */\r
36 #define WTC_CLR_PER             30      /* The watchdog clear period in RTOS ticks */\r
37 /*------------------------------------------------------------------------*/\r
38 /* \r
39  * Kick_watchdog Macro to clear watchdog \r
40  */\r
41 #define Kick_Watchdog()                                                 \\r
42         {               HWWD = 0x10;                                            \\r
43         }\r
44 /*------------------------------------------------------------------------*/\r
45 /* \r
46  * Watchdog function declarations \r
47  */\r
48 void InitWatchdog (void);\r
49 void vStartWatchdogTask(unsigned short);\r
50 \r
51 #endif\r
52 \r