nrf52.h 157 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125
  1. /****************************************************************************************************//**
  2. * @file nrf52.h
  3. *
  4. * @brief CMSIS Cortex-M4 Peripheral Access Layer Header File for
  5. * nrf52 from Nordic Semiconductor.
  6. *
  7. * @version V1
  8. * @date 23. February 2016
  9. *
  10. * @note Generated with SVDConv V2.81d
  11. * from CMSIS SVD File 'nrf52.svd' Version 1,
  12. *
  13. * @par Copyright (c) 2015, Nordic Semiconductor ASA
  14. * All rights reserved.
  15. *
  16. * Redistribution and use in source and binary forms, with or without
  17. * modification, are permitted provided that the following conditions are met:
  18. *
  19. * * Redistributions of source code must retain the above copyright notice, this
  20. * list of conditions and the following disclaimer.
  21. *
  22. * * Redistributions in binary form must reproduce the above copyright notice,
  23. * this list of conditions and the following disclaimer in the documentation
  24. * and/or other materials provided with the distribution.
  25. *
  26. * * Neither the name of Nordic Semiconductor ASA nor the names of its
  27. * contributors may be used to endorse or promote products derived from
  28. * this software without specific prior written permission.
  29. *
  30. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  31. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  32. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  33. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  34. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  35. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  36. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  37. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  38. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  39. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  40. *
  41. *
  42. *******************************************************************************************************/
  43. /** @addtogroup Nordic Semiconductor
  44. * @{
  45. */
  46. /** @addtogroup nrf52
  47. * @{
  48. */
  49. #ifndef NRF52_H
  50. #define NRF52_H
  51. #ifdef __cplusplus
  52. extern "C" {
  53. #endif
  54. /* ------------------------- Interrupt Number Definition ------------------------ */
  55. typedef enum {
  56. /* ------------------- Cortex-M4 Processor Exceptions Numbers ------------------- */
  57. Reset_IRQn = -15, /*!< 1 Reset Vector, invoked on Power up and warm reset */
  58. NonMaskableInt_IRQn = -14, /*!< 2 Non maskable Interrupt, cannot be stopped or preempted */
  59. HardFault_IRQn = -13, /*!< 3 Hard Fault, all classes of Fault */
  60. MemoryManagement_IRQn = -12, /*!< 4 Memory Management, MPU mismatch, including Access Violation
  61. and No Match */
  62. BusFault_IRQn = -11, /*!< 5 Bus Fault, Pre-Fetch-, Memory Access Fault, other address/memory
  63. related Fault */
  64. UsageFault_IRQn = -10, /*!< 6 Usage Fault, i.e. Undef Instruction, Illegal State Transition */
  65. SVCall_IRQn = -5, /*!< 11 System Service Call via SVC instruction */
  66. DebugMonitor_IRQn = -4, /*!< 12 Debug Monitor */
  67. PendSV_IRQn = -2, /*!< 14 Pendable request for system service */
  68. SysTick_IRQn = -1, /*!< 15 System Tick Timer */
  69. /* ---------------------- nrf52 Specific Interrupt Numbers ---------------------- */
  70. POWER_CLOCK_IRQn = 0, /*!< 0 POWER_CLOCK */
  71. RADIO_IRQn = 1, /*!< 1 RADIO */
  72. UARTE0_UART0_IRQn = 2, /*!< 2 UARTE0_UART0 */
  73. SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQn= 3, /*!< 3 SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0 */
  74. SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn= 4, /*!< 4 SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1 */
  75. NFCT_IRQn = 5, /*!< 5 NFCT */
  76. GPIOTE_IRQn = 6, /*!< 6 GPIOTE */
  77. SAADC_IRQn = 7, /*!< 7 SAADC */
  78. TIMER0_IRQn = 8, /*!< 8 TIMER0 */
  79. TIMER1_IRQn = 9, /*!< 9 TIMER1 */
  80. TIMER2_IRQn = 10, /*!< 10 TIMER2 */
  81. RTC0_IRQn = 11, /*!< 11 RTC0 */
  82. TEMP_IRQn = 12, /*!< 12 TEMP */
  83. RNG_IRQn = 13, /*!< 13 RNG */
  84. ECB_IRQn = 14, /*!< 14 ECB */
  85. CCM_AAR_IRQn = 15, /*!< 15 CCM_AAR */
  86. WDT_IRQn = 16, /*!< 16 WDT */
  87. RTC1_IRQn = 17, /*!< 17 RTC1 */
  88. QDEC_IRQn = 18, /*!< 18 QDEC */
  89. COMP_LPCOMP_IRQn = 19, /*!< 19 COMP_LPCOMP */
  90. SWI0_EGU0_IRQn = 20, /*!< 20 SWI0_EGU0 */
  91. SWI1_EGU1_IRQn = 21, /*!< 21 SWI1_EGU1 */
  92. SWI2_EGU2_IRQn = 22, /*!< 22 SWI2_EGU2 */
  93. SWI3_EGU3_IRQn = 23, /*!< 23 SWI3_EGU3 */
  94. SWI4_EGU4_IRQn = 24, /*!< 24 SWI4_EGU4 */
  95. SWI5_EGU5_IRQn = 25, /*!< 25 SWI5_EGU5 */
  96. TIMER3_IRQn = 26, /*!< 26 TIMER3 */
  97. TIMER4_IRQn = 27, /*!< 27 TIMER4 */
  98. PWM0_IRQn = 28, /*!< 28 PWM0 */
  99. PDM_IRQn = 29, /*!< 29 PDM */
  100. MWU_IRQn = 32, /*!< 32 MWU */
  101. PWM1_IRQn = 33, /*!< 33 PWM1 */
  102. PWM2_IRQn = 34, /*!< 34 PWM2 */
  103. SPIM2_SPIS2_SPI2_IRQn = 35, /*!< 35 SPIM2_SPIS2_SPI2 */
  104. RTC2_IRQn = 36, /*!< 36 RTC2 */
  105. I2S_IRQn = 37, /*!< 37 I2S */
  106. FPU_IRQn = 38 /*!< 38 FPU */
  107. } IRQn_Type;
  108. /** @addtogroup Configuration_of_CMSIS
  109. * @{
  110. */
  111. /* ================================================================================ */
  112. /* ================ Processor and Core Peripheral Section ================ */
  113. /* ================================================================================ */
  114. /* ----------------Configuration of the Cortex-M4 Processor and Core Peripherals---------------- */
  115. #define __CM4_REV 0x0001 /*!< Cortex-M4 Core Revision */
  116. #define __MPU_PRESENT 1 /*!< MPU present or not */
  117. #define __NVIC_PRIO_BITS 3 /*!< Number of Bits used for Priority Levels */
  118. #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
  119. #define __FPU_PRESENT 1 /*!< FPU present or not */
  120. /** @} */ /* End of group Configuration_of_CMSIS */
  121. #include "core_cm4.h" /*!< Cortex-M4 processor and core peripherals */
  122. #include "system_nrf52.h" /*!< nrf52 System */
  123. /* ================================================================================ */
  124. /* ================ Device Specific Peripheral Section ================ */
  125. /* ================================================================================ */
  126. /** @addtogroup Device_Peripheral_Registers
  127. * @{
  128. */
  129. /* ------------------- Start of section using anonymous unions ------------------ */
  130. #if defined(__CC_ARM)
  131. #pragma push
  132. #pragma anon_unions
  133. #elif defined(__ICCARM__)
  134. #pragma language=extended
  135. #elif defined(__GNUC__)
  136. /* anonymous unions are enabled by default */
  137. #elif defined(__TMS470__)
  138. /* anonymous unions are enabled by default */
  139. #elif defined(__TASKING__)
  140. #pragma warning 586
  141. #else
  142. #warning Not supported compiler type
  143. #endif
  144. typedef struct {
  145. __I uint32_t PART; /*!< Part code */
  146. __I uint32_t VARIANT; /*!< Part Variant, Hardware version and Production configuration */
  147. __I uint32_t PACKAGE; /*!< Package option */
  148. __I uint32_t RAM; /*!< RAM variant */
  149. __I uint32_t FLASH; /*!< Flash variant */
  150. __IO uint32_t UNUSED0[3]; /*!< Description collection[0]: Unspecified */
  151. } FICR_INFO_Type;
  152. typedef struct {
  153. __I uint32_t A0; /*!< Slope definition A0. */
  154. __I uint32_t A1; /*!< Slope definition A1. */
  155. __I uint32_t A2; /*!< Slope definition A2. */
  156. __I uint32_t A3; /*!< Slope definition A3. */
  157. __I uint32_t A4; /*!< Slope definition A4. */
  158. __I uint32_t A5; /*!< Slope definition A5. */
  159. __I uint32_t B0; /*!< y-intercept B0. */
  160. __I uint32_t B1; /*!< y-intercept B1. */
  161. __I uint32_t B2; /*!< y-intercept B2. */
  162. __I uint32_t B3; /*!< y-intercept B3. */
  163. __I uint32_t B4; /*!< y-intercept B4. */
  164. __I uint32_t B5; /*!< y-intercept B5. */
  165. __I uint32_t T0; /*!< Segment end T0. */
  166. __I uint32_t T1; /*!< Segment end T1. */
  167. __I uint32_t T2; /*!< Segment end T2. */
  168. __I uint32_t T3; /*!< Segment end T3. */
  169. __I uint32_t T4; /*!< Segment end T4. */
  170. } FICR_TEMP_Type;
  171. typedef struct {
  172. __I uint32_t TAGHEADER0; /*!< Default header for NFC Tag. Software can read these values to
  173. populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. */
  174. __I uint32_t TAGHEADER1; /*!< Default header for NFC Tag. Software can read these values to
  175. populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. */
  176. __I uint32_t TAGHEADER2; /*!< Default header for NFC Tag. Software can read these values to
  177. populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. */
  178. __I uint32_t TAGHEADER3; /*!< Default header for NFC Tag. Software can read these values to
  179. populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. */
  180. } FICR_NFC_Type;
  181. typedef struct {
  182. __IO uint32_t POWER; /*!< Description cluster[0]: RAM0 power control register */
  183. __O uint32_t POWERSET; /*!< Description cluster[0]: RAM0 power control set register */
  184. __O uint32_t POWERCLR; /*!< Description cluster[0]: RAM0 power control clear register */
  185. __I uint32_t RESERVED0;
  186. } POWER_RAM_Type;
  187. typedef struct {
  188. __IO uint32_t CPU0; /*!< AHB bus master priority register for CPU0 */
  189. __IO uint32_t SPIS1; /*!< AHB bus master priority register for SPIM1, SPIS1, TWIM1 and
  190. TWIS1 */
  191. __IO uint32_t RADIO; /*!< AHB bus master priority register for RADIO */
  192. __IO uint32_t ECB; /*!< AHB bus master priority register for ECB */
  193. __IO uint32_t CCM; /*!< AHB bus master priority register for CCM */
  194. __IO uint32_t AAR; /*!< AHB bus master priority register for AAR */
  195. __IO uint32_t SAADC; /*!< AHB bus master priority register for SAADC */
  196. __IO uint32_t UARTE; /*!< AHB bus master priority register for UARTE */
  197. __IO uint32_t SERIAL0; /*!< AHB bus master priority register for SPIM0, SPIS0, TWIM0 and
  198. TWIS0 */
  199. __IO uint32_t SERIAL2; /*!< AHB bus master priority register for SPIM2 and SPIS2 */
  200. __IO uint32_t NFCT; /*!< AHB bus master priority register for NFCT */
  201. __IO uint32_t I2S; /*!< AHB bus master priority register for I2S */
  202. __IO uint32_t PDM; /*!< AHB bus master priority register for PDM */
  203. __IO uint32_t PWM; /*!< AHB bus master priority register for PWM0, PWM1 and PWM2 */
  204. } AMLI_RAMPRI_Type;
  205. typedef struct {
  206. __IO uint32_t RTS; /*!< Pin select for RTS signal */
  207. __IO uint32_t TXD; /*!< Pin select for TXD signal */
  208. __IO uint32_t CTS; /*!< Pin select for CTS signal */
  209. __IO uint32_t RXD; /*!< Pin select for RXD signal */
  210. } UARTE_PSEL_Type;
  211. typedef struct {
  212. __IO uint32_t PTR; /*!< Data pointer */
  213. __IO uint32_t MAXCNT; /*!< Maximum number of bytes in receive buffer */
  214. __I uint32_t AMOUNT; /*!< Number of bytes transferred in the last transaction */
  215. } UARTE_RXD_Type;
  216. typedef struct {
  217. __IO uint32_t PTR; /*!< Data pointer */
  218. __IO uint32_t MAXCNT; /*!< Maximum number of bytes in transmit buffer */
  219. __I uint32_t AMOUNT; /*!< Number of bytes transferred in the last transaction */
  220. } UARTE_TXD_Type;
  221. typedef struct {
  222. __IO uint32_t SCK; /*!< Pin select for SCK */
  223. __IO uint32_t MOSI; /*!< Pin select for MOSI signal */
  224. __IO uint32_t MISO; /*!< Pin select for MISO signal */
  225. } SPIM_PSEL_Type;
  226. typedef struct {
  227. __IO uint32_t PTR; /*!< Data pointer */
  228. __IO uint32_t MAXCNT; /*!< Maximum number of bytes in receive buffer */
  229. __I uint32_t AMOUNT; /*!< Number of bytes transferred in the last transaction */
  230. __IO uint32_t LIST; /*!< EasyDMA list type */
  231. } SPIM_RXD_Type;
  232. typedef struct {
  233. __IO uint32_t PTR; /*!< Data pointer */
  234. __IO uint32_t MAXCNT; /*!< Maximum number of bytes in transmit buffer */
  235. __I uint32_t AMOUNT; /*!< Number of bytes transferred in the last transaction */
  236. __IO uint32_t LIST; /*!< EasyDMA list type */
  237. } SPIM_TXD_Type;
  238. typedef struct {
  239. __IO uint32_t SCK; /*!< Pin select for SCK */
  240. __IO uint32_t MISO; /*!< Pin select for MISO signal */
  241. __IO uint32_t MOSI; /*!< Pin select for MOSI signal */
  242. __IO uint32_t CSN; /*!< Pin select for CSN signal */
  243. } SPIS_PSEL_Type;
  244. typedef struct {
  245. __IO uint32_t PTR; /*!< RXD data pointer */
  246. __IO uint32_t MAXCNT; /*!< Maximum number of bytes in receive buffer */
  247. __I uint32_t AMOUNT; /*!< Number of bytes received in last granted transaction */
  248. } SPIS_RXD_Type;
  249. typedef struct {
  250. __IO uint32_t PTR; /*!< TXD data pointer */
  251. __IO uint32_t MAXCNT; /*!< Maximum number of bytes in transmit buffer */
  252. __I uint32_t AMOUNT; /*!< Number of bytes transmitted in last granted transaction */
  253. } SPIS_TXD_Type;
  254. typedef struct {
  255. __IO uint32_t SCL; /*!< Pin select for SCL signal */
  256. __IO uint32_t SDA; /*!< Pin select for SDA signal */
  257. } TWIM_PSEL_Type;
  258. typedef struct {
  259. __IO uint32_t PTR; /*!< Data pointer */
  260. __IO uint32_t MAXCNT; /*!< Maximum number of bytes in receive buffer */
  261. __I uint32_t AMOUNT; /*!< Number of bytes transferred in the last transaction */
  262. __IO uint32_t LIST; /*!< EasyDMA list type */
  263. } TWIM_RXD_Type;
  264. typedef struct {
  265. __IO uint32_t PTR; /*!< Data pointer */
  266. __IO uint32_t MAXCNT; /*!< Maximum number of bytes in transmit buffer */
  267. __I uint32_t AMOUNT; /*!< Number of bytes transferred in the last transaction */
  268. __IO uint32_t LIST; /*!< EasyDMA list type */
  269. } TWIM_TXD_Type;
  270. typedef struct {
  271. __IO uint32_t SCL; /*!< Pin select for SCL signal */
  272. __IO uint32_t SDA; /*!< Pin select for SDA signal */
  273. } TWIS_PSEL_Type;
  274. typedef struct {
  275. __IO uint32_t PTR; /*!< RXD Data pointer */
  276. __IO uint32_t MAXCNT; /*!< Maximum number of bytes in RXD buffer */
  277. __I uint32_t AMOUNT; /*!< Number of bytes transferred in the last RXD transaction */
  278. } TWIS_RXD_Type;
  279. typedef struct {
  280. __IO uint32_t PTR; /*!< TXD Data pointer */
  281. __IO uint32_t MAXCNT; /*!< Maximum number of bytes in TXD buffer */
  282. __I uint32_t AMOUNT; /*!< Number of bytes transferred in the last TXD transaction */
  283. } TWIS_TXD_Type;
  284. typedef struct {
  285. __IO uint32_t SCK; /*!< Pin select for SCK */
  286. __IO uint32_t MOSI; /*!< Pin select for MOSI */
  287. __IO uint32_t MISO; /*!< Pin select for MISO */
  288. } SPI_PSEL_Type;
  289. typedef struct {
  290. __IO uint32_t RX; /*!< Result of last incoming frames */
  291. } NFCT_FRAMESTATUS_Type;
  292. typedef struct {
  293. __IO uint32_t FRAMECONFIG; /*!< Configuration of outgoing frames */
  294. __IO uint32_t AMOUNT; /*!< Size of outgoing frame */
  295. } NFCT_TXD_Type;
  296. typedef struct {
  297. __IO uint32_t FRAMECONFIG; /*!< Configuration of incoming frames */
  298. __I uint32_t AMOUNT; /*!< Size of last incoming frame */
  299. } NFCT_RXD_Type;
  300. typedef struct {
  301. __IO uint32_t LIMITH; /*!< Description cluster[0]: Last results is equal or above CH[0].LIMIT.HIGH */
  302. __IO uint32_t LIMITL; /*!< Description cluster[0]: Last results is equal or below CH[0].LIMIT.LOW */
  303. } SAADC_EVENTS_CH_Type;
  304. typedef struct {
  305. __IO uint32_t PSELP; /*!< Description cluster[0]: Input positive pin selection for CH[0] */
  306. __IO uint32_t PSELN; /*!< Description cluster[0]: Input negative pin selection for CH[0] */
  307. __IO uint32_t CONFIG; /*!< Description cluster[0]: Input configuration for CH[0] */
  308. __IO uint32_t LIMIT; /*!< Description cluster[0]: High/low limits for event monitoring
  309. a channel */
  310. } SAADC_CH_Type;
  311. typedef struct {
  312. __IO uint32_t PTR; /*!< Data pointer */
  313. __IO uint32_t MAXCNT; /*!< Maximum number of buffer words to transfer */
  314. __I uint32_t AMOUNT; /*!< Number of buffer words transferred since last START */
  315. } SAADC_RESULT_Type;
  316. typedef struct {
  317. __IO uint32_t LED; /*!< Pin select for LED signal */
  318. __IO uint32_t A; /*!< Pin select for A signal */
  319. __IO uint32_t B; /*!< Pin select for B signal */
  320. } QDEC_PSEL_Type;
  321. typedef struct {
  322. __IO uint32_t PTR; /*!< Description cluster[0]: Beginning address in Data RAM of sequence
  323. A */
  324. __IO uint32_t CNT; /*!< Description cluster[0]: Amount of values (duty cycles) in sequence
  325. A */
  326. __IO uint32_t REFRESH; /*!< Description cluster[0]: Amount of additional PWM periods between
  327. samples loaded to compare register (load every CNT+1 PWM periods) */
  328. __IO uint32_t ENDDELAY; /*!< Description cluster[0]: Time added after the sequence */
  329. __I uint32_t RESERVED1[4];
  330. } PWM_SEQ_Type;
  331. typedef struct {
  332. __IO uint32_t OUT[4]; /*!< Description collection[0]: Output pin select for PWM channel
  333. 0 */
  334. } PWM_PSEL_Type;
  335. typedef struct {
  336. __IO uint32_t CLK; /*!< Pin number configuration for PDM CLK signal */
  337. __IO uint32_t DIN; /*!< Pin number configuration for PDM DIN signal */
  338. } PDM_PSEL_Type;
  339. typedef struct {
  340. __IO uint32_t PTR; /*!< RAM address pointer to write samples to with EasyDMA */
  341. __IO uint32_t MAXCNT; /*!< Number of samples to allocate memory for in EasyDMA mode */
  342. } PDM_SAMPLE_Type;
  343. typedef struct {
  344. __O uint32_t EN; /*!< Description cluster[0]: Enable channel group 0 */
  345. __O uint32_t DIS; /*!< Description cluster[0]: Disable channel group 0 */
  346. } PPI_TASKS_CHG_Type;
  347. typedef struct {
  348. __IO uint32_t EEP; /*!< Description cluster[0]: Channel 0 event end-point */
  349. __IO uint32_t TEP; /*!< Description cluster[0]: Channel 0 task end-point */
  350. } PPI_CH_Type;
  351. typedef struct {
  352. __IO uint32_t TEP; /*!< Description cluster[0]: Channel 0 task end-point */
  353. } PPI_FORK_Type;
  354. typedef struct {
  355. __IO uint32_t WA; /*!< Description cluster[0]: Write access to region 0 detected */
  356. __IO uint32_t RA; /*!< Description cluster[0]: Read access to region 0 detected */
  357. } MWU_EVENTS_REGION_Type;
  358. typedef struct {
  359. __IO uint32_t WA; /*!< Description cluster[0]: Write access to peripheral region 0
  360. detected */
  361. __IO uint32_t RA; /*!< Description cluster[0]: Read access to peripheral region 0 detected */
  362. } MWU_EVENTS_PREGION_Type;
  363. typedef struct {
  364. __IO uint32_t SUBSTATWA; /*!< Description cluster[0]: Source of event/interrupt in region
  365. 0, write access detected while corresponding subregion was enabled
  366. for watching */
  367. __IO uint32_t SUBSTATRA; /*!< Description cluster[0]: Source of event/interrupt in region
  368. 0, read access detected while corresponding subregion was enabled
  369. for watching */
  370. } MWU_PERREGION_Type;
  371. typedef struct {
  372. __IO uint32_t START; /*!< Description cluster[0]: Start address for region 0 */
  373. __IO uint32_t END; /*!< Description cluster[0]: End address of region 0 */
  374. __I uint32_t RESERVED2[2];
  375. } MWU_REGION_Type;
  376. typedef struct {
  377. __I uint32_t START; /*!< Description cluster[0]: Reserved for future use */
  378. __I uint32_t END; /*!< Description cluster[0]: Reserved for future use */
  379. __IO uint32_t SUBS; /*!< Description cluster[0]: Subregions of region 0 */
  380. __I uint32_t RESERVED3;
  381. } MWU_PREGION_Type;
  382. typedef struct {
  383. __IO uint32_t MODE; /*!< I2S mode. */
  384. __IO uint32_t RXEN; /*!< Reception (RX) enable. */
  385. __IO uint32_t TXEN; /*!< Transmission (TX) enable. */
  386. __IO uint32_t MCKEN; /*!< Master clock generator enable. */
  387. __IO uint32_t MCKFREQ; /*!< Master clock generator frequency. */
  388. __IO uint32_t RATIO; /*!< MCK / LRCK ratio. */
  389. __IO uint32_t SWIDTH; /*!< Sample width. */
  390. __IO uint32_t ALIGN; /*!< Alignment of sample within a frame. */
  391. __IO uint32_t FORMAT; /*!< Frame format. */
  392. __IO uint32_t CHANNELS; /*!< Enable channels. */
  393. } I2S_CONFIG_Type;
  394. typedef struct {
  395. __IO uint32_t PTR; /*!< Receive buffer RAM start address. */
  396. } I2S_RXD_Type;
  397. typedef struct {
  398. __IO uint32_t PTR; /*!< Transmit buffer RAM start address. */
  399. } I2S_TXD_Type;
  400. typedef struct {
  401. __IO uint32_t MAXCNT; /*!< Size of RXD and TXD buffers. */
  402. } I2S_RXTXD_Type;
  403. typedef struct {
  404. __IO uint32_t MCK; /*!< Pin select for MCK signal. */
  405. __IO uint32_t SCK; /*!< Pin select for SCK signal. */
  406. __IO uint32_t LRCK; /*!< Pin select for LRCK signal. */
  407. __IO uint32_t SDIN; /*!< Pin select for SDIN signal. */
  408. __IO uint32_t SDOUT; /*!< Pin select for SDOUT signal. */
  409. } I2S_PSEL_Type;
  410. /* ================================================================================ */
  411. /* ================ FICR ================ */
  412. /* ================================================================================ */
  413. /**
  414. * @brief Factory Information Configuration Registers (FICR)
  415. */
  416. typedef struct { /*!< FICR Structure */
  417. __I uint32_t RESERVED0[4];
  418. __I uint32_t CODEPAGESIZE; /*!< Code memory page size */
  419. __I uint32_t CODESIZE; /*!< Code memory size */
  420. __I uint32_t RESERVED1[18];
  421. __I uint32_t DEVICEID[2]; /*!< Description collection[0]: Device identifier */
  422. __I uint32_t RESERVED2[6];
  423. __I uint32_t ER[4]; /*!< Description collection[0]: Encryption Root, word 0 */
  424. __I uint32_t IR[4]; /*!< Description collection[0]: Identity Root, word 0 */
  425. __I uint32_t DEVICEADDRTYPE; /*!< Device address type */
  426. __I uint32_t DEVICEADDR[2]; /*!< Description collection[0]: Device address 0 */
  427. __I uint32_t RESERVED3[21];
  428. FICR_INFO_Type INFO; /*!< Device info */
  429. __I uint32_t RESERVED4[185];
  430. FICR_TEMP_Type TEMP; /*!< Registers storing factory TEMP module linearization coefficients */
  431. __I uint32_t RESERVED5[2];
  432. FICR_NFC_Type NFC; /*!< Unspecified */
  433. } NRF_FICR_Type;
  434. /* ================================================================================ */
  435. /* ================ UICR ================ */
  436. /* ================================================================================ */
  437. /**
  438. * @brief User Information Configuration Registers (UICR)
  439. */
  440. typedef struct { /*!< UICR Structure */
  441. __IO uint32_t UNUSED0; /*!< Unspecified */
  442. __IO uint32_t UNUSED1; /*!< Unspecified */
  443. __IO uint32_t UNUSED2; /*!< Unspecified */
  444. __I uint32_t RESERVED0;
  445. __IO uint32_t UNUSED3; /*!< Unspecified */
  446. __IO uint32_t NRFFW[15]; /*!< Description collection[0]: Reserved for Nordic firmware design */
  447. __IO uint32_t NRFHW[12]; /*!< Description collection[0]: Reserved for Nordic hardware design */
  448. __IO uint32_t CUSTOMER[32]; /*!< Description collection[0]: Reserved for customer */
  449. __I uint32_t RESERVED1[64];
  450. __IO uint32_t PSELRESET[2]; /*!< Description collection[0]: Mapping of the nRESET function (see
  451. POWER chapter for details) */
  452. __IO uint32_t APPROTECT; /*!< Access Port protection */
  453. __IO uint32_t NFCPINS; /*!< Setting of pins dedicated to NFC functionality: NFC antenna
  454. or GPIO */
  455. } NRF_UICR_Type;
  456. /* ================================================================================ */
  457. /* ================ BPROT ================ */
  458. /* ================================================================================ */
  459. /**
  460. * @brief Block Protect (BPROT)
  461. */
  462. typedef struct { /*!< BPROT Structure */
  463. __I uint32_t RESERVED0[384];
  464. __IO uint32_t CONFIG0; /*!< Block protect configuration register 0 */
  465. __IO uint32_t CONFIG1; /*!< Block protect configuration register 1 */
  466. __IO uint32_t DISABLEINDEBUG; /*!< Disable protection mechanism in debug interface mode */
  467. __IO uint32_t UNUSED0; /*!< Unspecified */
  468. __IO uint32_t CONFIG2; /*!< Block protect configuration register 2 */
  469. __IO uint32_t CONFIG3; /*!< Block protect configuration register 3 */
  470. } NRF_BPROT_Type;
  471. /* ================================================================================ */
  472. /* ================ POWER ================ */
  473. /* ================================================================================ */
  474. /**
  475. * @brief Power control (POWER)
  476. */
  477. typedef struct { /*!< POWER Structure */
  478. __I uint32_t RESERVED0[30];
  479. __O uint32_t TASKS_CONSTLAT; /*!< Enable constant latency mode */
  480. __O uint32_t TASKS_LOWPWR; /*!< Enable low power mode (variable latency) */
  481. __I uint32_t RESERVED1[34];
  482. __IO uint32_t EVENTS_POFWARN; /*!< Power failure warning */
  483. __I uint32_t RESERVED2[2];
  484. __IO uint32_t EVENTS_SLEEPENTER; /*!< CPU entered WFI/WFE sleep */
  485. __IO uint32_t EVENTS_SLEEPEXIT; /*!< CPU exited WFI/WFE sleep */
  486. __I uint32_t RESERVED3[122];
  487. __IO uint32_t INTENSET; /*!< Enable interrupt */
  488. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  489. __I uint32_t RESERVED4[61];
  490. __IO uint32_t RESETREAS; /*!< Reset reason */
  491. __I uint32_t RESERVED5[9];
  492. __I uint32_t RAMSTATUS; /*!< Deprecated register - RAM status register */
  493. __I uint32_t RESERVED6[53];
  494. __O uint32_t SYSTEMOFF; /*!< System OFF register */
  495. __I uint32_t RESERVED7[3];
  496. __IO uint32_t POFCON; /*!< Power failure comparator configuration */
  497. __I uint32_t RESERVED8[2];
  498. __IO uint32_t GPREGRET; /*!< General purpose retention register */
  499. __IO uint32_t GPREGRET2; /*!< General purpose retention register */
  500. __IO uint32_t RAMON; /*!< Deprecated register - RAM on/off register (this register is
  501. retained) */
  502. __I uint32_t RESERVED9[11];
  503. __IO uint32_t RAMONB; /*!< Deprecated register - RAM on/off register (this register is
  504. retained) */
  505. __I uint32_t RESERVED10[8];
  506. __IO uint32_t DCDCEN; /*!< DC/DC enable register */
  507. __I uint32_t RESERVED11[225];
  508. POWER_RAM_Type RAM[8]; /*!< Unspecified */
  509. } NRF_POWER_Type;
  510. /* ================================================================================ */
  511. /* ================ CLOCK ================ */
  512. /* ================================================================================ */
  513. /**
  514. * @brief Clock control (CLOCK)
  515. */
  516. typedef struct { /*!< CLOCK Structure */
  517. __O uint32_t TASKS_HFCLKSTART; /*!< Start HFCLK crystal oscillator */
  518. __O uint32_t TASKS_HFCLKSTOP; /*!< Stop HFCLK crystal oscillator */
  519. __O uint32_t TASKS_LFCLKSTART; /*!< Start LFCLK source */
  520. __O uint32_t TASKS_LFCLKSTOP; /*!< Stop LFCLK source */
  521. __O uint32_t TASKS_CAL; /*!< Start calibration of LFRC oscillator */
  522. __O uint32_t TASKS_CTSTART; /*!< Start calibration timer */
  523. __O uint32_t TASKS_CTSTOP; /*!< Stop calibration timer */
  524. __I uint32_t RESERVED0[57];
  525. __IO uint32_t EVENTS_HFCLKSTARTED; /*!< HFCLK oscillator started */
  526. __IO uint32_t EVENTS_LFCLKSTARTED; /*!< LFCLK started */
  527. __I uint32_t RESERVED1;
  528. __IO uint32_t EVENTS_DONE; /*!< Calibration of LFCLK RC oscillator complete event */
  529. __IO uint32_t EVENTS_CTTO; /*!< Calibration timer timeout */
  530. __I uint32_t RESERVED2[124];
  531. __IO uint32_t INTENSET; /*!< Enable interrupt */
  532. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  533. __I uint32_t RESERVED3[63];
  534. __I uint32_t HFCLKRUN; /*!< Status indicating that HFCLKSTART task has been triggered */
  535. __I uint32_t HFCLKSTAT; /*!< HFCLK status */
  536. __I uint32_t RESERVED4;
  537. __I uint32_t LFCLKRUN; /*!< Status indicating that LFCLKSTART task has been triggered */
  538. __I uint32_t LFCLKSTAT; /*!< LFCLK status */
  539. __I uint32_t LFCLKSRCCOPY; /*!< Copy of LFCLKSRC register, set when LFCLKSTART task was triggered */
  540. __I uint32_t RESERVED5[62];
  541. __IO uint32_t LFCLKSRC; /*!< Clock source for the LFCLK */
  542. __I uint32_t RESERVED6[7];
  543. __IO uint32_t CTIV; /*!< Calibration timer interval (retained register, same reset behaviour
  544. as RESETREAS) */
  545. __I uint32_t RESERVED7[8];
  546. __IO uint32_t TRACECONFIG; /*!< Clocking options for the Trace Port debug interface */
  547. } NRF_CLOCK_Type;
  548. /* ================================================================================ */
  549. /* ================ AMLI ================ */
  550. /* ================================================================================ */
  551. /**
  552. * @brief AHB Multi-Layer Interface (AMLI)
  553. */
  554. typedef struct { /*!< AMLI Structure */
  555. __I uint32_t RESERVED0[896];
  556. AMLI_RAMPRI_Type RAMPRI; /*!< RAM configurable priority configuration structure */
  557. } NRF_AMLI_Type;
  558. /* ================================================================================ */
  559. /* ================ RADIO ================ */
  560. /* ================================================================================ */
  561. /**
  562. * @brief 2.4 GHz Radio (RADIO)
  563. */
  564. typedef struct { /*!< RADIO Structure */
  565. __O uint32_t TASKS_TXEN; /*!< Enable RADIO in TX mode */
  566. __O uint32_t TASKS_RXEN; /*!< Enable RADIO in RX mode */
  567. __O uint32_t TASKS_START; /*!< Start RADIO */
  568. __O uint32_t TASKS_STOP; /*!< Stop RADIO */
  569. __O uint32_t TASKS_DISABLE; /*!< Disable RADIO */
  570. __O uint32_t TASKS_RSSISTART; /*!< Start the RSSI and take one single sample of the receive signal
  571. strength. */
  572. __O uint32_t TASKS_RSSISTOP; /*!< Stop the RSSI measurement */
  573. __O uint32_t TASKS_BCSTART; /*!< Start the bit counter */
  574. __O uint32_t TASKS_BCSTOP; /*!< Stop the bit counter */
  575. __I uint32_t RESERVED0[55];
  576. __IO uint32_t EVENTS_READY; /*!< RADIO has ramped up and is ready to be started */
  577. __IO uint32_t EVENTS_ADDRESS; /*!< Address sent or received */
  578. __IO uint32_t EVENTS_PAYLOAD; /*!< Packet payload sent or received */
  579. __IO uint32_t EVENTS_END; /*!< Packet sent or received */
  580. __IO uint32_t EVENTS_DISABLED; /*!< RADIO has been disabled */
  581. __IO uint32_t EVENTS_DEVMATCH; /*!< A device address match occurred on the last received packet */
  582. __IO uint32_t EVENTS_DEVMISS; /*!< No device address match occurred on the last received packet */
  583. __IO uint32_t EVENTS_RSSIEND; /*!< Sampling of receive signal strength complete. */
  584. __I uint32_t RESERVED1[2];
  585. __IO uint32_t EVENTS_BCMATCH; /*!< Bit counter reached bit count value. */
  586. __I uint32_t RESERVED2;
  587. __IO uint32_t EVENTS_CRCOK; /*!< Packet received with CRC ok */
  588. __IO uint32_t EVENTS_CRCERROR; /*!< Packet received with CRC error */
  589. __I uint32_t RESERVED3[50];
  590. __IO uint32_t SHORTS; /*!< Shortcut register */
  591. __I uint32_t RESERVED4[64];
  592. __IO uint32_t INTENSET; /*!< Enable interrupt */
  593. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  594. __I uint32_t RESERVED5[61];
  595. __I uint32_t CRCSTATUS; /*!< CRC status */
  596. __I uint32_t RESERVED6;
  597. __I uint32_t RXMATCH; /*!< Received address */
  598. __I uint32_t RXCRC; /*!< CRC field of previously received packet */
  599. __I uint32_t DAI; /*!< Device address match index */
  600. __I uint32_t RESERVED7[60];
  601. __IO uint32_t PACKETPTR; /*!< Packet pointer */
  602. __IO uint32_t FREQUENCY; /*!< Frequency */
  603. __IO uint32_t TXPOWER; /*!< Output power */
  604. __IO uint32_t MODE; /*!< Data rate and modulation */
  605. __IO uint32_t PCNF0; /*!< Packet configuration register 0 */
  606. __IO uint32_t PCNF1; /*!< Packet configuration register 1 */
  607. __IO uint32_t BASE0; /*!< Base address 0 */
  608. __IO uint32_t BASE1; /*!< Base address 1 */
  609. __IO uint32_t PREFIX0; /*!< Prefixes bytes for logical addresses 0-3 */
  610. __IO uint32_t PREFIX1; /*!< Prefixes bytes for logical addresses 4-7 */
  611. __IO uint32_t TXADDRESS; /*!< Transmit address select */
  612. __IO uint32_t RXADDRESSES; /*!< Receive address select */
  613. __IO uint32_t CRCCNF; /*!< CRC configuration */
  614. __IO uint32_t CRCPOLY; /*!< CRC polynomial */
  615. __IO uint32_t CRCINIT; /*!< CRC initial value */
  616. __IO uint32_t UNUSED0; /*!< Unspecified */
  617. __IO uint32_t TIFS; /*!< Inter Frame Spacing in us */
  618. __I uint32_t RSSISAMPLE; /*!< RSSI sample */
  619. __I uint32_t RESERVED8;
  620. __I uint32_t STATE; /*!< Current radio state */
  621. __IO uint32_t DATAWHITEIV; /*!< Data whitening initial value */
  622. __I uint32_t RESERVED9[2];
  623. __IO uint32_t BCC; /*!< Bit counter compare */
  624. __I uint32_t RESERVED10[39];
  625. __IO uint32_t DAB[8]; /*!< Description collection[0]: Device address base segment 0 */
  626. __IO uint32_t DAP[8]; /*!< Description collection[0]: Device address prefix 0 */
  627. __IO uint32_t DACNF; /*!< Device address match configuration */
  628. __I uint32_t RESERVED11[3];
  629. __IO uint32_t MODECNF0; /*!< Radio mode configuration register 0 */
  630. __I uint32_t RESERVED12[618];
  631. __IO uint32_t POWER; /*!< Peripheral power control */
  632. } NRF_RADIO_Type;
  633. /* ================================================================================ */
  634. /* ================ UARTE ================ */
  635. /* ================================================================================ */
  636. /**
  637. * @brief UART with EasyDMA (UARTE)
  638. */
  639. typedef struct { /*!< UARTE Structure */
  640. __O uint32_t TASKS_STARTRX; /*!< Start UART receiver */
  641. __O uint32_t TASKS_STOPRX; /*!< Stop UART receiver */
  642. __O uint32_t TASKS_STARTTX; /*!< Start UART transmitter */
  643. __O uint32_t TASKS_STOPTX; /*!< Stop UART transmitter */
  644. __I uint32_t RESERVED0[7];
  645. __O uint32_t TASKS_FLUSHRX; /*!< Flush RX FIFO into RX buffer */
  646. __I uint32_t RESERVED1[52];
  647. __IO uint32_t EVENTS_CTS; /*!< CTS is activated (set low). Clear To Send. */
  648. __IO uint32_t EVENTS_NCTS; /*!< CTS is deactivated (set high). Not Clear To Send. */
  649. __I uint32_t RESERVED2[2];
  650. __IO uint32_t EVENTS_ENDRX; /*!< Receive buffer is filled up */
  651. __I uint32_t RESERVED3[3];
  652. __IO uint32_t EVENTS_ENDTX; /*!< Last TX byte transmitted */
  653. __IO uint32_t EVENTS_ERROR; /*!< Error detected */
  654. __I uint32_t RESERVED4[7];
  655. __IO uint32_t EVENTS_RXTO; /*!< Receiver timeout */
  656. __I uint32_t RESERVED5;
  657. __IO uint32_t EVENTS_RXSTARTED; /*!< UART receiver has started */
  658. __IO uint32_t EVENTS_TXSTARTED; /*!< UART transmitter has started */
  659. __I uint32_t RESERVED6;
  660. __IO uint32_t EVENTS_TXSTOPPED; /*!< Transmitter stopped */
  661. __I uint32_t RESERVED7[41];
  662. __IO uint32_t SHORTS; /*!< Shortcut register */
  663. __I uint32_t RESERVED8[63];
  664. __IO uint32_t INTEN; /*!< Enable or disable interrupt */
  665. __IO uint32_t INTENSET; /*!< Enable interrupt */
  666. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  667. __I uint32_t RESERVED9[93];
  668. __IO uint32_t ERRORSRC; /*!< Error source */
  669. __I uint32_t RESERVED10[31];
  670. __IO uint32_t ENABLE; /*!< Enable UART */
  671. __I uint32_t RESERVED11;
  672. UARTE_PSEL_Type PSEL; /*!< Unspecified */
  673. __I uint32_t RESERVED12[3];
  674. __IO uint32_t BAUDRATE; /*!< Baud rate */
  675. __I uint32_t RESERVED13[3];
  676. UARTE_RXD_Type RXD; /*!< RXD EasyDMA channel */
  677. __I uint32_t RESERVED14;
  678. UARTE_TXD_Type TXD; /*!< TXD EasyDMA channel */
  679. __I uint32_t RESERVED15[7];
  680. __IO uint32_t CONFIG; /*!< Configuration of parity and hardware flow control */
  681. } NRF_UARTE_Type;
  682. /* ================================================================================ */
  683. /* ================ UART ================ */
  684. /* ================================================================================ */
  685. /**
  686. * @brief Universal Asynchronous Receiver/Transmitter (UART)
  687. */
  688. typedef struct { /*!< UART Structure */
  689. __O uint32_t TASKS_STARTRX; /*!< Start UART receiver */
  690. __O uint32_t TASKS_STOPRX; /*!< Stop UART receiver */
  691. __O uint32_t TASKS_STARTTX; /*!< Start UART transmitter */
  692. __O uint32_t TASKS_STOPTX; /*!< Stop UART transmitter */
  693. __I uint32_t RESERVED0[3];
  694. __O uint32_t TASKS_SUSPEND; /*!< Suspend UART */
  695. __I uint32_t RESERVED1[56];
  696. __IO uint32_t EVENTS_CTS; /*!< CTS is activated (set low). Clear To Send. */
  697. __IO uint32_t EVENTS_NCTS; /*!< CTS is deactivated (set high). Not Clear To Send. */
  698. __IO uint32_t EVENTS_RXDRDY; /*!< Data received in RXD */
  699. __I uint32_t RESERVED2[4];
  700. __IO uint32_t EVENTS_TXDRDY; /*!< Data sent from TXD */
  701. __I uint32_t RESERVED3;
  702. __IO uint32_t EVENTS_ERROR; /*!< Error detected */
  703. __I uint32_t RESERVED4[7];
  704. __IO uint32_t EVENTS_RXTO; /*!< Receiver timeout */
  705. __I uint32_t RESERVED5[46];
  706. __IO uint32_t SHORTS; /*!< Shortcut register */
  707. __I uint32_t RESERVED6[64];
  708. __IO uint32_t INTENSET; /*!< Enable interrupt */
  709. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  710. __I uint32_t RESERVED7[93];
  711. __IO uint32_t ERRORSRC; /*!< Error source */
  712. __I uint32_t RESERVED8[31];
  713. __IO uint32_t ENABLE; /*!< Enable UART */
  714. __I uint32_t RESERVED9;
  715. __IO uint32_t PSELRTS; /*!< Pin select for RTS */
  716. __IO uint32_t PSELTXD; /*!< Pin select for TXD */
  717. __IO uint32_t PSELCTS; /*!< Pin select for CTS */
  718. __IO uint32_t PSELRXD; /*!< Pin select for RXD */
  719. __I uint32_t RXD; /*!< RXD register */
  720. __O uint32_t TXD; /*!< TXD register */
  721. __I uint32_t RESERVED10;
  722. __IO uint32_t BAUDRATE; /*!< Baud rate */
  723. __I uint32_t RESERVED11[17];
  724. __IO uint32_t CONFIG; /*!< Configuration of parity and hardware flow control */
  725. } NRF_UART_Type;
  726. /* ================================================================================ */
  727. /* ================ SPIM ================ */
  728. /* ================================================================================ */
  729. /**
  730. * @brief Serial Peripheral Interface Master with EasyDMA 0 (SPIM)
  731. */
  732. typedef struct { /*!< SPIM Structure */
  733. __I uint32_t RESERVED0[4];
  734. __O uint32_t TASKS_START; /*!< Start SPI transaction */
  735. __O uint32_t TASKS_STOP; /*!< Stop SPI transaction */
  736. __I uint32_t RESERVED1;
  737. __O uint32_t TASKS_SUSPEND; /*!< Suspend SPI transaction */
  738. __O uint32_t TASKS_RESUME; /*!< Resume SPI transaction */
  739. __I uint32_t RESERVED2[56];
  740. __IO uint32_t EVENTS_STOPPED; /*!< SPI transaction has stopped */
  741. __I uint32_t RESERVED3[2];
  742. __IO uint32_t EVENTS_ENDRX; /*!< End of RXD buffer reached */
  743. __I uint32_t RESERVED4;
  744. __IO uint32_t EVENTS_END; /*!< End of RXD buffer and TXD buffer reached */
  745. __I uint32_t RESERVED5;
  746. __IO uint32_t EVENTS_ENDTX; /*!< End of TXD buffer reached */
  747. __I uint32_t RESERVED6[10];
  748. __IO uint32_t EVENTS_STARTED; /*!< Transaction started */
  749. __I uint32_t RESERVED7[44];
  750. __IO uint32_t SHORTS; /*!< Shortcut register */
  751. __I uint32_t RESERVED8[64];
  752. __IO uint32_t INTENSET; /*!< Enable interrupt */
  753. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  754. __I uint32_t RESERVED9[125];
  755. __IO uint32_t ENABLE; /*!< Enable SPIM */
  756. __I uint32_t RESERVED10;
  757. SPIM_PSEL_Type PSEL; /*!< Unspecified */
  758. __I uint32_t RESERVED11[4];
  759. __IO uint32_t FREQUENCY; /*!< SPI frequency */
  760. __I uint32_t RESERVED12[3];
  761. SPIM_RXD_Type RXD; /*!< RXD EasyDMA channel */
  762. SPIM_TXD_Type TXD; /*!< TXD EasyDMA channel */
  763. __IO uint32_t CONFIG; /*!< Configuration register */
  764. __I uint32_t RESERVED13[26];
  765. __IO uint32_t ORC; /*!< Over-read character. Character clocked out in case and over-read
  766. of the TXD buffer. */
  767. } NRF_SPIM_Type;
  768. /* ================================================================================ */
  769. /* ================ SPIS ================ */
  770. /* ================================================================================ */
  771. /**
  772. * @brief SPI Slave 0 (SPIS)
  773. */
  774. typedef struct { /*!< SPIS Structure */
  775. __I uint32_t RESERVED0[9];
  776. __O uint32_t TASKS_ACQUIRE; /*!< Acquire SPI semaphore */
  777. __O uint32_t TASKS_RELEASE; /*!< Release SPI semaphore, enabling the SPI slave to acquire it */
  778. __I uint32_t RESERVED1[54];
  779. __IO uint32_t EVENTS_END; /*!< Granted transaction completed */
  780. __I uint32_t RESERVED2[2];
  781. __IO uint32_t EVENTS_ENDRX; /*!< End of RXD buffer reached */
  782. __I uint32_t RESERVED3[5];
  783. __IO uint32_t EVENTS_ACQUIRED; /*!< Semaphore acquired */
  784. __I uint32_t RESERVED4[53];
  785. __IO uint32_t SHORTS; /*!< Shortcut register */
  786. __I uint32_t RESERVED5[64];
  787. __IO uint32_t INTENSET; /*!< Enable interrupt */
  788. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  789. __I uint32_t RESERVED6[61];
  790. __I uint32_t SEMSTAT; /*!< Semaphore status register */
  791. __I uint32_t RESERVED7[15];
  792. __IO uint32_t STATUS; /*!< Status from last transaction */
  793. __I uint32_t RESERVED8[47];
  794. __IO uint32_t ENABLE; /*!< Enable SPI slave */
  795. __I uint32_t RESERVED9;
  796. SPIS_PSEL_Type PSEL; /*!< Unspecified */
  797. __I uint32_t RESERVED10[7];
  798. SPIS_RXD_Type RXD; /*!< Unspecified */
  799. __I uint32_t RESERVED11;
  800. SPIS_TXD_Type TXD; /*!< Unspecified */
  801. __I uint32_t RESERVED12;
  802. __IO uint32_t CONFIG; /*!< Configuration register */
  803. __I uint32_t RESERVED13;
  804. __IO uint32_t DEF; /*!< Default character. Character clocked out in case of an ignored
  805. transaction. */
  806. __I uint32_t RESERVED14[24];
  807. __IO uint32_t ORC; /*!< Over-read character */
  808. } NRF_SPIS_Type;
  809. /* ================================================================================ */
  810. /* ================ TWIM ================ */
  811. /* ================================================================================ */
  812. /**
  813. * @brief I2C compatible Two-Wire Master Interface with EasyDMA 0 (TWIM)
  814. */
  815. typedef struct { /*!< TWIM Structure */
  816. __O uint32_t TASKS_STARTRX; /*!< Start TWI receive sequence */
  817. __I uint32_t RESERVED0;
  818. __O uint32_t TASKS_STARTTX; /*!< Start TWI transmit sequence */
  819. __I uint32_t RESERVED1[2];
  820. __O uint32_t TASKS_STOP; /*!< Stop TWI transaction. Must be issued while the TWI master is
  821. not suspended. */
  822. __I uint32_t RESERVED2;
  823. __O uint32_t TASKS_SUSPEND; /*!< Suspend TWI transaction */
  824. __O uint32_t TASKS_RESUME; /*!< Resume TWI transaction */
  825. __I uint32_t RESERVED3[56];
  826. __IO uint32_t EVENTS_STOPPED; /*!< TWI stopped */
  827. __I uint32_t RESERVED4[7];
  828. __IO uint32_t EVENTS_ERROR; /*!< TWI error */
  829. __I uint32_t RESERVED5[8];
  830. __IO uint32_t EVENTS_SUSPENDED; /*!< Last byte has been sent out after the SUSPEND task has been
  831. issued, TWI traffic is now suspended. */
  832. __IO uint32_t EVENTS_RXSTARTED; /*!< Receive sequence started */
  833. __IO uint32_t EVENTS_TXSTARTED; /*!< Transmit sequence started */
  834. __I uint32_t RESERVED6[2];
  835. __IO uint32_t EVENTS_LASTRX; /*!< Byte boundary, starting to receive the last byte */
  836. __IO uint32_t EVENTS_LASTTX; /*!< Byte boundary, starting to transmit the last byte */
  837. __I uint32_t RESERVED7[39];
  838. __IO uint32_t SHORTS; /*!< Shortcut register */
  839. __I uint32_t RESERVED8[63];
  840. __IO uint32_t INTEN; /*!< Enable or disable interrupt */
  841. __IO uint32_t INTENSET; /*!< Enable interrupt */
  842. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  843. __I uint32_t RESERVED9[110];
  844. __IO uint32_t ERRORSRC; /*!< Error source */
  845. __I uint32_t RESERVED10[14];
  846. __IO uint32_t ENABLE; /*!< Enable TWIM */
  847. __I uint32_t RESERVED11;
  848. TWIM_PSEL_Type PSEL; /*!< Unspecified */
  849. __I uint32_t RESERVED12[5];
  850. __IO uint32_t FREQUENCY; /*!< TWI frequency */
  851. __I uint32_t RESERVED13[3];
  852. TWIM_RXD_Type RXD; /*!< RXD EasyDMA channel */
  853. TWIM_TXD_Type TXD; /*!< TXD EasyDMA channel */
  854. __I uint32_t RESERVED14[13];
  855. __IO uint32_t ADDRESS; /*!< Address used in the TWI transfer */
  856. } NRF_TWIM_Type;
  857. /* ================================================================================ */
  858. /* ================ TWIS ================ */
  859. /* ================================================================================ */
  860. /**
  861. * @brief I2C compatible Two-Wire Slave Interface with EasyDMA 0 (TWIS)
  862. */
  863. typedef struct { /*!< TWIS Structure */
  864. __I uint32_t RESERVED0[5];
  865. __O uint32_t TASKS_STOP; /*!< Stop TWI transaction */
  866. __I uint32_t RESERVED1;
  867. __O uint32_t TASKS_SUSPEND; /*!< Suspend TWI transaction */
  868. __O uint32_t TASKS_RESUME; /*!< Resume TWI transaction */
  869. __I uint32_t RESERVED2[3];
  870. __O uint32_t TASKS_PREPARERX; /*!< Prepare the TWI slave to respond to a write command */
  871. __O uint32_t TASKS_PREPARETX; /*!< Prepare the TWI slave to respond to a read command */
  872. __I uint32_t RESERVED3[51];
  873. __IO uint32_t EVENTS_STOPPED; /*!< TWI stopped */
  874. __I uint32_t RESERVED4[7];
  875. __IO uint32_t EVENTS_ERROR; /*!< TWI error */
  876. __I uint32_t RESERVED5[9];
  877. __IO uint32_t EVENTS_RXSTARTED; /*!< Receive sequence started */
  878. __IO uint32_t EVENTS_TXSTARTED; /*!< Transmit sequence started */
  879. __I uint32_t RESERVED6[4];
  880. __IO uint32_t EVENTS_WRITE; /*!< Write command received */
  881. __IO uint32_t EVENTS_READ; /*!< Read command received */
  882. __I uint32_t RESERVED7[37];
  883. __IO uint32_t SHORTS; /*!< Shortcut register */
  884. __I uint32_t RESERVED8[63];
  885. __IO uint32_t INTEN; /*!< Enable or disable interrupt */
  886. __IO uint32_t INTENSET; /*!< Enable interrupt */
  887. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  888. __I uint32_t RESERVED9[113];
  889. __IO uint32_t ERRORSRC; /*!< Error source */
  890. __I uint32_t MATCH; /*!< Status register indicating which address had a match */
  891. __I uint32_t RESERVED10[10];
  892. __IO uint32_t ENABLE; /*!< Enable TWIS */
  893. __I uint32_t RESERVED11;
  894. TWIS_PSEL_Type PSEL; /*!< Unspecified */
  895. __I uint32_t RESERVED12[9];
  896. TWIS_RXD_Type RXD; /*!< RXD EasyDMA channel */
  897. __I uint32_t RESERVED13;
  898. TWIS_TXD_Type TXD; /*!< TXD EasyDMA channel */
  899. __I uint32_t RESERVED14[14];
  900. __IO uint32_t ADDRESS[2]; /*!< Description collection[0]: TWI slave address 0 */
  901. __I uint32_t RESERVED15;
  902. __IO uint32_t CONFIG; /*!< Configuration register for the address match mechanism */
  903. __I uint32_t RESERVED16[10];
  904. __IO uint32_t ORC; /*!< Over-read character. Character sent out in case of an over-read
  905. of the transmit buffer. */
  906. } NRF_TWIS_Type;
  907. /* ================================================================================ */
  908. /* ================ SPI ================ */
  909. /* ================================================================================ */
  910. /**
  911. * @brief Serial Peripheral Interface 0 (SPI)
  912. */
  913. typedef struct { /*!< SPI Structure */
  914. __I uint32_t RESERVED0[66];
  915. __IO uint32_t EVENTS_READY; /*!< TXD byte sent and RXD byte received */
  916. __I uint32_t RESERVED1[126];
  917. __IO uint32_t INTENSET; /*!< Enable interrupt */
  918. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  919. __I uint32_t RESERVED2[125];
  920. __IO uint32_t ENABLE; /*!< Enable SPI */
  921. __I uint32_t RESERVED3;
  922. SPI_PSEL_Type PSEL; /*!< Unspecified */
  923. __I uint32_t RESERVED4;
  924. __I uint32_t RXD; /*!< RXD register */
  925. __IO uint32_t TXD; /*!< TXD register */
  926. __I uint32_t RESERVED5;
  927. __IO uint32_t FREQUENCY; /*!< SPI frequency */
  928. __I uint32_t RESERVED6[11];
  929. __IO uint32_t CONFIG; /*!< Configuration register */
  930. } NRF_SPI_Type;
  931. /* ================================================================================ */
  932. /* ================ TWI ================ */
  933. /* ================================================================================ */
  934. /**
  935. * @brief I2C compatible Two-Wire Interface 0 (TWI)
  936. */
  937. typedef struct { /*!< TWI Structure */
  938. __O uint32_t TASKS_STARTRX; /*!< Start TWI receive sequence */
  939. __I uint32_t RESERVED0;
  940. __O uint32_t TASKS_STARTTX; /*!< Start TWI transmit sequence */
  941. __I uint32_t RESERVED1[2];
  942. __O uint32_t TASKS_STOP; /*!< Stop TWI transaction */
  943. __I uint32_t RESERVED2;
  944. __O uint32_t TASKS_SUSPEND; /*!< Suspend TWI transaction */
  945. __O uint32_t TASKS_RESUME; /*!< Resume TWI transaction */
  946. __I uint32_t RESERVED3[56];
  947. __IO uint32_t EVENTS_STOPPED; /*!< TWI stopped */
  948. __IO uint32_t EVENTS_RXDREADY; /*!< TWI RXD byte received */
  949. __I uint32_t RESERVED4[4];
  950. __IO uint32_t EVENTS_TXDSENT; /*!< TWI TXD byte sent */
  951. __I uint32_t RESERVED5;
  952. __IO uint32_t EVENTS_ERROR; /*!< TWI error */
  953. __I uint32_t RESERVED6[4];
  954. __IO uint32_t EVENTS_BB; /*!< TWI byte boundary, generated before each byte that is sent or
  955. received */
  956. __I uint32_t RESERVED7[3];
  957. __IO uint32_t EVENTS_SUSPENDED; /*!< TWI entered the suspended state */
  958. __I uint32_t RESERVED8[45];
  959. __IO uint32_t SHORTS; /*!< Shortcut register */
  960. __I uint32_t RESERVED9[64];
  961. __IO uint32_t INTENSET; /*!< Enable interrupt */
  962. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  963. __I uint32_t RESERVED10[110];
  964. __IO uint32_t ERRORSRC; /*!< Error source */
  965. __I uint32_t RESERVED11[14];
  966. __IO uint32_t ENABLE; /*!< Enable TWI */
  967. __I uint32_t RESERVED12;
  968. __IO uint32_t PSELSCL; /*!< Pin select for SCL */
  969. __IO uint32_t PSELSDA; /*!< Pin select for SDA */
  970. __I uint32_t RESERVED13[2];
  971. __I uint32_t RXD; /*!< RXD register */
  972. __IO uint32_t TXD; /*!< TXD register */
  973. __I uint32_t RESERVED14;
  974. __IO uint32_t FREQUENCY; /*!< TWI frequency */
  975. __I uint32_t RESERVED15[24];
  976. __IO uint32_t ADDRESS; /*!< Address used in the TWI transfer */
  977. } NRF_TWI_Type;
  978. /* ================================================================================ */
  979. /* ================ NFCT ================ */
  980. /* ================================================================================ */
  981. /**
  982. * @brief NFC-A compatible radio (NFCT)
  983. */
  984. typedef struct { /*!< NFCT Structure */
  985. __O uint32_t TASKS_ACTIVATE; /*!< Activate NFC peripheral for incoming and outgoing frames, change
  986. state to activated */
  987. __O uint32_t TASKS_DISABLE; /*!< Disable NFC peripheral */
  988. __O uint32_t TASKS_SENSE; /*!< Enable NFC sense field mode, change state to sense mode */
  989. __O uint32_t TASKS_STARTTX; /*!< Start transmission of a outgoing frame, change state to transmit */
  990. __I uint32_t RESERVED0[3];
  991. __O uint32_t TASKS_ENABLERXDATA; /*!< Initializes the EasyDMA for receive. */
  992. __I uint32_t RESERVED1;
  993. __O uint32_t TASKS_GOIDLE; /*!< Force state machine to IDLE state */
  994. __O uint32_t TASKS_GOSLEEP; /*!< Force state machine to SLEEP_A state */
  995. __I uint32_t RESERVED2[53];
  996. __IO uint32_t EVENTS_READY; /*!< The NFC peripheral is ready to receive and send frames */
  997. __IO uint32_t EVENTS_FIELDDETECTED; /*!< Remote NFC field detected */
  998. __IO uint32_t EVENTS_FIELDLOST; /*!< Remote NFC field lost */
  999. __IO uint32_t EVENTS_TXFRAMESTART; /*!< Marks the start of the first symbol of a transmitted frame */
  1000. __IO uint32_t EVENTS_TXFRAMEEND; /*!< Marks the end of the last transmitted on-air symbol of a frame */
  1001. __IO uint32_t EVENTS_RXFRAMESTART; /*!< Marks the end of the first symbol of a received frame */
  1002. __IO uint32_t EVENTS_RXFRAMEEND; /*!< Received data have been checked (CRC, parity) and transferred
  1003. to RAM, and EasyDMA has ended accessing the RX buffer */
  1004. __IO uint32_t EVENTS_ERROR; /*!< NFC error reported. The ERRORSTATUS register contains details
  1005. on the source of the error. */
  1006. __I uint32_t RESERVED3[2];
  1007. __IO uint32_t EVENTS_RXERROR; /*!< NFC RX frame error reported. The FRAMESTATUS.RX register contains
  1008. details on the source of the error. */
  1009. __IO uint32_t EVENTS_ENDRX; /*!< RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full. */
  1010. __IO uint32_t EVENTS_ENDTX; /*!< Transmission of data in RAM has ended, and EasyDMA has ended
  1011. accessing the TX buffer */
  1012. __I uint32_t RESERVED4;
  1013. __IO uint32_t EVENTS_AUTOCOLRESSTARTED; /*!< Auto collision resolution process has started */
  1014. __I uint32_t RESERVED5[3];
  1015. __IO uint32_t EVENTS_COLLISION; /*!< NFC Auto collision resolution error reported. */
  1016. __IO uint32_t EVENTS_SELECTED; /*!< NFC Auto collision resolution successfully completed */
  1017. __IO uint32_t EVENTS_STARTED; /*!< EasyDMA is ready to receive or send frames. */
  1018. __I uint32_t RESERVED6[43];
  1019. __IO uint32_t SHORTS; /*!< Shortcut register */
  1020. __I uint32_t RESERVED7[63];
  1021. __IO uint32_t INTEN; /*!< Enable or disable interrupt */
  1022. __IO uint32_t INTENSET; /*!< Enable interrupt */
  1023. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  1024. __I uint32_t RESERVED8[62];
  1025. __IO uint32_t ERRORSTATUS; /*!< NFC Error Status register */
  1026. __I uint32_t RESERVED9;
  1027. NFCT_FRAMESTATUS_Type FRAMESTATUS; /*!< Unspecified */
  1028. __I uint32_t RESERVED10[8];
  1029. __I uint32_t CURRENTLOADCTRL; /*!< Current value driven to the NFC Load Control */
  1030. __I uint32_t RESERVED11[2];
  1031. __I uint32_t FIELDPRESENT; /*!< Indicates the presence or not of a valid field */
  1032. __I uint32_t RESERVED12[49];
  1033. __IO uint32_t FRAMEDELAYMIN; /*!< Minimum frame delay */
  1034. __IO uint32_t FRAMEDELAYMAX; /*!< Maximum frame delay */
  1035. __IO uint32_t FRAMEDELAYMODE; /*!< Configuration register for the Frame Delay Timer */
  1036. __IO uint32_t PACKETPTR; /*!< Packet pointer for TXD and RXD data storage in Data RAM */
  1037. __IO uint32_t MAXLEN; /*!< Size of allocated for TXD and RXD data storage buffer in Data
  1038. RAM */
  1039. NFCT_TXD_Type TXD; /*!< Unspecified */
  1040. NFCT_RXD_Type RXD; /*!< Unspecified */
  1041. __I uint32_t RESERVED13[26];
  1042. __IO uint32_t NFCID1_LAST; /*!< Last NFCID1 part (4, 7 or 10 bytes ID) */
  1043. __IO uint32_t NFCID1_2ND_LAST; /*!< Second last NFCID1 part (7 or 10 bytes ID) */
  1044. __IO uint32_t NFCID1_3RD_LAST; /*!< Third last NFCID1 part (10 bytes ID) */
  1045. __I uint32_t RESERVED14;
  1046. __IO uint32_t SENSRES; /*!< NFC-A SENS_RES auto-response settings */
  1047. __IO uint32_t SELRES; /*!< NFC-A SEL_RES auto-response settings */
  1048. } NRF_NFCT_Type;
  1049. /* ================================================================================ */
  1050. /* ================ GPIOTE ================ */
  1051. /* ================================================================================ */
  1052. /**
  1053. * @brief GPIO Tasks and Events (GPIOTE)
  1054. */
  1055. typedef struct { /*!< GPIOTE Structure */
  1056. __O uint32_t TASKS_OUT[8]; /*!< Description collection[0]: Task for writing to pin specified
  1057. in CONFIG[0].PSEL. Action on pin is configured in CONFIG[0].POLARITY. */
  1058. __I uint32_t RESERVED0[4];
  1059. __O uint32_t TASKS_SET[8]; /*!< Description collection[0]: Task for writing to pin specified
  1060. in CONFIG[0].PSEL. Action on pin is to set it high. */
  1061. __I uint32_t RESERVED1[4];
  1062. __O uint32_t TASKS_CLR[8]; /*!< Description collection[0]: Task for writing to pin specified
  1063. in CONFIG[0].PSEL. Action on pin is to set it low. */
  1064. __I uint32_t RESERVED2[32];
  1065. __IO uint32_t EVENTS_IN[8]; /*!< Description collection[0]: Event generated from pin specified
  1066. in CONFIG[0].PSEL */
  1067. __I uint32_t RESERVED3[23];
  1068. __IO uint32_t EVENTS_PORT; /*!< Event generated from multiple input GPIO pins with SENSE mechanism
  1069. enabled */
  1070. __I uint32_t RESERVED4[97];
  1071. __IO uint32_t INTENSET; /*!< Enable interrupt */
  1072. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  1073. __I uint32_t RESERVED5[129];
  1074. __IO uint32_t CONFIG[8]; /*!< Description collection[0]: Configuration for OUT[n], SET[n]
  1075. and CLR[n] tasks and IN[n] event */
  1076. } NRF_GPIOTE_Type;
  1077. /* ================================================================================ */
  1078. /* ================ SAADC ================ */
  1079. /* ================================================================================ */
  1080. /**
  1081. * @brief Analog to Digital Converter (SAADC)
  1082. */
  1083. typedef struct { /*!< SAADC Structure */
  1084. __O uint32_t TASKS_START; /*!< Start the ADC and prepare the result buffer in RAM */
  1085. __O uint32_t TASKS_SAMPLE; /*!< Take one ADC sample, if scan is enabled all channels are sampled */
  1086. __O uint32_t TASKS_STOP; /*!< Stop the ADC and terminate any on-going conversion */
  1087. __O uint32_t TASKS_CALIBRATEOFFSET; /*!< Starts offset auto-calibration */
  1088. __I uint32_t RESERVED0[60];
  1089. __IO uint32_t EVENTS_STARTED; /*!< The ADC has started */
  1090. __IO uint32_t EVENTS_END; /*!< The ADC has filled up the Result buffer */
  1091. __IO uint32_t EVENTS_DONE; /*!< A conversion task has been completed. Depending on the mode,
  1092. multiple conversions might be needed for a result to be transferred
  1093. to RAM. */
  1094. __IO uint32_t EVENTS_RESULTDONE; /*!< A result is ready to get transferred to RAM. */
  1095. __IO uint32_t EVENTS_CALIBRATEDONE; /*!< Calibration is complete */
  1096. __IO uint32_t EVENTS_STOPPED; /*!< The ADC has stopped */
  1097. SAADC_EVENTS_CH_Type EVENTS_CH[8]; /*!< Unspecified */
  1098. __I uint32_t RESERVED1[106];
  1099. __IO uint32_t INTEN; /*!< Enable or disable interrupt */
  1100. __IO uint32_t INTENSET; /*!< Enable interrupt */
  1101. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  1102. __I uint32_t RESERVED2[61];
  1103. __I uint32_t STATUS; /*!< Status */
  1104. __I uint32_t RESERVED3[63];
  1105. __IO uint32_t ENABLE; /*!< Enable or disable ADC */
  1106. __I uint32_t RESERVED4[3];
  1107. SAADC_CH_Type CH[8]; /*!< Unspecified */
  1108. __I uint32_t RESERVED5[24];
  1109. __IO uint32_t RESOLUTION; /*!< Resolution configuration */
  1110. __IO uint32_t OVERSAMPLE; /*!< Oversampling configuration. OVERSAMPLE should not be combined
  1111. with SCAN. The RESOLUTION is applied before averaging, thus
  1112. for high OVERSAMPLE a higher RESOLUTION should be used. */
  1113. __IO uint32_t SAMPLERATE; /*!< Controls normal or continuous sample rate */
  1114. __I uint32_t RESERVED6[12];
  1115. SAADC_RESULT_Type RESULT; /*!< RESULT EasyDMA channel */
  1116. } NRF_SAADC_Type;
  1117. /* ================================================================================ */
  1118. /* ================ TIMER ================ */
  1119. /* ================================================================================ */
  1120. /**
  1121. * @brief Timer/Counter 0 (TIMER)
  1122. */
  1123. typedef struct { /*!< TIMER Structure */
  1124. __O uint32_t TASKS_START; /*!< Start Timer */
  1125. __O uint32_t TASKS_STOP; /*!< Stop Timer */
  1126. __O uint32_t TASKS_COUNT; /*!< Increment Timer (Counter mode only) */
  1127. __O uint32_t TASKS_CLEAR; /*!< Clear time */
  1128. __O uint32_t TASKS_SHUTDOWN; /*!< Deprecated register - Shut down timer */
  1129. __I uint32_t RESERVED0[11];
  1130. __O uint32_t TASKS_CAPTURE[6]; /*!< Description collection[0]: Capture Timer value to CC[0] register */
  1131. __I uint32_t RESERVED1[58];
  1132. __IO uint32_t EVENTS_COMPARE[6]; /*!< Description collection[0]: Compare event on CC[0] match */
  1133. __I uint32_t RESERVED2[42];
  1134. __IO uint32_t SHORTS; /*!< Shortcut register */
  1135. __I uint32_t RESERVED3[64];
  1136. __IO uint32_t INTENSET; /*!< Enable interrupt */
  1137. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  1138. __I uint32_t RESERVED4[126];
  1139. __IO uint32_t MODE; /*!< Timer mode selection */
  1140. __IO uint32_t BITMODE; /*!< Configure the number of bits used by the TIMER */
  1141. __I uint32_t RESERVED5;
  1142. __IO uint32_t PRESCALER; /*!< Timer prescaler register */
  1143. __I uint32_t RESERVED6[11];
  1144. __IO uint32_t CC[6]; /*!< Description collection[0]: Capture/Compare register 0 */
  1145. } NRF_TIMER_Type;
  1146. /* ================================================================================ */
  1147. /* ================ RTC ================ */
  1148. /* ================================================================================ */
  1149. /**
  1150. * @brief Real time counter 0 (RTC)
  1151. */
  1152. typedef struct { /*!< RTC Structure */
  1153. __O uint32_t TASKS_START; /*!< Start RTC COUNTER */
  1154. __O uint32_t TASKS_STOP; /*!< Stop RTC COUNTER */
  1155. __O uint32_t TASKS_CLEAR; /*!< Clear RTC COUNTER */
  1156. __O uint32_t TASKS_TRIGOVRFLW; /*!< Set COUNTER to 0xFFFFF0 */
  1157. __I uint32_t RESERVED0[60];
  1158. __IO uint32_t EVENTS_TICK; /*!< Event on COUNTER increment */
  1159. __IO uint32_t EVENTS_OVRFLW; /*!< Event on COUNTER overflow */
  1160. __I uint32_t RESERVED1[14];
  1161. __IO uint32_t EVENTS_COMPARE[4]; /*!< Description collection[0]: Compare event on CC[0] match */
  1162. __I uint32_t RESERVED2[109];
  1163. __IO uint32_t INTENSET; /*!< Enable interrupt */
  1164. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  1165. __I uint32_t RESERVED3[13];
  1166. __IO uint32_t EVTEN; /*!< Enable or disable event routing */
  1167. __IO uint32_t EVTENSET; /*!< Enable event routing */
  1168. __IO uint32_t EVTENCLR; /*!< Disable event routing */
  1169. __I uint32_t RESERVED4[110];
  1170. __I uint32_t COUNTER; /*!< Current COUNTER value */
  1171. __IO uint32_t PRESCALER; /*!< 12 bit prescaler for COUNTER frequency (32768/(PRESCALER+1)).Must
  1172. be written when RTC is stopped */
  1173. __I uint32_t RESERVED5[13];
  1174. __IO uint32_t CC[4]; /*!< Description collection[0]: Compare register 0 */
  1175. } NRF_RTC_Type;
  1176. /* ================================================================================ */
  1177. /* ================ TEMP ================ */
  1178. /* ================================================================================ */
  1179. /**
  1180. * @brief Temperature Sensor (TEMP)
  1181. */
  1182. typedef struct { /*!< TEMP Structure */
  1183. __O uint32_t TASKS_START; /*!< Start temperature measurement */
  1184. __O uint32_t TASKS_STOP; /*!< Stop temperature measurement */
  1185. __I uint32_t RESERVED0[62];
  1186. __IO uint32_t EVENTS_DATARDY; /*!< Temperature measurement complete, data ready */
  1187. __I uint32_t RESERVED1[128];
  1188. __IO uint32_t INTENSET; /*!< Enable interrupt */
  1189. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  1190. __I uint32_t RESERVED2[127];
  1191. __I int32_t TEMP; /*!< Temperature in degC (0.25deg steps) */
  1192. __I uint32_t RESERVED3[5];
  1193. __IO uint32_t A0; /*!< Slope of 1st piece wise linear function */
  1194. __IO uint32_t A1; /*!< Slope of 2nd piece wise linear function */
  1195. __IO uint32_t A2; /*!< Slope of 3rd piece wise linear function */
  1196. __IO uint32_t A3; /*!< Slope of 4th piece wise linear function */
  1197. __IO uint32_t A4; /*!< Slope of 5th piece wise linear function */
  1198. __IO uint32_t A5; /*!< Slope of 6th piece wise linear function */
  1199. __I uint32_t RESERVED4[2];
  1200. __IO uint32_t B0; /*!< y-intercept of 1st piece wise linear function */
  1201. __IO uint32_t B1; /*!< y-intercept of 2nd piece wise linear function */
  1202. __IO uint32_t B2; /*!< y-intercept of 3rd piece wise linear function */
  1203. __IO uint32_t B3; /*!< y-intercept of 4th piece wise linear function */
  1204. __IO uint32_t B4; /*!< y-intercept of 5th piece wise linear function */
  1205. __IO uint32_t B5; /*!< y-intercept of 6th piece wise linear function */
  1206. __I uint32_t RESERVED5[2];
  1207. __IO uint32_t T0; /*!< End point of 1st piece wise linear function */
  1208. __IO uint32_t T1; /*!< End point of 2nd piece wise linear function */
  1209. __IO uint32_t T2; /*!< End point of 3rd piece wise linear function */
  1210. __IO uint32_t T3; /*!< End point of 4th piece wise linear function */
  1211. __IO uint32_t T4; /*!< End point of 5th piece wise linear function */
  1212. } NRF_TEMP_Type;
  1213. /* ================================================================================ */
  1214. /* ================ RNG ================ */
  1215. /* ================================================================================ */
  1216. /**
  1217. * @brief Random Number Generator (RNG)
  1218. */
  1219. typedef struct { /*!< RNG Structure */
  1220. __O uint32_t TASKS_START; /*!< Task starting the random number generator */
  1221. __O uint32_t TASKS_STOP; /*!< Task stopping the random number generator */
  1222. __I uint32_t RESERVED0[62];
  1223. __IO uint32_t EVENTS_VALRDY; /*!< Event being generated for every new random number written to
  1224. the VALUE register */
  1225. __I uint32_t RESERVED1[63];
  1226. __IO uint32_t SHORTS; /*!< Shortcut register */
  1227. __I uint32_t RESERVED2[64];
  1228. __IO uint32_t INTENSET; /*!< Enable interrupt */
  1229. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  1230. __I uint32_t RESERVED3[126];
  1231. __IO uint32_t CONFIG; /*!< Configuration register */
  1232. __I uint32_t VALUE; /*!< Output random number */
  1233. } NRF_RNG_Type;
  1234. /* ================================================================================ */
  1235. /* ================ ECB ================ */
  1236. /* ================================================================================ */
  1237. /**
  1238. * @brief AES ECB Mode Encryption (ECB)
  1239. */
  1240. typedef struct { /*!< ECB Structure */
  1241. __O uint32_t TASKS_STARTECB; /*!< Start ECB block encrypt */
  1242. __O uint32_t TASKS_STOPECB; /*!< Abort a possible executing ECB operation */
  1243. __I uint32_t RESERVED0[62];
  1244. __IO uint32_t EVENTS_ENDECB; /*!< ECB block encrypt complete */
  1245. __IO uint32_t EVENTS_ERRORECB; /*!< ECB block encrypt aborted because of a STOPECB task or due to
  1246. an error */
  1247. __I uint32_t RESERVED1[127];
  1248. __IO uint32_t INTENSET; /*!< Enable interrupt */
  1249. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  1250. __I uint32_t RESERVED2[126];
  1251. __IO uint32_t ECBDATAPTR; /*!< ECB block encrypt memory pointers */
  1252. } NRF_ECB_Type;
  1253. /* ================================================================================ */
  1254. /* ================ CCM ================ */
  1255. /* ================================================================================ */
  1256. /**
  1257. * @brief AES CCM Mode Encryption (CCM)
  1258. */
  1259. typedef struct { /*!< CCM Structure */
  1260. __O uint32_t TASKS_KSGEN; /*!< Start generation of key-stream. This operation will stop by
  1261. itself when completed. */
  1262. __O uint32_t TASKS_CRYPT; /*!< Start encryption/decryption. This operation will stop by itself
  1263. when completed. */
  1264. __O uint32_t TASKS_STOP; /*!< Stop encryption/decryption */
  1265. __I uint32_t RESERVED0[61];
  1266. __IO uint32_t EVENTS_ENDKSGEN; /*!< Key-stream generation complete */
  1267. __IO uint32_t EVENTS_ENDCRYPT; /*!< Encrypt/decrypt complete */
  1268. __IO uint32_t EVENTS_ERROR; /*!< CCM error event */
  1269. __I uint32_t RESERVED1[61];
  1270. __IO uint32_t SHORTS; /*!< Shortcut register */
  1271. __I uint32_t RESERVED2[64];
  1272. __IO uint32_t INTENSET; /*!< Enable interrupt */
  1273. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  1274. __I uint32_t RESERVED3[61];
  1275. __I uint32_t MICSTATUS; /*!< MIC check result */
  1276. __I uint32_t RESERVED4[63];
  1277. __IO uint32_t ENABLE; /*!< Enable */
  1278. __IO uint32_t MODE; /*!< Operation mode */
  1279. __IO uint32_t CNFPTR; /*!< Pointer to data structure holding AES key and NONCE vector */
  1280. __IO uint32_t INPTR; /*!< Input pointer */
  1281. __IO uint32_t OUTPTR; /*!< Output pointer */
  1282. __IO uint32_t SCRATCHPTR; /*!< Pointer to data area used for temporary storage */
  1283. } NRF_CCM_Type;
  1284. /* ================================================================================ */
  1285. /* ================ AAR ================ */
  1286. /* ================================================================================ */
  1287. /**
  1288. * @brief Accelerated Address Resolver (AAR)
  1289. */
  1290. typedef struct { /*!< AAR Structure */
  1291. __O uint32_t TASKS_START; /*!< Start resolving addresses based on IRKs specified in the IRK
  1292. data structure */
  1293. __I uint32_t RESERVED0;
  1294. __O uint32_t TASKS_STOP; /*!< Stop resolving addresses */
  1295. __I uint32_t RESERVED1[61];
  1296. __IO uint32_t EVENTS_END; /*!< Address resolution procedure complete */
  1297. __IO uint32_t EVENTS_RESOLVED; /*!< Address resolved */
  1298. __IO uint32_t EVENTS_NOTRESOLVED; /*!< Address not resolved */
  1299. __I uint32_t RESERVED2[126];
  1300. __IO uint32_t INTENSET; /*!< Enable interrupt */
  1301. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  1302. __I uint32_t RESERVED3[61];
  1303. __I uint32_t STATUS; /*!< Resolution status */
  1304. __I uint32_t RESERVED4[63];
  1305. __IO uint32_t ENABLE; /*!< Enable AAR */
  1306. __IO uint32_t NIRK; /*!< Number of IRKs */
  1307. __IO uint32_t IRKPTR; /*!< Pointer to IRK data structure */
  1308. __I uint32_t RESERVED5;
  1309. __IO uint32_t ADDRPTR; /*!< Pointer to the resolvable address */
  1310. __IO uint32_t SCRATCHPTR; /*!< Pointer to data area used for temporary storage */
  1311. } NRF_AAR_Type;
  1312. /* ================================================================================ */
  1313. /* ================ WDT ================ */
  1314. /* ================================================================================ */
  1315. /**
  1316. * @brief Watchdog Timer (WDT)
  1317. */
  1318. typedef struct { /*!< WDT Structure */
  1319. __O uint32_t TASKS_START; /*!< Start the watchdog */
  1320. __I uint32_t RESERVED0[63];
  1321. __IO uint32_t EVENTS_TIMEOUT; /*!< Watchdog timeout */
  1322. __I uint32_t RESERVED1[128];
  1323. __IO uint32_t INTENSET; /*!< Enable interrupt */
  1324. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  1325. __I uint32_t RESERVED2[61];
  1326. __I uint32_t RUNSTATUS; /*!< Run status */
  1327. __I uint32_t REQSTATUS; /*!< Request status */
  1328. __I uint32_t RESERVED3[63];
  1329. __IO uint32_t CRV; /*!< Counter reload value */
  1330. __IO uint32_t RREN; /*!< Enable register for reload request registers */
  1331. __IO uint32_t CONFIG; /*!< Configuration register */
  1332. __I uint32_t RESERVED4[60];
  1333. __O uint32_t RR[8]; /*!< Description collection[0]: Reload request 0 */
  1334. } NRF_WDT_Type;
  1335. /* ================================================================================ */
  1336. /* ================ QDEC ================ */
  1337. /* ================================================================================ */
  1338. /**
  1339. * @brief Quadrature Decoder (QDEC)
  1340. */
  1341. typedef struct { /*!< QDEC Structure */
  1342. __O uint32_t TASKS_START; /*!< Task starting the quadrature decoder */
  1343. __O uint32_t TASKS_STOP; /*!< Task stopping the quadrature decoder */
  1344. __O uint32_t TASKS_READCLRACC; /*!< Read and clear ACC and ACCDBL */
  1345. __O uint32_t TASKS_RDCLRACC; /*!< Read and clear ACC */
  1346. __O uint32_t TASKS_RDCLRDBL; /*!< Read and clear ACCDBL */
  1347. __I uint32_t RESERVED0[59];
  1348. __IO uint32_t EVENTS_SAMPLERDY; /*!< Event being generated for every new sample value written to
  1349. the SAMPLE register */
  1350. __IO uint32_t EVENTS_REPORTRDY; /*!< Non-null report ready */
  1351. __IO uint32_t EVENTS_ACCOF; /*!< ACC or ACCDBL register overflow */
  1352. __IO uint32_t EVENTS_DBLRDY; /*!< Double displacement(s) detected */
  1353. __IO uint32_t EVENTS_STOPPED; /*!< QDEC has been stopped */
  1354. __I uint32_t RESERVED1[59];
  1355. __IO uint32_t SHORTS; /*!< Shortcut register */
  1356. __I uint32_t RESERVED2[64];
  1357. __IO uint32_t INTENSET; /*!< Enable interrupt */
  1358. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  1359. __I uint32_t RESERVED3[125];
  1360. __IO uint32_t ENABLE; /*!< Enable the quadrature decoder */
  1361. __IO uint32_t LEDPOL; /*!< LED output pin polarity */
  1362. __IO uint32_t SAMPLEPER; /*!< Sample period */
  1363. __I int32_t SAMPLE; /*!< Motion sample value */
  1364. __IO uint32_t REPORTPER; /*!< Number of samples to be taken before REPORTRDY and DBLRDY events
  1365. can be generated */
  1366. __I int32_t ACC; /*!< Register accumulating the valid transitions */
  1367. __I int32_t ACCREAD; /*!< Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC
  1368. task */
  1369. QDEC_PSEL_Type PSEL; /*!< Unspecified */
  1370. __IO uint32_t DBFEN; /*!< Enable input debounce filters */
  1371. __I uint32_t RESERVED4[5];
  1372. __IO uint32_t LEDPRE; /*!< Time period the LED is switched ON prior to sampling */
  1373. __I uint32_t ACCDBL; /*!< Register accumulating the number of detected double transitions */
  1374. __I uint32_t ACCDBLREAD; /*!< Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL
  1375. task */
  1376. } NRF_QDEC_Type;
  1377. /* ================================================================================ */
  1378. /* ================ COMP ================ */
  1379. /* ================================================================================ */
  1380. /**
  1381. * @brief Comparator (COMP)
  1382. */
  1383. typedef struct { /*!< COMP Structure */
  1384. __O uint32_t TASKS_START; /*!< Start comparator */
  1385. __O uint32_t TASKS_STOP; /*!< Stop comparator */
  1386. __O uint32_t TASKS_SAMPLE; /*!< Sample comparator value */
  1387. __I uint32_t RESERVED0[61];
  1388. __IO uint32_t EVENTS_READY; /*!< COMP is ready and output is valid */
  1389. __IO uint32_t EVENTS_DOWN; /*!< Downward crossing */
  1390. __IO uint32_t EVENTS_UP; /*!< Upward crossing */
  1391. __IO uint32_t EVENTS_CROSS; /*!< Downward or upward crossing */
  1392. __I uint32_t RESERVED1[60];
  1393. __IO uint32_t SHORTS; /*!< Shortcut register */
  1394. __I uint32_t RESERVED2[63];
  1395. __IO uint32_t INTEN; /*!< Enable or disable interrupt */
  1396. __IO uint32_t INTENSET; /*!< Enable interrupt */
  1397. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  1398. __I uint32_t RESERVED3[61];
  1399. __I uint32_t RESULT; /*!< Compare result */
  1400. __I uint32_t RESERVED4[63];
  1401. __IO uint32_t ENABLE; /*!< COMP enable */
  1402. __IO uint32_t PSEL; /*!< Pin select */
  1403. __IO uint32_t REFSEL; /*!< Reference source select */
  1404. __IO uint32_t EXTREFSEL; /*!< External reference select */
  1405. __I uint32_t RESERVED5[8];
  1406. __IO uint32_t TH; /*!< Threshold configuration for hysteresis unit */
  1407. __IO uint32_t MODE; /*!< Mode configuration */
  1408. __IO uint32_t HYST; /*!< Comparator hysteresis enable */
  1409. __IO uint32_t ISOURCE; /*!< Current source select on analog input */
  1410. } NRF_COMP_Type;
  1411. /* ================================================================================ */
  1412. /* ================ LPCOMP ================ */
  1413. /* ================================================================================ */
  1414. /**
  1415. * @brief Low Power Comparator (LPCOMP)
  1416. */
  1417. typedef struct { /*!< LPCOMP Structure */
  1418. __O uint32_t TASKS_START; /*!< Start comparator */
  1419. __O uint32_t TASKS_STOP; /*!< Stop comparator */
  1420. __O uint32_t TASKS_SAMPLE; /*!< Sample comparator value */
  1421. __I uint32_t RESERVED0[61];
  1422. __IO uint32_t EVENTS_READY; /*!< LPCOMP is ready and output is valid */
  1423. __IO uint32_t EVENTS_DOWN; /*!< Downward crossing */
  1424. __IO uint32_t EVENTS_UP; /*!< Upward crossing */
  1425. __IO uint32_t EVENTS_CROSS; /*!< Downward or upward crossing */
  1426. __I uint32_t RESERVED1[60];
  1427. __IO uint32_t SHORTS; /*!< Shortcut register */
  1428. __I uint32_t RESERVED2[64];
  1429. __IO uint32_t INTENSET; /*!< Enable interrupt */
  1430. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  1431. __I uint32_t RESERVED3[61];
  1432. __I uint32_t RESULT; /*!< Compare result */
  1433. __I uint32_t RESERVED4[63];
  1434. __IO uint32_t ENABLE; /*!< Enable LPCOMP */
  1435. __IO uint32_t PSEL; /*!< Input pin select */
  1436. __IO uint32_t REFSEL; /*!< Reference select */
  1437. __IO uint32_t EXTREFSEL; /*!< External reference select */
  1438. __I uint32_t RESERVED5[4];
  1439. __IO uint32_t ANADETECT; /*!< Analog detect configuration */
  1440. __I uint32_t RESERVED6[5];
  1441. __IO uint32_t HYST; /*!< Comparator hysteresis enable */
  1442. } NRF_LPCOMP_Type;
  1443. /* ================================================================================ */
  1444. /* ================ SWI ================ */
  1445. /* ================================================================================ */
  1446. /**
  1447. * @brief Software interrupt 0 (SWI)
  1448. */
  1449. typedef struct { /*!< SWI Structure */
  1450. __I uint32_t UNUSED; /*!< Unused. */
  1451. } NRF_SWI_Type;
  1452. /* ================================================================================ */
  1453. /* ================ EGU ================ */
  1454. /* ================================================================================ */
  1455. /**
  1456. * @brief Event Generator Unit 0 (EGU)
  1457. */
  1458. typedef struct { /*!< EGU Structure */
  1459. __O uint32_t TASKS_TRIGGER[16]; /*!< Description collection[0]: Trigger 0 for triggering the corresponding
  1460. TRIGGERED[0] event */
  1461. __I uint32_t RESERVED0[48];
  1462. __IO uint32_t EVENTS_TRIGGERED[16]; /*!< Description collection[0]: Event number 0 generated by triggering
  1463. the corresponding TRIGGER[0] task */
  1464. __I uint32_t RESERVED1[112];
  1465. __IO uint32_t INTEN; /*!< Enable or disable interrupt */
  1466. __IO uint32_t INTENSET; /*!< Enable interrupt */
  1467. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  1468. } NRF_EGU_Type;
  1469. /* ================================================================================ */
  1470. /* ================ PWM ================ */
  1471. /* ================================================================================ */
  1472. /**
  1473. * @brief Pulse Width Modulation Unit 0 (PWM)
  1474. */
  1475. typedef struct { /*!< PWM Structure */
  1476. __I uint32_t RESERVED0;
  1477. __O uint32_t TASKS_STOP; /*!< Stops PWM pulse generation on all channels at the end of current
  1478. PWM period, and stops sequence playback */
  1479. __O uint32_t TASKS_SEQSTART[2]; /*!< Description collection[0]: Loads the first PWM value on all
  1480. enabled channels from sequence 0, and starts playing that sequence
  1481. at the rate defined in SEQ[0]REFRESH and/or DECODER.MODE. Causes
  1482. PWM generation to start it was not running. */
  1483. __O uint32_t TASKS_NEXTSTEP; /*!< Steps by one value in the current sequence on all enabled channels
  1484. if DECODER.MODE=NextStep. Does not cause PWM generation to start
  1485. it was not running. */
  1486. __I uint32_t RESERVED1[60];
  1487. __IO uint32_t EVENTS_STOPPED; /*!< Response to STOP task, emitted when PWM pulses are no longer
  1488. generated */
  1489. __IO uint32_t EVENTS_SEQSTARTED[2]; /*!< Description collection[0]: First PWM period started on sequence
  1490. 0 */
  1491. __IO uint32_t EVENTS_SEQEND[2]; /*!< Description collection[0]: Emitted at end of every sequence
  1492. 0, when last value from RAM has been applied to wave counter */
  1493. __IO uint32_t EVENTS_PWMPERIODEND; /*!< Emitted at the end of each PWM period */
  1494. __IO uint32_t EVENTS_LOOPSDONE; /*!< Concatenated sequences have been played the amount of times
  1495. defined in LOOP.CNT */
  1496. __I uint32_t RESERVED2[56];
  1497. __IO uint32_t SHORTS; /*!< Shortcut register */
  1498. __I uint32_t RESERVED3[63];
  1499. __IO uint32_t INTEN; /*!< Enable or disable interrupt */
  1500. __IO uint32_t INTENSET; /*!< Enable interrupt */
  1501. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  1502. __I uint32_t RESERVED4[125];
  1503. __IO uint32_t ENABLE; /*!< PWM module enable register */
  1504. __IO uint32_t MODE; /*!< Selects operating mode of the wave counter */
  1505. __IO uint32_t COUNTERTOP; /*!< Value up to which the pulse generator counter counts */
  1506. __IO uint32_t PRESCALER; /*!< Configuration for PWM_CLK */
  1507. __IO uint32_t DECODER; /*!< Configuration of the decoder */
  1508. __IO uint32_t LOOP; /*!< Amount of playback of a loop */
  1509. __I uint32_t RESERVED5[2];
  1510. PWM_SEQ_Type SEQ[2]; /*!< Unspecified */
  1511. PWM_PSEL_Type PSEL; /*!< Unspecified */
  1512. } NRF_PWM_Type;
  1513. /* ================================================================================ */
  1514. /* ================ PDM ================ */
  1515. /* ================================================================================ */
  1516. /**
  1517. * @brief Pulse Density Modulation (Digital Microphone) Interface (PDM)
  1518. */
  1519. typedef struct { /*!< PDM Structure */
  1520. __O uint32_t TASKS_START; /*!< Starts continuous PDM transfer */
  1521. __O uint32_t TASKS_STOP; /*!< Stops PDM transfer */
  1522. __I uint32_t RESERVED0[62];
  1523. __IO uint32_t EVENTS_STARTED; /*!< PDM transfer has started */
  1524. __IO uint32_t EVENTS_STOPPED; /*!< PDM transfer has finished */
  1525. __IO uint32_t EVENTS_END; /*!< The PDM has written the last sample specified by SAMPLE.MAXCNT
  1526. (or the last sample after a STOP task has been received) to
  1527. Data RAM */
  1528. __I uint32_t RESERVED1[125];
  1529. __IO uint32_t INTEN; /*!< Enable or disable interrupt */
  1530. __IO uint32_t INTENSET; /*!< Enable interrupt */
  1531. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  1532. __I uint32_t RESERVED2[125];
  1533. __IO uint32_t ENABLE; /*!< PDM module enable register */
  1534. __IO uint32_t PDMCLKCTRL; /*!< PDM clock generator control */
  1535. __IO uint32_t MODE; /*!< Defines the routing of the connected PDM microphones' signals */
  1536. __I uint32_t RESERVED3[3];
  1537. __IO uint32_t GAINL; /*!< Left output gain adjustment */
  1538. __IO uint32_t GAINR; /*!< Right output gain adjustment */
  1539. __I uint32_t RESERVED4[8];
  1540. PDM_PSEL_Type PSEL; /*!< Unspecified */
  1541. __I uint32_t RESERVED5[6];
  1542. PDM_SAMPLE_Type SAMPLE; /*!< Unspecified */
  1543. } NRF_PDM_Type;
  1544. /* ================================================================================ */
  1545. /* ================ NVMC ================ */
  1546. /* ================================================================================ */
  1547. /**
  1548. * @brief Non Volatile Memory Controller (NVMC)
  1549. */
  1550. typedef struct { /*!< NVMC Structure */
  1551. __I uint32_t RESERVED0[256];
  1552. __I uint32_t READY; /*!< Ready flag */
  1553. __I uint32_t RESERVED1[64];
  1554. __IO uint32_t CONFIG; /*!< Configuration register */
  1555. union {
  1556. __IO uint32_t ERASEPCR1; /*!< Deprecated register - Register for erasing a page in Code area.
  1557. Equivalent to ERASEPAGE. */
  1558. __IO uint32_t ERASEPAGE; /*!< Register for erasing a page in Code area */
  1559. };
  1560. __IO uint32_t ERASEALL; /*!< Register for erasing all non-volatile user memory */
  1561. __IO uint32_t ERASEPCR0; /*!< Deprecated register - Register for erasing a page in Code area.
  1562. Equivalent to ERASEPAGE. */
  1563. __IO uint32_t ERASEUICR; /*!< Register for erasing User Information Configuration Registers */
  1564. __I uint32_t RESERVED2[10];
  1565. __IO uint32_t ICACHECNF; /*!< I-Code cache configuration register. */
  1566. __I uint32_t RESERVED3;
  1567. __IO uint32_t IHIT; /*!< I-Code cache hit counter. */
  1568. __IO uint32_t IMISS; /*!< I-Code cache miss counter. */
  1569. } NRF_NVMC_Type;
  1570. /* ================================================================================ */
  1571. /* ================ PPI ================ */
  1572. /* ================================================================================ */
  1573. /**
  1574. * @brief Programmable Peripheral Interconnect (PPI)
  1575. */
  1576. typedef struct { /*!< PPI Structure */
  1577. PPI_TASKS_CHG_Type TASKS_CHG[6]; /*!< Channel group tasks */
  1578. __I uint32_t RESERVED0[308];
  1579. __IO uint32_t CHEN; /*!< Channel enable register */
  1580. __IO uint32_t CHENSET; /*!< Channel enable set register */
  1581. __IO uint32_t CHENCLR; /*!< Channel enable clear register */
  1582. __I uint32_t RESERVED1;
  1583. PPI_CH_Type CH[20]; /*!< PPI Channel */
  1584. __I uint32_t RESERVED2[148];
  1585. __IO uint32_t CHG[6]; /*!< Description collection[0]: Channel group 0 */
  1586. __I uint32_t RESERVED3[62];
  1587. PPI_FORK_Type FORK[32]; /*!< Fork */
  1588. } NRF_PPI_Type;
  1589. /* ================================================================================ */
  1590. /* ================ MWU ================ */
  1591. /* ================================================================================ */
  1592. /**
  1593. * @brief Memory Watch Unit (MWU)
  1594. */
  1595. typedef struct { /*!< MWU Structure */
  1596. __I uint32_t RESERVED0[64];
  1597. MWU_EVENTS_REGION_Type EVENTS_REGION[4]; /*!< Unspecified */
  1598. __I uint32_t RESERVED1[16];
  1599. MWU_EVENTS_PREGION_Type EVENTS_PREGION[2]; /*!< Unspecified */
  1600. __I uint32_t RESERVED2[100];
  1601. __IO uint32_t INTEN; /*!< Enable or disable interrupt */
  1602. __IO uint32_t INTENSET; /*!< Enable interrupt */
  1603. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  1604. __I uint32_t RESERVED3[5];
  1605. __IO uint32_t NMIEN; /*!< Enable or disable non-maskable interrupt */
  1606. __IO uint32_t NMIENSET; /*!< Enable non-maskable interrupt */
  1607. __IO uint32_t NMIENCLR; /*!< Disable non-maskable interrupt */
  1608. __I uint32_t RESERVED4[53];
  1609. MWU_PERREGION_Type PERREGION[2]; /*!< Unspecified */
  1610. __I uint32_t RESERVED5[64];
  1611. __IO uint32_t REGIONEN; /*!< Enable/disable regions watch */
  1612. __IO uint32_t REGIONENSET; /*!< Enable regions watch */
  1613. __IO uint32_t REGIONENCLR; /*!< Disable regions watch */
  1614. __I uint32_t RESERVED6[57];
  1615. MWU_REGION_Type REGION[4]; /*!< Unspecified */
  1616. __I uint32_t RESERVED7[32];
  1617. MWU_PREGION_Type PREGION[2]; /*!< Unspecified */
  1618. } NRF_MWU_Type;
  1619. /* ================================================================================ */
  1620. /* ================ I2S ================ */
  1621. /* ================================================================================ */
  1622. /**
  1623. * @brief Inter-IC Sound (I2S)
  1624. */
  1625. typedef struct { /*!< I2S Structure */
  1626. __O uint32_t TASKS_START; /*!< Starts continuous I2S transfer. Also starts MCK generator when
  1627. this is enabled. */
  1628. __O uint32_t TASKS_STOP; /*!< Stops I2S transfer. Also stops MCK generator. Triggering this
  1629. task will cause the {event:STOPPED} event to be generated. */
  1630. __I uint32_t RESERVED0[63];
  1631. __IO uint32_t EVENTS_RXPTRUPD; /*!< The RXD.PTR register has been copied to internal double-buffers.
  1632. When the I2S module is started and RX is enabled, this event
  1633. will be generated for every RXTXD.MAXCNT words that are received
  1634. on the SDIN pin. */
  1635. __IO uint32_t EVENTS_STOPPED; /*!< I2S transfer stopped. */
  1636. __I uint32_t RESERVED1[2];
  1637. __IO uint32_t EVENTS_TXPTRUPD; /*!< The TDX.PTR register has been copied to internal double-buffers.
  1638. When the I2S module is started and TX is enabled, this event
  1639. will be generated for every RXTXD.MAXCNT words that are sent
  1640. on the SDOUT pin. */
  1641. __I uint32_t RESERVED2[122];
  1642. __IO uint32_t INTEN; /*!< Enable or disable interrupt */
  1643. __IO uint32_t INTENSET; /*!< Enable interrupt */
  1644. __IO uint32_t INTENCLR; /*!< Disable interrupt */
  1645. __I uint32_t RESERVED3[125];
  1646. __IO uint32_t ENABLE; /*!< Enable I2S module. */
  1647. I2S_CONFIG_Type CONFIG; /*!< Unspecified */
  1648. __I uint32_t RESERVED4[3];
  1649. I2S_RXD_Type RXD; /*!< Unspecified */
  1650. __I uint32_t RESERVED5;
  1651. I2S_TXD_Type TXD; /*!< Unspecified */
  1652. __I uint32_t RESERVED6[3];
  1653. I2S_RXTXD_Type RXTXD; /*!< Unspecified */
  1654. __I uint32_t RESERVED7[3];
  1655. I2S_PSEL_Type PSEL; /*!< Unspecified */
  1656. } NRF_I2S_Type;
  1657. /* ================================================================================ */
  1658. /* ================ FPU ================ */
  1659. /* ================================================================================ */
  1660. /**
  1661. * @brief FPU (FPU)
  1662. */
  1663. typedef struct { /*!< FPU Structure */
  1664. __I uint32_t UNUSED; /*!< Unused. */
  1665. } NRF_FPU_Type;
  1666. /* ================================================================================ */
  1667. /* ================ GPIO ================ */
  1668. /* ================================================================================ */
  1669. /**
  1670. * @brief GPIO Port 1 (GPIO)
  1671. */
  1672. typedef struct { /*!< GPIO Structure */
  1673. __I uint32_t RESERVED0[321];
  1674. __IO uint32_t OUT; /*!< Write GPIO port */
  1675. __IO uint32_t OUTSET; /*!< Set individual bits in GPIO port */
  1676. __IO uint32_t OUTCLR; /*!< Clear individual bits in GPIO port */
  1677. __I uint32_t IN; /*!< Read GPIO port */
  1678. __IO uint32_t DIR; /*!< Direction of GPIO pins */
  1679. __IO uint32_t DIRSET; /*!< DIR set register */
  1680. __IO uint32_t DIRCLR; /*!< DIR clear register */
  1681. __IO uint32_t LATCH; /*!< Latch register indicating what GPIO pins that have met the criteria
  1682. set in the PIN_CNF[n].SENSE registers */
  1683. __IO uint32_t DETECTMODE; /*!< Select between default DETECT signal behaviour and LDETECT mode */
  1684. __I uint32_t RESERVED1[118];
  1685. __IO uint32_t PIN_CNF[32]; /*!< Description collection[0]: Configuration of GPIO pins */
  1686. } NRF_GPIO_Type;
  1687. /* -------------------- End of section using anonymous unions ------------------- */
  1688. #if defined(__CC_ARM)
  1689. #pragma pop
  1690. #elif defined(__ICCARM__)
  1691. /* leave anonymous unions enabled */
  1692. #elif defined(__GNUC__)
  1693. /* anonymous unions are enabled by default */
  1694. #elif defined(__TMS470__)
  1695. /* anonymous unions are enabled by default */
  1696. #elif defined(__TASKING__)
  1697. #pragma warning restore
  1698. #else
  1699. #warning Not supported compiler type
  1700. #endif
  1701. /* ================================================================================ */
  1702. /* ================ Peripheral memory map ================ */
  1703. /* ================================================================================ */
  1704. #define NRF_FICR_BASE 0x10000000UL
  1705. #define NRF_UICR_BASE 0x10001000UL
  1706. #define NRF_BPROT_BASE 0x40000000UL
  1707. #define NRF_POWER_BASE 0x40000000UL
  1708. #define NRF_CLOCK_BASE 0x40000000UL
  1709. #define NRF_AMLI_BASE 0x40000000UL
  1710. #define NRF_RADIO_BASE 0x40001000UL
  1711. #define NRF_UARTE0_BASE 0x40002000UL
  1712. #define NRF_UART0_BASE 0x40002000UL
  1713. #define NRF_SPIM0_BASE 0x40003000UL
  1714. #define NRF_SPIS0_BASE 0x40003000UL
  1715. #define NRF_TWIM0_BASE 0x40003000UL
  1716. #define NRF_TWIS0_BASE 0x40003000UL
  1717. #define NRF_SPI0_BASE 0x40003000UL
  1718. #define NRF_TWI0_BASE 0x40003000UL
  1719. #define NRF_SPIM1_BASE 0x40004000UL
  1720. #define NRF_SPIS1_BASE 0x40004000UL
  1721. #define NRF_TWIM1_BASE 0x40004000UL
  1722. #define NRF_TWIS1_BASE 0x40004000UL
  1723. #define NRF_SPI1_BASE 0x40004000UL
  1724. #define NRF_TWI1_BASE 0x40004000UL
  1725. #define NRF_NFCT_BASE 0x40005000UL
  1726. #define NRF_GPIOTE_BASE 0x40006000UL
  1727. #define NRF_SAADC_BASE 0x40007000UL
  1728. #define NRF_TIMER0_BASE 0x40008000UL
  1729. #define NRF_TIMER1_BASE 0x40009000UL
  1730. #define NRF_TIMER2_BASE 0x4000A000UL
  1731. #define NRF_RTC0_BASE 0x4000B000UL
  1732. #define NRF_TEMP_BASE 0x4000C000UL
  1733. #define NRF_RNG_BASE 0x4000D000UL
  1734. #define NRF_ECB_BASE 0x4000E000UL
  1735. #define NRF_CCM_BASE 0x4000F000UL
  1736. #define NRF_AAR_BASE 0x4000F000UL
  1737. #define NRF_WDT_BASE 0x40010000UL
  1738. #define NRF_RTC1_BASE 0x40011000UL
  1739. #define NRF_QDEC_BASE 0x40012000UL
  1740. #define NRF_COMP_BASE 0x40013000UL
  1741. #define NRF_LPCOMP_BASE 0x40013000UL
  1742. #define NRF_SWI0_BASE 0x40014000UL
  1743. #define NRF_EGU0_BASE 0x40014000UL
  1744. #define NRF_SWI1_BASE 0x40015000UL
  1745. #define NRF_EGU1_BASE 0x40015000UL
  1746. #define NRF_SWI2_BASE 0x40016000UL
  1747. #define NRF_EGU2_BASE 0x40016000UL
  1748. #define NRF_SWI3_BASE 0x40017000UL
  1749. #define NRF_EGU3_BASE 0x40017000UL
  1750. #define NRF_SWI4_BASE 0x40018000UL
  1751. #define NRF_EGU4_BASE 0x40018000UL
  1752. #define NRF_SWI5_BASE 0x40019000UL
  1753. #define NRF_EGU5_BASE 0x40019000UL
  1754. #define NRF_TIMER3_BASE 0x4001A000UL
  1755. #define NRF_TIMER4_BASE 0x4001B000UL
  1756. #define NRF_PWM0_BASE 0x4001C000UL
  1757. #define NRF_PDM_BASE 0x4001D000UL
  1758. #define NRF_NVMC_BASE 0x4001E000UL
  1759. #define NRF_PPI_BASE 0x4001F000UL
  1760. #define NRF_MWU_BASE 0x40020000UL
  1761. #define NRF_PWM1_BASE 0x40021000UL
  1762. #define NRF_PWM2_BASE 0x40022000UL
  1763. #define NRF_SPIM2_BASE 0x40023000UL
  1764. #define NRF_SPIS2_BASE 0x40023000UL
  1765. #define NRF_SPI2_BASE 0x40023000UL
  1766. #define NRF_RTC2_BASE 0x40024000UL
  1767. #define NRF_I2S_BASE 0x40025000UL
  1768. #define NRF_FPU_BASE 0x40026000UL
  1769. #define NRF_P0_BASE 0x50000000UL
  1770. /* ================================================================================ */
  1771. /* ================ Peripheral declaration ================ */
  1772. /* ================================================================================ */
  1773. #define NRF_FICR ((NRF_FICR_Type *) NRF_FICR_BASE)
  1774. #define NRF_UICR ((NRF_UICR_Type *) NRF_UICR_BASE)
  1775. #define NRF_BPROT ((NRF_BPROT_Type *) NRF_BPROT_BASE)
  1776. #define NRF_POWER ((NRF_POWER_Type *) NRF_POWER_BASE)
  1777. #define NRF_CLOCK ((NRF_CLOCK_Type *) NRF_CLOCK_BASE)
  1778. #define NRF_AMLI ((NRF_AMLI_Type *) NRF_AMLI_BASE)
  1779. #define NRF_RADIO ((NRF_RADIO_Type *) NRF_RADIO_BASE)
  1780. #define NRF_UARTE0 ((NRF_UARTE_Type *) NRF_UARTE0_BASE)
  1781. #define NRF_UART0 ((NRF_UART_Type *) NRF_UART0_BASE)
  1782. #define NRF_SPIM0 ((NRF_SPIM_Type *) NRF_SPIM0_BASE)
  1783. #define NRF_SPIS0 ((NRF_SPIS_Type *) NRF_SPIS0_BASE)
  1784. #define NRF_TWIM0 ((NRF_TWIM_Type *) NRF_TWIM0_BASE)
  1785. #define NRF_TWIS0 ((NRF_TWIS_Type *) NRF_TWIS0_BASE)
  1786. #define NRF_SPI0 ((NRF_SPI_Type *) NRF_SPI0_BASE)
  1787. #define NRF_TWI0 ((NRF_TWI_Type *) NRF_TWI0_BASE)
  1788. #define NRF_SPIM1 ((NRF_SPIM_Type *) NRF_SPIM1_BASE)
  1789. #define NRF_SPIS1 ((NRF_SPIS_Type *) NRF_SPIS1_BASE)
  1790. #define NRF_TWIM1 ((NRF_TWIM_Type *) NRF_TWIM1_BASE)
  1791. #define NRF_TWIS1 ((NRF_TWIS_Type *) NRF_TWIS1_BASE)
  1792. #define NRF_SPI1 ((NRF_SPI_Type *) NRF_SPI1_BASE)
  1793. #define NRF_TWI1 ((NRF_TWI_Type *) NRF_TWI1_BASE)
  1794. #define NRF_NFCT ((NRF_NFCT_Type *) NRF_NFCT_BASE)
  1795. #define NRF_GPIOTE ((NRF_GPIOTE_Type *) NRF_GPIOTE_BASE)
  1796. #define NRF_SAADC ((NRF_SAADC_Type *) NRF_SAADC_BASE)
  1797. #define NRF_TIMER0 ((NRF_TIMER_Type *) NRF_TIMER0_BASE)
  1798. #define NRF_TIMER1 ((NRF_TIMER_Type *) NRF_TIMER1_BASE)
  1799. #define NRF_TIMER2 ((NRF_TIMER_Type *) NRF_TIMER2_BASE)
  1800. #define NRF_RTC0 ((NRF_RTC_Type *) NRF_RTC0_BASE)
  1801. #define NRF_TEMP ((NRF_TEMP_Type *) NRF_TEMP_BASE)
  1802. #define NRF_RNG ((NRF_RNG_Type *) NRF_RNG_BASE)
  1803. #define NRF_ECB ((NRF_ECB_Type *) NRF_ECB_BASE)
  1804. #define NRF_CCM ((NRF_CCM_Type *) NRF_CCM_BASE)
  1805. #define NRF_AAR ((NRF_AAR_Type *) NRF_AAR_BASE)
  1806. #define NRF_WDT ((NRF_WDT_Type *) NRF_WDT_BASE)
  1807. #define NRF_RTC1 ((NRF_RTC_Type *) NRF_RTC1_BASE)
  1808. #define NRF_QDEC ((NRF_QDEC_Type *) NRF_QDEC_BASE)
  1809. #define NRF_COMP ((NRF_COMP_Type *) NRF_COMP_BASE)
  1810. #define NRF_LPCOMP ((NRF_LPCOMP_Type *) NRF_LPCOMP_BASE)
  1811. #define NRF_SWI0 ((NRF_SWI_Type *) NRF_SWI0_BASE)
  1812. #define NRF_EGU0 ((NRF_EGU_Type *) NRF_EGU0_BASE)
  1813. #define NRF_SWI1 ((NRF_SWI_Type *) NRF_SWI1_BASE)
  1814. #define NRF_EGU1 ((NRF_EGU_Type *) NRF_EGU1_BASE)
  1815. #define NRF_SWI2 ((NRF_SWI_Type *) NRF_SWI2_BASE)
  1816. #define NRF_EGU2 ((NRF_EGU_Type *) NRF_EGU2_BASE)
  1817. #define NRF_SWI3 ((NRF_SWI_Type *) NRF_SWI3_BASE)
  1818. #define NRF_EGU3 ((NRF_EGU_Type *) NRF_EGU3_BASE)
  1819. #define NRF_SWI4 ((NRF_SWI_Type *) NRF_SWI4_BASE)
  1820. #define NRF_EGU4 ((NRF_EGU_Type *) NRF_EGU4_BASE)
  1821. #define NRF_SWI5 ((NRF_SWI_Type *) NRF_SWI5_BASE)
  1822. #define NRF_EGU5 ((NRF_EGU_Type *) NRF_EGU5_BASE)
  1823. #define NRF_TIMER3 ((NRF_TIMER_Type *) NRF_TIMER3_BASE)
  1824. #define NRF_TIMER4 ((NRF_TIMER_Type *) NRF_TIMER4_BASE)
  1825. #define NRF_PWM0 ((NRF_PWM_Type *) NRF_PWM0_BASE)
  1826. #define NRF_PDM ((NRF_PDM_Type *) NRF_PDM_BASE)
  1827. #define NRF_NVMC ((NRF_NVMC_Type *) NRF_NVMC_BASE)
  1828. #define NRF_PPI ((NRF_PPI_Type *) NRF_PPI_BASE)
  1829. #define NRF_MWU ((NRF_MWU_Type *) NRF_MWU_BASE)
  1830. #define NRF_PWM1 ((NRF_PWM_Type *) NRF_PWM1_BASE)
  1831. #define NRF_PWM2 ((NRF_PWM_Type *) NRF_PWM2_BASE)
  1832. #define NRF_SPIM2 ((NRF_SPIM_Type *) NRF_SPIM2_BASE)
  1833. #define NRF_SPIS2 ((NRF_SPIS_Type *) NRF_SPIS2_BASE)
  1834. #define NRF_SPI2 ((NRF_SPI_Type *) NRF_SPI2_BASE)
  1835. #define NRF_RTC2 ((NRF_RTC_Type *) NRF_RTC2_BASE)
  1836. #define NRF_I2S ((NRF_I2S_Type *) NRF_I2S_BASE)
  1837. #define NRF_FPU ((NRF_FPU_Type *) NRF_FPU_BASE)
  1838. #define NRF_P0 ((NRF_GPIO_Type *) NRF_P0_BASE)
  1839. /** @} */ /* End of group Device_Peripheral_Registers */
  1840. /** @} */ /* End of group nrf52 */
  1841. /** @} */ /* End of group Nordic Semiconductor */
  1842. #ifdef __cplusplus
  1843. }
  1844. #endif
  1845. #endif /* nrf52_H */