Mouse code for the MacroRat
mbed-dev/targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFR32MG1/device/system_efr32mg1p.h@18:6a4db94011d3, 2017-05-14 (annotated)
- Committer:
- sahilmgandhi
- Date:
- Sun May 14 23:18:57 2017 +0000
- Revision:
- 18:6a4db94011d3
Publishing again
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sahilmgandhi | 18:6a4db94011d3 | 1 | /***************************************************************************//** |
sahilmgandhi | 18:6a4db94011d3 | 2 | * @file system_efr32mg1p.h |
sahilmgandhi | 18:6a4db94011d3 | 3 | * @brief CMSIS Cortex-M3/M4 System Layer for EFR32 devices. |
sahilmgandhi | 18:6a4db94011d3 | 4 | * @version 5.1.2 |
sahilmgandhi | 18:6a4db94011d3 | 5 | ****************************************************************************** |
sahilmgandhi | 18:6a4db94011d3 | 6 | * @section License |
sahilmgandhi | 18:6a4db94011d3 | 7 | * <b>Copyright 2017 Silicon Laboratories, Inc. http://www.silabs.com</b> |
sahilmgandhi | 18:6a4db94011d3 | 8 | ****************************************************************************** |
sahilmgandhi | 18:6a4db94011d3 | 9 | * |
sahilmgandhi | 18:6a4db94011d3 | 10 | * Permission is granted to anyone to use this software for any purpose, |
sahilmgandhi | 18:6a4db94011d3 | 11 | * including commercial applications, and to alter it and redistribute it |
sahilmgandhi | 18:6a4db94011d3 | 12 | * freely, subject to the following restrictions: |
sahilmgandhi | 18:6a4db94011d3 | 13 | * |
sahilmgandhi | 18:6a4db94011d3 | 14 | * 1. The origin of this software must not be misrepresented; you must not |
sahilmgandhi | 18:6a4db94011d3 | 15 | * claim that you wrote the original software.@n |
sahilmgandhi | 18:6a4db94011d3 | 16 | * 2. Altered source versions must be plainly marked as such, and must not be |
sahilmgandhi | 18:6a4db94011d3 | 17 | * misrepresented as being the original software.@n |
sahilmgandhi | 18:6a4db94011d3 | 18 | * 3. This notice may not be removed or altered from any source distribution. |
sahilmgandhi | 18:6a4db94011d3 | 19 | * |
sahilmgandhi | 18:6a4db94011d3 | 20 | * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Laboratories, Inc. |
sahilmgandhi | 18:6a4db94011d3 | 21 | * has no obligation to support this Software. Silicon Laboratories, Inc. is |
sahilmgandhi | 18:6a4db94011d3 | 22 | * providing the Software "AS IS", with no express or implied warranties of any |
sahilmgandhi | 18:6a4db94011d3 | 23 | * kind, including, but not limited to, any implied warranties of |
sahilmgandhi | 18:6a4db94011d3 | 24 | * merchantability or fitness for any particular purpose or warranties against |
sahilmgandhi | 18:6a4db94011d3 | 25 | * infringement of any proprietary rights of a third party. |
sahilmgandhi | 18:6a4db94011d3 | 26 | * |
sahilmgandhi | 18:6a4db94011d3 | 27 | * Silicon Laboratories, Inc. will not be liable for any consequential, |
sahilmgandhi | 18:6a4db94011d3 | 28 | * incidental, or special damages, or any other relief, or for any claim by |
sahilmgandhi | 18:6a4db94011d3 | 29 | * any third party, arising from your use of this Software. |
sahilmgandhi | 18:6a4db94011d3 | 30 | * |
sahilmgandhi | 18:6a4db94011d3 | 31 | *****************************************************************************/ |
sahilmgandhi | 18:6a4db94011d3 | 32 | |
sahilmgandhi | 18:6a4db94011d3 | 33 | #ifndef SYSTEM_EFR32_H |
sahilmgandhi | 18:6a4db94011d3 | 34 | #define SYSTEM_EFR32_H |
sahilmgandhi | 18:6a4db94011d3 | 35 | |
sahilmgandhi | 18:6a4db94011d3 | 36 | #ifdef __cplusplus |
sahilmgandhi | 18:6a4db94011d3 | 37 | extern "C" { |
sahilmgandhi | 18:6a4db94011d3 | 38 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 39 | |
sahilmgandhi | 18:6a4db94011d3 | 40 | #include <stdint.h> |
sahilmgandhi | 18:6a4db94011d3 | 41 | |
sahilmgandhi | 18:6a4db94011d3 | 42 | /******************************************************************************* |
sahilmgandhi | 18:6a4db94011d3 | 43 | ************************** GLOBAL VARIABLES ******************************* |
sahilmgandhi | 18:6a4db94011d3 | 44 | ******************************************************************************/ |
sahilmgandhi | 18:6a4db94011d3 | 45 | |
sahilmgandhi | 18:6a4db94011d3 | 46 | extern uint32_t SystemCoreClock; /**< System Clock Frequency (Core Clock) */ |
sahilmgandhi | 18:6a4db94011d3 | 47 | extern uint32_t SystemHfrcoFreq; /**< System HFRCO frequency */ |
sahilmgandhi | 18:6a4db94011d3 | 48 | |
sahilmgandhi | 18:6a4db94011d3 | 49 | /******************************************************************************* |
sahilmgandhi | 18:6a4db94011d3 | 50 | ***************************** PROTOTYPES ********************************** |
sahilmgandhi | 18:6a4db94011d3 | 51 | ******************************************************************************/ |
sahilmgandhi | 18:6a4db94011d3 | 52 | |
sahilmgandhi | 18:6a4db94011d3 | 53 | void Reset_Handler(void); |
sahilmgandhi | 18:6a4db94011d3 | 54 | void NMI_Handler(void); |
sahilmgandhi | 18:6a4db94011d3 | 55 | void HardFault_Handler(void); |
sahilmgandhi | 18:6a4db94011d3 | 56 | void MemManage_Handler(void); |
sahilmgandhi | 18:6a4db94011d3 | 57 | void BusFault_Handler(void); |
sahilmgandhi | 18:6a4db94011d3 | 58 | void UsageFault_Handler(void); |
sahilmgandhi | 18:6a4db94011d3 | 59 | void SVC_Handler(void); |
sahilmgandhi | 18:6a4db94011d3 | 60 | void DebugMon_Handler(void); |
sahilmgandhi | 18:6a4db94011d3 | 61 | void PendSV_Handler(void); |
sahilmgandhi | 18:6a4db94011d3 | 62 | void SysTick_Handler(void); |
sahilmgandhi | 18:6a4db94011d3 | 63 | |
sahilmgandhi | 18:6a4db94011d3 | 64 | void EMU_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 65 | void FRC_PRI_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 66 | void WDOG0_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 67 | void FRC_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 68 | void MODEM_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 69 | void RAC_SEQ_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 70 | void RAC_RSM_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 71 | void BUFC_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 72 | void LDMA_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 73 | void GPIO_EVEN_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 74 | void TIMER0_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 75 | void USART0_RX_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 76 | void USART0_TX_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 77 | void ACMP0_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 78 | void ADC0_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 79 | void IDAC0_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 80 | void I2C0_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 81 | void GPIO_ODD_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 82 | void TIMER1_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 83 | void USART1_RX_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 84 | void USART1_TX_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 85 | void LEUART0_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 86 | void PCNT0_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 87 | void CMU_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 88 | void MSC_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 89 | void CRYPTO_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 90 | void LETIMER0_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 91 | void AGC_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 92 | void PROTIMER_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 93 | void RTCC_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 94 | void SYNTH_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 95 | void CRYOTIMER_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 96 | void RFSENSE_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 97 | |
sahilmgandhi | 18:6a4db94011d3 | 98 | #if (__FPU_PRESENT == 1) |
sahilmgandhi | 18:6a4db94011d3 | 99 | void FPUEH_IRQHandler(void); |
sahilmgandhi | 18:6a4db94011d3 | 100 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 101 | |
sahilmgandhi | 18:6a4db94011d3 | 102 | uint32_t SystemCoreClockGet(void); |
sahilmgandhi | 18:6a4db94011d3 | 103 | |
sahilmgandhi | 18:6a4db94011d3 | 104 | /**************************************************************************//** |
sahilmgandhi | 18:6a4db94011d3 | 105 | * @brief |
sahilmgandhi | 18:6a4db94011d3 | 106 | * Update CMSIS SystemCoreClock variable. |
sahilmgandhi | 18:6a4db94011d3 | 107 | * |
sahilmgandhi | 18:6a4db94011d3 | 108 | * @details |
sahilmgandhi | 18:6a4db94011d3 | 109 | * CMSIS defines a global variable SystemCoreClock that shall hold the |
sahilmgandhi | 18:6a4db94011d3 | 110 | * core frequency in Hz. If the core frequency is dynamically changed, the |
sahilmgandhi | 18:6a4db94011d3 | 111 | * variable must be kept updated in order to be CMSIS compliant. |
sahilmgandhi | 18:6a4db94011d3 | 112 | * |
sahilmgandhi | 18:6a4db94011d3 | 113 | * Notice that only if changing the core clock frequency through the EFR CMU |
sahilmgandhi | 18:6a4db94011d3 | 114 | * API, this variable will be kept updated. This function is only provided |
sahilmgandhi | 18:6a4db94011d3 | 115 | * for CMSIS compliance and if a user modifies the the core clock outside |
sahilmgandhi | 18:6a4db94011d3 | 116 | * the CMU API. |
sahilmgandhi | 18:6a4db94011d3 | 117 | *****************************************************************************/ |
sahilmgandhi | 18:6a4db94011d3 | 118 | static __INLINE void SystemCoreClockUpdate(void) |
sahilmgandhi | 18:6a4db94011d3 | 119 | { |
sahilmgandhi | 18:6a4db94011d3 | 120 | SystemCoreClockGet(); |
sahilmgandhi | 18:6a4db94011d3 | 121 | } |
sahilmgandhi | 18:6a4db94011d3 | 122 | |
sahilmgandhi | 18:6a4db94011d3 | 123 | uint32_t SystemMaxCoreClockGet(void); |
sahilmgandhi | 18:6a4db94011d3 | 124 | |
sahilmgandhi | 18:6a4db94011d3 | 125 | void SystemInit(void); |
sahilmgandhi | 18:6a4db94011d3 | 126 | uint32_t SystemHFClockGet(void); |
sahilmgandhi | 18:6a4db94011d3 | 127 | |
sahilmgandhi | 18:6a4db94011d3 | 128 | uint32_t SystemHFXOClockGet(void); |
sahilmgandhi | 18:6a4db94011d3 | 129 | void SystemHFXOClockSet(uint32_t freq); |
sahilmgandhi | 18:6a4db94011d3 | 130 | |
sahilmgandhi | 18:6a4db94011d3 | 131 | uint32_t SystemLFRCOClockGet(void); |
sahilmgandhi | 18:6a4db94011d3 | 132 | uint32_t SystemULFRCOClockGet(void); |
sahilmgandhi | 18:6a4db94011d3 | 133 | |
sahilmgandhi | 18:6a4db94011d3 | 134 | uint32_t SystemLFXOClockGet(void); |
sahilmgandhi | 18:6a4db94011d3 | 135 | void SystemLFXOClockSet(uint32_t freq); |
sahilmgandhi | 18:6a4db94011d3 | 136 | |
sahilmgandhi | 18:6a4db94011d3 | 137 | #ifdef __cplusplus |
sahilmgandhi | 18:6a4db94011d3 | 138 | } |
sahilmgandhi | 18:6a4db94011d3 | 139 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 140 | #endif /* SYSTEM_EFR32_H */ |