]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_EFM32_Gecko_Starter_Kit_Simplicity_Studio/Source/SilLabs_Code/Device/SiliconLabs/EFM32GG/Include/system_efm32gg.h
746303e14fb3d35c2c8c4c610ac8ef6452aa4946
[freertos] / FreeRTOS / Demo / CORTEX_EFM32_Gecko_Starter_Kit_Simplicity_Studio / Source / SilLabs_Code / Device / SiliconLabs / EFM32GG / Include / system_efm32gg.h
1 /***************************************************************************//**\r
2  * @file system_efm32gg.h\r
3  * @brief CMSIS Cortex-M3 System Layer for EFM32GG devices.\r
4  * @version 4.0.0\r
5  ******************************************************************************\r
6  * @section License\r
7  * <b>(C) Copyright 2015 Silicon Laboratories, Inc. http://www.silabs.com</b>\r
8  ******************************************************************************\r
9  *\r
10  * Permission is granted to anyone to use this software for any purpose,\r
11  * including commercial applications, and to alter it and redistribute it\r
12  * freely, subject to the following restrictions:\r
13  *\r
14  * 1. The origin of this software must not be misrepresented; you must not\r
15  *    claim that you wrote the original software.@n\r
16  * 2. Altered source versions must be plainly marked as such, and must not be\r
17  *    misrepresented as being the original software.@n\r
18  * 3. This notice may not be removed or altered from any source distribution.\r
19  *\r
20  * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Laboratories, Inc.\r
21  * has no obligation to support this Software. Silicon Laboratories, Inc. is\r
22  * providing the Software "AS IS", with no express or implied warranties of any\r
23  * kind, including, but not limited to, any implied warranties of\r
24  * merchantability or fitness for any particular purpose or warranties against\r
25  * infringement of any proprietary rights of a third party.\r
26  *\r
27  * Silicon Laboratories, Inc. will not be liable for any consequential,\r
28  * incidental, or special damages, or any other relief, or for any claim by\r
29  * any third party, arising from your use of this Software.\r
30  *\r
31  *****************************************************************************/\r
32 \r
33 #ifndef __SILICON_LABS_SYSTEM_EFM32GG_H__\r
34 #define __SILICON_LABS_SYSTEM_EFM32GG_H__\r
35 \r
36 #ifdef __cplusplus\r
37 extern "C" {\r
38 #endif\r
39 \r
40 #include <stdint.h>\r
41 \r
42 /*******************************************************************************\r
43  **************************   GLOBAL VARIABLES   *******************************\r
44  ******************************************************************************/\r
45 \r
46 extern uint32_t SystemCoreClock;    /**< System Clock Frequency (Core Clock) */\r
47 \r
48 /*******************************************************************************\r
49  *****************************   PROTOTYPES   **********************************\r
50  ******************************************************************************/\r
51 \r
52 /* Interrupt routines - prototypes */\r
53 #if defined(_EFM32_GIANT_FAMILY)\r
54 void Reset_Handler(void);\r
55 void NMI_Handler(void);\r
56 void HardFault_Handler(void);\r
57 void MemManage_Handler(void);\r
58 void BusFault_Handler(void);\r
59 void UsageFault_Handler(void);\r
60 void SVC_Handler(void);\r
61 void DebugMon_Handler(void);\r
62 void PendSV_Handler(void);\r
63 void SysTick_Handler(void);\r
64 void DMA_IRQHandler(void);\r
65 void GPIO_EVEN_IRQHandler(void);\r
66 void TIMER0_IRQHandler(void);\r
67 void USART0_RX_IRQHandler(void);\r
68 void USART0_TX_IRQHandler(void);\r
69 void USB_IRQHandler(void);\r
70 void ACMP0_IRQHandler(void);\r
71 void ADC0_IRQHandler(void);\r
72 void DAC0_IRQHandler(void);\r
73 void I2C0_IRQHandler(void);\r
74 void I2C1_IRQHandler(void);\r
75 void GPIO_ODD_IRQHandler(void);\r
76 void TIMER1_IRQHandler(void);\r
77 void TIMER2_IRQHandler(void);\r
78 void TIMER3_IRQHandler(void);\r
79 void USART1_RX_IRQHandler(void);\r
80 void USART1_TX_IRQHandler(void);\r
81 void LESENSE_IRQHandler(void);\r
82 void USART2_RX_IRQHandler(void);\r
83 void USART2_TX_IRQHandler(void);\r
84 void UART0_RX_IRQHandler(void);\r
85 void UART0_TX_IRQHandler(void);\r
86 void UART1_RX_IRQHandler(void);\r
87 void UART1_TX_IRQHandler(void);\r
88 void LEUART0_IRQHandler(void);\r
89 void LEUART1_IRQHandler(void);\r
90 void LETIMER0_IRQHandler(void);\r
91 void PCNT0_IRQHandler(void);\r
92 void PCNT1_IRQHandler(void);\r
93 void PCNT2_IRQHandler(void);\r
94 void RTC_IRQHandler(void);\r
95 void BURTC_IRQHandler(void);\r
96 void CMU_IRQHandler(void);\r
97 void VCMP_IRQHandler(void);\r
98 void LCD_IRQHandler(void);\r
99 void MSC_IRQHandler(void);\r
100 void AES_IRQHandler(void);\r
101 void EBI_IRQHandler(void);\r
102 void EMU_IRQHandler(void);\r
103 #endif\r
104 \r
105 uint32_t SystemCoreClockGet(void);\r
106 \r
107 /**************************************************************************//**\r
108  * @brief\r
109  *   Update CMSIS SystemCoreClock variable.\r
110  *\r
111  * @details\r
112  *   CMSIS defines a global variable SystemCoreClock that shall hold the\r
113  *   core frequency in Hz. If the core frequency is dynamically changed, the\r
114  *   variable must be kept updated in order to be CMSIS compliant.\r
115  *\r
116  *   Notice that if only changing core clock frequency through the EFM32 CMU\r
117  *   API, this variable will be kept updated. This function is only provided\r
118  *   for CMSIS compliance and if a user modifies the the core clock outside\r
119  *   the CMU API.\r
120  *****************************************************************************/\r
121 static __INLINE void SystemCoreClockUpdate(void)\r
122 {\r
123   SystemCoreClockGet();\r
124 }\r
125 \r
126 void SystemInit(void);\r
127 uint32_t SystemHFClockGet(void);\r
128 uint32_t SystemHFXOClockGet(void);\r
129 void SystemHFXOClockSet(uint32_t freq);\r
130 uint32_t SystemLFRCOClockGet(void);\r
131 uint32_t SystemULFRCOClockGet(void);\r
132 uint32_t SystemLFXOClockGet(void);\r
133 void SystemLFXOClockSet(uint32_t freq);\r
134 \r
135 #ifdef __cplusplus\r
136 }\r
137 #endif\r
138 #endif /* __SILICON_LABS_SYSTEM_EFM32GG_H__ */\r