1
0

efm32g890f32.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  1. /**************************************************************************//**
  2. * @file
  3. * @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
  4. * for EFM EFM32G890F32
  5. * @author Energy Micro AS
  6. * @version 3.0.0
  7. ******************************************************************************
  8. * @section License
  9. * <b>(C) Copyright 2012 Energy Micro AS, http://www.energymicro.com</b>
  10. ******************************************************************************
  11. *
  12. * Permission is granted to anyone to use this software for any purpose,
  13. * including commercial applications, and to alter it and redistribute it
  14. * freely, subject to the following restrictions:
  15. *
  16. * 1. The origin of this software must not be misrepresented; you must not
  17. * claim that you wrote the original software.
  18. * 2. Altered source versions must be plainly marked as such, and must not be
  19. * misrepresented as being the original software.
  20. * 3. This notice may not be removed or altered from any source distribution.
  21. *
  22. * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
  23. * obligation to support this Software. Energy Micro AS is providing the
  24. * Software "AS IS", with no express or implied warranties of any kind,
  25. * including, but not limited to, any implied warranties of merchantability
  26. * or fitness for any particular purpose or warranties against infringement
  27. * of any proprietary rights of a third party.
  28. *
  29. * Energy Micro AS will not be liable for any consequential, incidental, or
  30. * special damages, or any other relief, or for any claim by any third party,
  31. * arising from your use of this Software.
  32. *
  33. *****************************************************************************/
  34. #ifndef __EFM32G890F32_H
  35. #define __EFM32G890F32_H
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39. /**************************************************************************//**
  40. * @addtogroup Parts
  41. * @{
  42. *****************************************************************************/
  43. /**************************************************************************//**
  44. * @defgroup EFM32G890F32 EFM32G890F32
  45. * @{
  46. *****************************************************************************/
  47. /** Interrupt Number Definition */
  48. typedef enum IRQn
  49. {
  50. /****** Cortex-M3 Processor Exceptions Numbers *******************************************/
  51. NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt */
  52. HardFault_IRQn = -13, /*!< 3 Cortex-M3 Hard Fault Interrupt */
  53. MemoryManagement_IRQn = -12, /*!< 4 Cortex-M3 Memory Management Interrupt */
  54. BusFault_IRQn = -11, /*!< 5 Cortex-M3 Bus Fault Interrupt */
  55. UsageFault_IRQn = -10, /*!< 6 Cortex-M3 Usage Fault Interrupt */
  56. SVCall_IRQn = -5, /*!< 11 Cortex-M3 SV Call Interrupt */
  57. DebugMonitor_IRQn = -4, /*!< 12 Cortex-M3 Debug Monitor Interrupt */
  58. PendSV_IRQn = -2, /*!< 14 Cortex-M3 Pend SV Interrupt */
  59. SysTick_IRQn = -1, /*!< 15 Cortex-M3 System Tick Interrupt */
  60. /****** EFM32G Peripheral Interrupt Numbers **********************************************/
  61. DMA_IRQn = 0, /*!< 16+0 EFM32 DMA Interrupt */
  62. GPIO_EVEN_IRQn = 1, /*!< 16+1 EFM32 GPIO_EVEN Interrupt */
  63. TIMER0_IRQn = 2, /*!< 16+2 EFM32 TIMER0 Interrupt */
  64. USART0_RX_IRQn = 3, /*!< 16+3 EFM32 USART0_RX Interrupt */
  65. USART0_TX_IRQn = 4, /*!< 16+4 EFM32 USART0_TX Interrupt */
  66. ACMP0_IRQn = 5, /*!< 16+5 EFM32 ACMP0 Interrupt */
  67. ADC0_IRQn = 6, /*!< 16+6 EFM32 ADC0 Interrupt */
  68. DAC0_IRQn = 7, /*!< 16+7 EFM32 DAC0 Interrupt */
  69. I2C0_IRQn = 8, /*!< 16+8 EFM32 I2C0 Interrupt */
  70. GPIO_ODD_IRQn = 9, /*!< 16+9 EFM32 GPIO_ODD Interrupt */
  71. TIMER1_IRQn = 10, /*!< 16+10 EFM32 TIMER1 Interrupt */
  72. TIMER2_IRQn = 11, /*!< 16+11 EFM32 TIMER2 Interrupt */
  73. USART1_RX_IRQn = 12, /*!< 16+12 EFM32 USART1_RX Interrupt */
  74. USART1_TX_IRQn = 13, /*!< 16+13 EFM32 USART1_TX Interrupt */
  75. USART2_RX_IRQn = 14, /*!< 16+14 EFM32 USART2_RX Interrupt */
  76. USART2_TX_IRQn = 15, /*!< 16+15 EFM32 USART2_TX Interrupt */
  77. UART0_RX_IRQn = 16, /*!< 16+16 EFM32 UART0_RX Interrupt */
  78. UART0_TX_IRQn = 17, /*!< 16+17 EFM32 UART0_TX Interrupt */
  79. LEUART0_IRQn = 18, /*!< 16+18 EFM32 LEUART0 Interrupt */
  80. LEUART1_IRQn = 19, /*!< 16+19 EFM32 LEUART1 Interrupt */
  81. LETIMER0_IRQn = 20, /*!< 16+20 EFM32 LETIMER0 Interrupt */
  82. PCNT0_IRQn = 21, /*!< 16+21 EFM32 PCNT0 Interrupt */
  83. PCNT1_IRQn = 22, /*!< 16+22 EFM32 PCNT1 Interrupt */
  84. PCNT2_IRQn = 23, /*!< 16+23 EFM32 PCNT2 Interrupt */
  85. RTC_IRQn = 24, /*!< 16+24 EFM32 RTC Interrupt */
  86. CMU_IRQn = 25, /*!< 16+25 EFM32 CMU Interrupt */
  87. VCMP_IRQn = 26, /*!< 16+26 EFM32 VCMP Interrupt */
  88. LCD_IRQn = 27, /*!< 16+27 EFM32 LCD Interrupt */
  89. MSC_IRQn = 28, /*!< 16+28 EFM32 MSC Interrupt */
  90. AES_IRQn = 29, /*!< 16+29 EFM32 AES Interrupt */
  91. } IRQn_Type;
  92. /**************************************************************************//**
  93. * @defgroup EFM32G890F32_Core EFM32G890F32 Core
  94. * @{
  95. * @brief Processor and Core Peripheral Section
  96. *****************************************************************************/
  97. #define __MPU_PRESENT 1 /**< Presence of MPU */
  98. #define __NVIC_PRIO_BITS 3 /**< NVIC interrupt priority bits */
  99. #define __Vendor_SysTickConfig 0 /**< Is 1 if different SysTick counter is used */
  100. /** @} End of group EFM32G890F32_Core */
  101. /**************************************************************************//**
  102. * @defgroup EFM32G890F32_Part EFM32G890F32 Part
  103. * @{
  104. ******************************************************************************/
  105. /** Part family */
  106. #define _EFM32_GECKO_FAMILY 1 /**< Gecko EFM32G MCU Family */
  107. /* If part number is not defined as compiler option, define it */
  108. #if !defined(EFM32G890F32)
  109. #define EFM32G890F32 1 /**< Gecko Part */
  110. #endif
  111. /** Configure part number */
  112. #define PART_NUMBER "EFM32G890F32" /**< Part Number */
  113. /** Memory Base addresses and limits */
  114. #define EBI_MEM_BASE ((uint32_t) 0x80000000UL) /**< EBI base address */
  115. #define EBI_MEM_SIZE ((uint32_t) 0x10000000UL) /**< EBI available address space */
  116. #define EBI_MEM_END ((uint32_t) 0x8FFFFFFFUL) /**< EBI end address */
  117. #define EBI_MEM_BITS ((uint32_t) 0x28UL) /**< EBI used bits */
  118. #define AES_MEM_BASE ((uint32_t) 0x400E0000UL) /**< AES base address */
  119. #define AES_MEM_SIZE ((uint32_t) 0x400UL) /**< AES available address space */
  120. #define AES_MEM_END ((uint32_t) 0x400E03FFUL) /**< AES end address */
  121. #define AES_MEM_BITS ((uint32_t) 0x10UL) /**< AES used bits */
  122. #define PER_MEM_BASE ((uint32_t) 0x40000000UL) /**< PER base address */
  123. #define PER_MEM_SIZE ((uint32_t) 0xE0000UL) /**< PER available address space */
  124. #define PER_MEM_END ((uint32_t) 0x400DFFFFUL) /**< PER end address */
  125. #define PER_MEM_BITS ((uint32_t) 0x20UL) /**< PER used bits */
  126. #define RAM_MEM_BASE ((uint32_t) 0x20000000UL) /**< RAM base address */
  127. #define RAM_MEM_SIZE ((uint32_t) 0x8000UL) /**< RAM available address space */
  128. #define RAM_MEM_END ((uint32_t) 0x20007FFFUL) /**< RAM end address */
  129. #define RAM_MEM_BITS ((uint32_t) 0x15UL) /**< RAM used bits */
  130. #define RAM_CODE_MEM_BASE ((uint32_t) 0x10000000UL) /**< RAM_CODE base address */
  131. #define RAM_CODE_MEM_SIZE ((uint32_t) 0x4000UL) /**< RAM_CODE available address space */
  132. #define RAM_CODE_MEM_END ((uint32_t) 0x10003FFFUL) /**< RAM_CODE end address */
  133. #define RAM_CODE_MEM_BITS ((uint32_t) 0x14UL) /**< RAM_CODE used bits */
  134. #define FLASH_MEM_BASE ((uint32_t) 0x0UL) /**< FLASH base address */
  135. #define FLASH_MEM_SIZE ((uint32_t) 0x10000000UL) /**< FLASH available address space */
  136. #define FLASH_MEM_END ((uint32_t) 0xFFFFFFFUL) /**< FLASH end address */
  137. #define FLASH_MEM_BITS ((uint32_t) 0x28UL) /**< FLASH used bits */
  138. /** Bit banding area */
  139. #define BITBAND_PER_BASE ((uint32_t) 0x42000000UL) /**< Peripheral Address Space bit-band area */
  140. #define BITBAND_RAM_BASE ((uint32_t) 0x22000000UL) /**< SRAM Address Space bit-band area */
  141. /** Flash and SRAM limits for EFM32G890F32 */
  142. #define FLASH_BASE (0x00000000UL) /**< Flash Base Address */
  143. #define FLASH_SIZE (0x00008000UL) /**< Available Flash Memory */
  144. #define SRAM_BASE (0x20000000UL) /**< SRAM Base Address */
  145. #define SRAM_SIZE (0x00002000UL) /**< Available SRAM Memory */
  146. #define __CM3_REV 0x200 /**< Cortex-M3 Core revision r2p0 */
  147. #define PRS_CHAN_COUNT 8 /**< Number of PRS channels */
  148. #define DMA_CHAN_COUNT 8 /**< Number of DMA channels */
  149. /* Part number capabilities */
  150. #define TIMER_PRESENT /**< TIMER is available in this part */
  151. #define TIMER_COUNT 3 /**< 3 TIMERs available */
  152. #define USART_PRESENT /**< USART is available in this part */
  153. #define USART_COUNT 3 /**< 3 USARTs available */
  154. #define UART_PRESENT /**< UART is available in this part */
  155. #define UART_COUNT 1 /**< 1 UARTs available */
  156. #define LEUART_PRESENT /**< LEUART is available in this part */
  157. #define LEUART_COUNT 2 /**< 2 LEUARTs available */
  158. #define LETIMER_PRESENT /**< LETIMER is available in this part */
  159. #define LETIMER_COUNT 1 /**< 1 LETIMERs available */
  160. #define PCNT_PRESENT /**< PCNT is available in this part */
  161. #define PCNT_COUNT 3 /**< 3 PCNTs available */
  162. #define I2C_PRESENT /**< I2C is available in this part */
  163. #define I2C_COUNT 1 /**< 1 I2Cs available */
  164. #define ADC_PRESENT /**< ADC is available in this part */
  165. #define ADC_COUNT 1 /**< 1 ADCs available */
  166. #define DAC_PRESENT /**< DAC is available in this part */
  167. #define DAC_COUNT 1 /**< 1 DACs available */
  168. #define ACMP_PRESENT /**< ACMP is available in this part */
  169. #define ACMP_COUNT 2 /**< 2 ACMPs available */
  170. #define LE_PRESENT
  171. #define LE_COUNT 1
  172. #define MSC_PRESENT
  173. #define MSC_COUNT 1
  174. #define EMU_PRESENT
  175. #define EMU_COUNT 1
  176. #define RMU_PRESENT
  177. #define RMU_COUNT 1
  178. #define CMU_PRESENT
  179. #define CMU_COUNT 1
  180. #define AES_PRESENT
  181. #define AES_COUNT 1
  182. #define EBI_PRESENT
  183. #define EBI_COUNT 1
  184. #define GPIO_PRESENT
  185. #define GPIO_COUNT 1
  186. #define PRS_PRESENT
  187. #define PRS_COUNT 1
  188. #define DMA_PRESENT
  189. #define DMA_COUNT 1
  190. #define VCMP_PRESENT
  191. #define VCMP_COUNT 1
  192. #define LCD_PRESENT
  193. #define LCD_COUNT 1
  194. #define RTC_PRESENT
  195. #define RTC_COUNT 1
  196. #define HFXTAL_PRESENT
  197. #define HFXTAL_COUNT 1
  198. #define LFXTAL_PRESENT
  199. #define LFXTAL_COUNT 1
  200. #define WDOG_PRESENT
  201. #define WDOG_COUNT 1
  202. #define DBG_PRESENT
  203. #define DBG_COUNT 1
  204. #include "core_cm3.h" /* Cortex-M3 processor and core peripherals */
  205. #include "system_efm32g.h" /* System Header */
  206. /** @} End of group EFM32G890F32_Part */
  207. /**************************************************************************//**
  208. * @defgroup EFM32G890F32_Peripheral_TypeDefs EFM32G890F32 Peripheral TypeDefs
  209. * @{
  210. * @brief Device Specific Peripheral Register Structures
  211. *****************************************************************************/
  212. #include "efm32g_msc.h"
  213. #include "efm32g_emu.h"
  214. #include "efm32g_rmu.h"
  215. #include "efm32g_cmu.h"
  216. #include "efm32g_aes.h"
  217. #include "efm32g_ebi.h"
  218. #include "efm32g_gpio_p.h"
  219. #include "efm32g_gpio.h"
  220. #include "efm32g_prs_ch.h"
  221. #include "efm32g_prs.h"
  222. #include "efm32g_dma_ch.h"
  223. #include "efm32g_dma.h"
  224. #include "efm32g_timer_cc.h"
  225. #include "efm32g_timer.h"
  226. #include "efm32g_usart.h"
  227. #include "efm32g_leuart.h"
  228. #include "efm32g_letimer.h"
  229. #include "efm32g_pcnt.h"
  230. #include "efm32g_i2c.h"
  231. #include "efm32g_adc.h"
  232. #include "efm32g_dac.h"
  233. #include "efm32g_acmp.h"
  234. #include "efm32g_vcmp.h"
  235. #include "efm32g_lcd.h"
  236. #include "efm32g_rtc.h"
  237. #include "efm32g_wdog.h"
  238. #include "efm32g_dma_descriptor.h"
  239. #include "efm32g_devinfo.h"
  240. #include "efm32g_romtable.h"
  241. #include "efm32g_calibrate.h"
  242. /** @} End of group EFM32G890F32_Peripheral_TypeDefs */
  243. /**************************************************************************//**
  244. * @defgroup EFM32G890F32_Peripheral_Base EFM32G890F32 Peripheral Memory Map
  245. * @{
  246. *****************************************************************************/
  247. #define MSC_BASE (0x400C0000UL) /**< MSC base address */
  248. #define EMU_BASE (0x400C6000UL) /**< EMU base address */
  249. #define RMU_BASE (0x400CA000UL) /**< RMU base address */
  250. #define CMU_BASE (0x400C8000UL) /**< CMU base address */
  251. #define AES_BASE (0x400E0000UL) /**< AES base address */
  252. #define EBI_BASE (0x40008000UL) /**< EBI base address */
  253. #define GPIO_BASE (0x40006000UL) /**< GPIO base address */
  254. #define PRS_BASE (0x400CC000UL) /**< PRS base address */
  255. #define DMA_BASE (0x400C2000UL) /**< DMA base address */
  256. #define TIMER0_BASE (0x40010000UL) /**< TIMER0 base address */
  257. #define TIMER1_BASE (0x40010400UL) /**< TIMER1 base address */
  258. #define TIMER2_BASE (0x40010800UL) /**< TIMER2 base address */
  259. #define USART0_BASE (0x4000C000UL) /**< USART0 base address */
  260. #define USART1_BASE (0x4000C400UL) /**< USART1 base address */
  261. #define USART2_BASE (0x4000C800UL) /**< USART2 base address */
  262. #define UART0_BASE (0x4000E000UL) /**< UART0 base address */
  263. #define LEUART0_BASE (0x40084000UL) /**< LEUART0 base address */
  264. #define LEUART1_BASE (0x40084400UL) /**< LEUART1 base address */
  265. #define LETIMER0_BASE (0x40082000UL) /**< LETIMER0 base address */
  266. #define PCNT0_BASE (0x40086000UL) /**< PCNT0 base address */
  267. #define PCNT1_BASE (0x40086400UL) /**< PCNT1 base address */
  268. #define PCNT2_BASE (0x40086800UL) /**< PCNT2 base address */
  269. #define I2C0_BASE (0x4000A000UL) /**< I2C0 base address */
  270. #define ADC0_BASE (0x40002000UL) /**< ADC0 base address */
  271. #define DAC0_BASE (0x40004000UL) /**< DAC0 base address */
  272. #define ACMP0_BASE (0x40001000UL) /**< ACMP0 base address */
  273. #define ACMP1_BASE (0x40001400UL) /**< ACMP1 base address */
  274. #define VCMP_BASE (0x40000000UL) /**< VCMP base address */
  275. #define LCD_BASE (0x4008A000UL) /**< LCD base address */
  276. #define RTC_BASE (0x40080000UL) /**< RTC base address */
  277. #define WDOG_BASE (0x40088000UL) /**< WDOG base address */
  278. #define CALIBRATE_BASE (0x0FE08000UL) /**< CALIBRATE base address */
  279. #define DEVINFO_BASE (0x0FE081B0UL) /**< DEVINFO base address */
  280. #define ROMTABLE_BASE (0xE00FFFD0UL) /**< ROMTABLE base address */
  281. /** @} End of group EFM32G890F32_Peripheral_Base */
  282. /**************************************************************************//**
  283. * @defgroup EFM32G890F32_Peripheral_Declaration EFM32G890F32 Peripheral Declarations
  284. * @{
  285. *****************************************************************************/
  286. #define MSC ((MSC_TypeDef *) MSC_BASE) /**< MSC base pointer */
  287. #define EMU ((EMU_TypeDef *) EMU_BASE) /**< EMU base pointer */
  288. #define RMU ((RMU_TypeDef *) RMU_BASE) /**< RMU base pointer */
  289. #define CMU ((CMU_TypeDef *) CMU_BASE) /**< CMU base pointer */
  290. #define AES ((AES_TypeDef *) AES_BASE) /**< AES base pointer */
  291. #define EBI ((EBI_TypeDef *) EBI_BASE) /**< EBI base pointer */
  292. #define GPIO ((GPIO_TypeDef *) GPIO_BASE) /**< GPIO base pointer */
  293. #define PRS ((PRS_TypeDef *) PRS_BASE) /**< PRS base pointer */
  294. #define DMA ((DMA_TypeDef *) DMA_BASE) /**< DMA base pointer */
  295. #define TIMER0 ((TIMER_TypeDef *) TIMER0_BASE) /**< TIMER0 base pointer */
  296. #define TIMER1 ((TIMER_TypeDef *) TIMER1_BASE) /**< TIMER1 base pointer */
  297. #define TIMER2 ((TIMER_TypeDef *) TIMER2_BASE) /**< TIMER2 base pointer */
  298. #define USART0 ((USART_TypeDef *) USART0_BASE) /**< USART0 base pointer */
  299. #define USART1 ((USART_TypeDef *) USART1_BASE) /**< USART1 base pointer */
  300. #define USART2 ((USART_TypeDef *) USART2_BASE) /**< USART2 base pointer */
  301. #define UART0 ((USART_TypeDef *) UART0_BASE) /**< UART0 base pointer */
  302. #define LEUART0 ((LEUART_TypeDef *) LEUART0_BASE) /**< LEUART0 base pointer */
  303. #define LEUART1 ((LEUART_TypeDef *) LEUART1_BASE) /**< LEUART1 base pointer */
  304. #define LETIMER0 ((LETIMER_TypeDef *) LETIMER0_BASE) /**< LETIMER0 base pointer */
  305. #define PCNT0 ((PCNT_TypeDef *) PCNT0_BASE) /**< PCNT0 base pointer */
  306. #define PCNT1 ((PCNT_TypeDef *) PCNT1_BASE) /**< PCNT1 base pointer */
  307. #define PCNT2 ((PCNT_TypeDef *) PCNT2_BASE) /**< PCNT2 base pointer */
  308. #define I2C0 ((I2C_TypeDef *) I2C0_BASE) /**< I2C0 base pointer */
  309. #define ADC0 ((ADC_TypeDef *) ADC0_BASE) /**< ADC0 base pointer */
  310. #define DAC0 ((DAC_TypeDef *) DAC0_BASE) /**< DAC0 base pointer */
  311. #define ACMP0 ((ACMP_TypeDef *) ACMP0_BASE) /**< ACMP0 base pointer */
  312. #define ACMP1 ((ACMP_TypeDef *) ACMP1_BASE) /**< ACMP1 base pointer */
  313. #define VCMP ((VCMP_TypeDef *) VCMP_BASE) /**< VCMP base pointer */
  314. #define LCD ((LCD_TypeDef *) LCD_BASE) /**< LCD base pointer */
  315. #define RTC ((RTC_TypeDef *) RTC_BASE) /**< RTC base pointer */
  316. #define WDOG ((WDOG_TypeDef *) WDOG_BASE) /**< WDOG base pointer */
  317. #define CALIBRATE ((CALIBRATE_TypeDef *) CALIBRATE_BASE) /**< CALIBRATE base pointer */
  318. #define DEVINFO ((DEVINFO_TypeDef *) DEVINFO_BASE) /**< DEVINFO base pointer */
  319. #define ROMTABLE ((ROMTABLE_TypeDef *) ROMTABLE_BASE) /**< ROMTABLE base pointer */
  320. /** @} End of group EFM32G890F32_Peripheral_Declaration */
  321. /**************************************************************************//**
  322. * @defgroup EFM32G890F32_BitFields EFM32G890F32 Bit Fields
  323. * @{
  324. *****************************************************************************/
  325. #include "efm32g_prs_signals.h"
  326. #include "efm32g_dmareq.h"
  327. #include "efm32g_dmactrl.h"
  328. #include "efm32g_uart.h"
  329. /**************************************************************************//**
  330. * @defgroup EFM32G890F32_UNLOCK Unlock Codes
  331. * @{
  332. *****************************************************************************/
  333. #define MSC_UNLOCK_CODE 0x1B71 /**< MSC unlock code */
  334. #define EMU_UNLOCK_CODE 0xADE8 /**< EMU unlock code */
  335. #define CMU_UNLOCK_CODE 0x580E /**< CMU unlock code */
  336. #define GPIO_UNLOCK_CODE 0xA534 /**< GPIO unlock code */
  337. #define TIMER_UNLOCK_CODE 0xCE80 /**< TIMER unlock code */
  338. /** @} End of group EFM32G890F32_UNLOCK */
  339. /** @} End of group EFM32G890F32_BitFields */
  340. /**************************************************************************//**
  341. * @defgroup EFM32G890F32_Alternate_Function EFM32G890F32 Alternate Function
  342. * @{
  343. *****************************************************************************/
  344. #include "efm32g_af_channels.h"
  345. #include "efm32g_af_ports.h"
  346. #include "efm32g_af_pins.h"
  347. /** @} End of group EFM32G890F32_Alternate_Function */
  348. /**************************************************************************//**
  349. * @brief Set the value of a bit field within a register.
  350. *
  351. * @param REG
  352. * The register to update
  353. * @param MASK
  354. * The mask for the bit field to update
  355. * @param VALUE
  356. * The value to write to the bit field
  357. * @param OFFSET
  358. * The number of bits that the field is offset within the register.
  359. * 0 (zero) means LSB.
  360. *****************************************************************************/
  361. #define SET_BIT_FIELD(REG, MASK, VALUE, OFFSET) \
  362. REG = ((REG) &~(MASK)) | (((VALUE) << (OFFSET)) & (MASK));
  363. /** @} End of group EFM32G890F32 */
  364. /** @} End of group Parts */
  365. #ifdef __cplusplus
  366. }
  367. #endif
  368. #endif /* __EFM32G890F32_H */