]> git.sur5r.net Git - freertos/blob - Demo/MB91460_Softune/SRC/watchdog/watchdog.h
Add MB91460 port and demo files.
[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  * Clear watchdog defines \r
11  */\r
12 #define WTC_NONE        0               /* Don't initialize and clear watchdog */\r
13 #define WTC_IN_TASK     1               /* Clear Watchdog in dedicated task */\r
14 #define WTC_IN_TICK     2               /* Clear Watchdog in TICK Hook */\r
15 #define WTC_IN_IDLE     3               /* Clear Watchdog in Idle Hook */\r
16 \r
17 #define WATCHDOG WTC_IN_TASK    /* Clear Watchdog in vWatchdogTask() */\r
18 /*------------------------------------------------------------------------*/\r
19 /* \r
20  * Watchdog period defines\r
21  */\r
22 #define WTC_PER_2_16    0       /* The watchdog period is 2^16 CLKRC cycles */\r
23 #define WTC_PER_2_17    1       /* The watchdog period is 2^17 CLKRC cycles */\r
24 #define WTC_PER_2_18    2       /* The watchdog period is 2^18 CLKRC cycles */\r
25 #define WTC_PER_2_19    3       /* The watchdog period is 2^19 CLKRC cycles */\r
26 /*------------------------------------------------------------------------*/\r
27 /* \r
28  * After every WTC_CLR_PER ticks the watchdog would be cleared in the prvWatchdogTask(). \r
29  * This period needs to be chosen in accordance with the current CLKRC (100KHz or 2MHz)\r
30  * and the above setting WTC_PER_2_XX.\r
31  */\r
32 #define WTC_CLR_PER             30      /* The watchdog clear period in RTOS ticks */\r
33 /*------------------------------------------------------------------------*/\r
34 /* \r
35  * Kick_watchdog Macro to clear watchdog \r
36  */\r
37 #define Kick_Watchdog()                                                 \\r
38         {               HWWD = 0x10;                                            \\r
39         }\r
40 /*------------------------------------------------------------------------*/\r
41 /* \r
42  * Watchdog function declarations \r
43  */\r
44 void InitWatchdog (void);\r
45 void vStartWatchdogTask(unsigned portSHORT);\r
46 \r