]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/low_level_init.c
Update CEC1302 peripheral library version.
[freertos] / FreeRTOS / Demo / MSP430X_MSP430F5438_IAR / low_level_init.c
1 /**************************************************\r
2  *\r
3  * This is a template for early application low-level initialization.\r
4  *\r
5  * Copyright 1996-2010 IAR Systems AB.\r
6  *\r
7  * $Revision: 5993 $\r
8  *\r
9  **************************************************/\r
10 \r
11 /*\r
12  * The function __low_level_init it called by the start-up code before\r
13  * "main" is called, and before data segment initialization is\r
14  * performed.\r
15  *\r
16  * This is a template file, modify to perform any initialization that\r
17  * should take place early.\r
18  *\r
19  * The return value of this function controls if data segment\r
20  * initialization should take place. If 0 is returned, it is bypassed.\r
21  *\r
22  * For the MSP430 microcontroller family, please consider disabling\r
23  * the watchdog timer here, as it could time-out during the data\r
24  * segment initialization.\r
25  */\r
26 \r
27 /*\r
28  * To disable the watchdog timer, include a suitable device header\r
29  * file (or "msp430.h") and add the following line to the function\r
30  * below:\r
31  *\r
32  *     WDTCTL = WDTPW+WDTHOLD;\r
33  *\r
34  */\r
35 \r
36 \r
37 #include <intrinsics.h>\r
38 #include "msp430.h"\r
39 \r
40 int __low_level_init(void)\r
41 {\r
42   /* Insert your low-level initializations here */\r
43   _DINT();\r
44   WDTCTL = WDTPW+WDTHOLD;\r
45 \r
46 \r
47   /*\r
48    * Return value:\r
49    *\r
50    *  1 - Perform data segment initialization.\r
51    *  0 - Skip data segment initialization.\r
52    */\r
53 \r
54   return 1;\r
55 }\r