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