]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/bsp/dvk.c
Preparing for V9.0.0 formal release:
[freertos] / FreeRTOS / Demo / CORTEX_EFMG890F128_IAR / bsp / dvk.c
1 /**************************************************************************//**\r
2  * @file\r
3  * @brief DVK board support package, initialization\r
4  * @author Energy Micro AS\r
5  * @version 1.0.1\r
6  ******************************************************************************\r
7  * @section License\r
8  * <b>(C) Copyright 2009 Energy Micro AS, http://www.energymicro.com</b>\r
9  ******************************************************************************\r
10  *\r
11  * This source code is the property of Energy Micro AS. The source and compiled\r
12  * code may only be used on Energy Micro "EFM32" microcontrollers.\r
13  *\r
14  * This copyright notice may not be removed from the source code nor changed.\r
15  *\r
16  * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no\r
17  * obligation to support this Software. Energy Micro AS is providing the\r
18  * Software "AS IS", with no express or implied warranties of any kind,\r
19  * including, but not limited to, any implied warranties of merchantability\r
20  * or fitness for any particular purpose or warranties against infringement\r
21  * of any proprietary rights of a third party.\r
22  *\r
23  * Energy Micro AS will not be liable for any consequential, incidental, or\r
24  * special damages, or any other relief, or for any claim by any third party,\r
25  * arising from your use of this Software.\r
26  *\r
27  *****************************************************************************/\r
28 \r
29 #include "efm32.h"\r
30 #include "dvk.h"\r
31 \r
32 /**************************************************************************//**\r
33  * @brief  Initializes DVK, configures board control access\r
34  *****************************************************************************/\r
35 void DVK_init(void)\r
36 {\r
37 #ifdef DVK_EBI_CONTROL\r
38   DVK_EBI_init();\r
39 #endif\r
40 #ifdef DVK_SPI_CONTROL\r
41   DVK_SPI_init();\r
42 #endif\r
43   /* Inform AEM application that we are in Energy Mode 0 by default */\r
44   DVK_setEnergyMode(0);\r
45 }\r
46 \r
47 /**************************************************************************//**\r
48  * @brief  Disables DVK, free up resources\r
49  *****************************************************************************/\r
50 void DVK_disable(void)\r
51 {\r
52 #ifdef DVK_EBI_CONTROL\r
53   /* Handover bus control */\r
54   DVK_disableBus();\r
55   /* Disable EBI interface */\r
56   DVK_EBI_disable();\r
57 #endif\r
58 \r
59 #ifdef DVK_SPI_CONTROL\r
60   DVK_SPI_disable();\r
61 #endif\r
62 }\r