]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_EFM32_Gecko_Starter_Kit_Simplicity_Studio/Source/SilLabs_Code/Device/SiliconLabs/EFM32PG1B/Include/system_efm32pg1b.h
Add Pearl Gecko demo.
[freertos] / FreeRTOS / Demo / CORTEX_EFM32_Gecko_Starter_Kit_Simplicity_Studio / Source / SilLabs_Code / Device / SiliconLabs / EFM32PG1B / Include / system_efm32pg1b.h
1 /***************************************************************************//**\r
2  * @file system_efm32pg1b.h\r
3  * @brief CMSIS Cortex-M3/M4 System Layer for EFM32 devices.\r
4  * @version 4.2.1\r
5  ******************************************************************************\r
6  * @section License\r
7  * <b>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 SYSTEM_EFM32_H\r
34 #define SYSTEM_EFM32_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 extern uint32_t SystemHfrcoFreq;        /**< System HFRCO frequency */\r
48 \r
49 /*******************************************************************************\r
50  *****************************   PROTOTYPES   **********************************\r
51  ******************************************************************************/\r
52 \r
53 void Reset_Handler(void);\r
54 void NMI_Handler(void);\r
55 void HardFault_Handler(void);\r
56 void MemManage_Handler(void);\r
57 void BusFault_Handler(void);\r
58 void UsageFault_Handler(void);\r
59 void SVC_Handler(void);\r
60 void DebugMon_Handler(void);\r
61 void PendSV_Handler(void);\r
62 void SysTick_Handler(void);\r
63 \r
64 void EMU_IRQHandler(void);\r
65 void WDOG_IRQHandler(void);\r
66 void LDMA_IRQHandler(void);\r
67 void GPIO_EVEN_IRQHandler(void);\r
68 void TIMER0_IRQHandler(void);\r
69 void USART0_RX_IRQHandler(void);\r
70 void USART0_TX_IRQHandler(void);\r
71 void ACMP0_IRQHandler(void);\r
72 void ADC0_IRQHandler(void);\r
73 void IDAC0_IRQHandler(void);\r
74 void I2C0_IRQHandler(void);\r
75 void GPIO_ODD_IRQHandler(void);\r
76 void TIMER1_IRQHandler(void);\r
77 void USART1_RX_IRQHandler(void);\r
78 void USART1_TX_IRQHandler(void);\r
79 void LEUART0_IRQHandler(void);\r
80 void PCNT0_IRQHandler(void);\r
81 void CMU_IRQHandler(void);\r
82 void MSC_IRQHandler(void);\r
83 void LETIMER0_IRQHandler(void);\r
84 void RTCC_IRQHandler(void);\r
85 void CRYOTIMER_IRQHandler(void);\r
86 \r
87 #if (__FPU_PRESENT == 1)\r
88 void FPUEH_IRQHandler(void);\r
89 #endif\r
90 \r
91 uint32_t SystemCoreClockGet(void);\r
92 \r
93 /**************************************************************************//**\r
94  * @brief\r
95  *   Update CMSIS SystemCoreClock variable.\r
96  *\r
97  * @details\r
98  *   CMSIS defines a global variable SystemCoreClock that shall hold the\r
99  *   core frequency in Hz. If the core frequency is dynamically changed, the\r
100  *   variable must be kept updated in order to be CMSIS compliant.\r
101  *\r
102  *   Notice that only if changing the core clock frequency through the EFM CMU\r
103  *   API, this variable will be kept updated. This function is only provided\r
104  *   for CMSIS compliance and if a user modifies the the core clock outside\r
105  *   the CMU API.\r
106  *****************************************************************************/\r
107 static __INLINE void SystemCoreClockUpdate(void)\r
108 {\r
109   SystemCoreClockGet();\r
110 }\r
111 \r
112 uint32_t SystemMaxCoreClockGet(void);\r
113 \r
114 void SystemInit(void);\r
115 uint32_t SystemHFClockGet(void);\r
116 \r
117 uint32_t SystemHFXOClockGet(void);\r
118 void SystemHFXOClockSet(uint32_t freq);\r
119 \r
120 uint32_t SystemLFRCOClockGet(void);\r
121 uint32_t SystemULFRCOClockGet(void);\r
122 \r
123 uint32_t SystemLFXOClockGet(void);\r
124 void SystemLFXOClockSet(uint32_t freq);\r
125 \r
126 #ifdef __cplusplus\r
127 }\r
128 #endif\r
129 #endif /* SYSTEM_EFM32_H */\r