mbed(SerialHalfDuplex入り)

Fork of mbed by mbed official

Committer:
yusuke_kyo
Date:
Wed Apr 08 08:04:18 2015 +0000
Revision:
98:01a414ca7d6d
Parent:
94:9ad691361fac
remove SerialHalfDuplex.h

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 93:e188a91d3eaa 1 /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
Kojto 93:e188a91d3eaa 2 *
Kojto 93:e188a91d3eaa 3 * The information contained herein is property of Nordic Semiconductor ASA.
Kojto 93:e188a91d3eaa 4 * Terms and conditions of usage are described in detail in NORDIC
Kojto 93:e188a91d3eaa 5 * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
Kojto 93:e188a91d3eaa 6 *
Kojto 93:e188a91d3eaa 7 * Licensees are granted free, non-transferable use of the information. NO
Kojto 93:e188a91d3eaa 8 * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
Kojto 93:e188a91d3eaa 9 * the file.
Kojto 93:e188a91d3eaa 10 *
Kojto 93:e188a91d3eaa 11 */
Kojto 93:e188a91d3eaa 12
Kojto 93:e188a91d3eaa 13
Kojto 93:e188a91d3eaa 14
Kojto 93:e188a91d3eaa 15 /** @addtogroup Nordic Semiconductor
Kojto 93:e188a91d3eaa 16 * @{
Kojto 93:e188a91d3eaa 17 */
Kojto 93:e188a91d3eaa 18
Kojto 93:e188a91d3eaa 19 /** @addtogroup nRF51
Kojto 93:e188a91d3eaa 20 * @{
Kojto 93:e188a91d3eaa 21 */
Kojto 93:e188a91d3eaa 22
Kojto 93:e188a91d3eaa 23 #ifndef NRF51_H
Kojto 93:e188a91d3eaa 24 #define NRF51_H
Kojto 93:e188a91d3eaa 25
Kojto 93:e188a91d3eaa 26 #ifdef __cplusplus
Kojto 93:e188a91d3eaa 27 extern "C" {
Kojto 93:e188a91d3eaa 28 #endif
Kojto 93:e188a91d3eaa 29
Kojto 93:e188a91d3eaa 30
Kojto 93:e188a91d3eaa 31 /* ------------------------- Interrupt Number Definition ------------------------ */
Kojto 93:e188a91d3eaa 32
Kojto 93:e188a91d3eaa 33 typedef enum {
Kojto 93:e188a91d3eaa 34 /* ------------------- Cortex-M0 Processor Exceptions Numbers ------------------- */
Kojto 93:e188a91d3eaa 35 Reset_IRQn = -15, /*!< 1 Reset Vector, invoked on Power up and warm reset */
Kojto 93:e188a91d3eaa 36 NonMaskableInt_IRQn = -14, /*!< 2 Non maskable Interrupt, cannot be stopped or preempted */
Kojto 93:e188a91d3eaa 37 HardFault_IRQn = -13, /*!< 3 Hard Fault, all classes of Fault */
Kojto 93:e188a91d3eaa 38 SVCall_IRQn = -5, /*!< 11 System Service Call via SVC instruction */
Kojto 93:e188a91d3eaa 39 DebugMonitor_IRQn = -4, /*!< 12 Debug Monitor */
Kojto 93:e188a91d3eaa 40 PendSV_IRQn = -2, /*!< 14 Pendable request for system service */
Kojto 93:e188a91d3eaa 41 SysTick_IRQn = -1, /*!< 15 System Tick Timer */
Kojto 93:e188a91d3eaa 42 /* ---------------------- nRF51 Specific Interrupt Numbers ---------------------- */
Kojto 93:e188a91d3eaa 43 POWER_CLOCK_IRQn = 0, /*!< 0 POWER_CLOCK */
Kojto 93:e188a91d3eaa 44 RADIO_IRQn = 1, /*!< 1 RADIO */
Kojto 93:e188a91d3eaa 45 UART0_IRQn = 2, /*!< 2 UART0 */
Kojto 93:e188a91d3eaa 46 SPI0_TWI0_IRQn = 3, /*!< 3 SPI0_TWI0 */
Kojto 93:e188a91d3eaa 47 SPI1_TWI1_IRQn = 4, /*!< 4 SPI1_TWI1 */
Kojto 93:e188a91d3eaa 48 GPIOTE_IRQn = 6, /*!< 6 GPIOTE */
Kojto 93:e188a91d3eaa 49 ADC_IRQn = 7, /*!< 7 ADC */
Kojto 93:e188a91d3eaa 50 TIMER0_IRQn = 8, /*!< 8 TIMER0 */
Kojto 93:e188a91d3eaa 51 TIMER1_IRQn = 9, /*!< 9 TIMER1 */
Kojto 93:e188a91d3eaa 52 TIMER2_IRQn = 10, /*!< 10 TIMER2 */
Kojto 93:e188a91d3eaa 53 RTC0_IRQn = 11, /*!< 11 RTC0 */
Kojto 93:e188a91d3eaa 54 TEMP_IRQn = 12, /*!< 12 TEMP */
Kojto 93:e188a91d3eaa 55 RNG_IRQn = 13, /*!< 13 RNG */
Kojto 93:e188a91d3eaa 56 ECB_IRQn = 14, /*!< 14 ECB */
Kojto 93:e188a91d3eaa 57 CCM_AAR_IRQn = 15, /*!< 15 CCM_AAR */
Kojto 93:e188a91d3eaa 58 WDT_IRQn = 16, /*!< 16 WDT */
Kojto 93:e188a91d3eaa 59 RTC1_IRQn = 17, /*!< 17 RTC1 */
Kojto 93:e188a91d3eaa 60 QDEC_IRQn = 18, /*!< 18 QDEC */
Kojto 93:e188a91d3eaa 61 LPCOMP_COMP_IRQn = 19, /*!< 19 LPCOMP_COMP */
Kojto 93:e188a91d3eaa 62 SWI0_IRQn = 20, /*!< 20 SWI0 */
Kojto 93:e188a91d3eaa 63 SWI1_IRQn = 21, /*!< 21 SWI1 */
Kojto 93:e188a91d3eaa 64 SWI2_IRQn = 22, /*!< 22 SWI2 */
Kojto 93:e188a91d3eaa 65 SWI3_IRQn = 23, /*!< 23 SWI3 */
Kojto 93:e188a91d3eaa 66 SWI4_IRQn = 24, /*!< 24 SWI4 */
Kojto 93:e188a91d3eaa 67 SWI5_IRQn = 25 /*!< 25 SWI5 */
Kojto 93:e188a91d3eaa 68 } IRQn_Type;
Kojto 93:e188a91d3eaa 69
Kojto 93:e188a91d3eaa 70
Kojto 93:e188a91d3eaa 71 /** @addtogroup Configuration_of_CMSIS
Kojto 93:e188a91d3eaa 72 * @{
Kojto 93:e188a91d3eaa 73 */
Kojto 93:e188a91d3eaa 74
Kojto 93:e188a91d3eaa 75
Kojto 93:e188a91d3eaa 76 /* ================================================================================ */
Kojto 93:e188a91d3eaa 77 /* ================ Processor and Core Peripheral Section ================ */
Kojto 93:e188a91d3eaa 78 /* ================================================================================ */
Kojto 93:e188a91d3eaa 79
Kojto 93:e188a91d3eaa 80 /* ----------------Configuration of the cm0 Processor and Core Peripherals---------------- */
Kojto 93:e188a91d3eaa 81 #define __CM0_REV 0x0301 /*!< Cortex-M0 Core Revision */
Kojto 93:e188a91d3eaa 82 #define __MPU_PRESENT 0 /*!< MPU present or not */
Kojto 93:e188a91d3eaa 83 #define __NVIC_PRIO_BITS 2 /*!< Number of Bits used for Priority Levels */
Kojto 93:e188a91d3eaa 84 #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
Kojto 93:e188a91d3eaa 85 /** @} */ /* End of group Configuration_of_CMSIS */
Kojto 93:e188a91d3eaa 86
Kojto 93:e188a91d3eaa 87 #include <core_cm0.h> /*!< Cortex-M0 processor and core peripherals */
Kojto 93:e188a91d3eaa 88 #include "system_nrf51822.h" /*!< nRF51 System */
Kojto 93:e188a91d3eaa 89
Kojto 93:e188a91d3eaa 90
Kojto 93:e188a91d3eaa 91 /* ================================================================================ */
Kojto 93:e188a91d3eaa 92 /* ================ Device Specific Peripheral Section ================ */
Kojto 93:e188a91d3eaa 93 /* ================================================================================ */
Kojto 93:e188a91d3eaa 94
Kojto 93:e188a91d3eaa 95
Kojto 93:e188a91d3eaa 96 /** @addtogroup Device_Peripheral_Registers
Kojto 93:e188a91d3eaa 97 * @{
Kojto 93:e188a91d3eaa 98 */
Kojto 93:e188a91d3eaa 99
Kojto 93:e188a91d3eaa 100
Kojto 93:e188a91d3eaa 101 /* ------------------- Start of section using anonymous unions ------------------ */
Kojto 93:e188a91d3eaa 102 #if defined(__CC_ARM)
Kojto 93:e188a91d3eaa 103 #pragma push
Kojto 93:e188a91d3eaa 104 #pragma anon_unions
Kojto 93:e188a91d3eaa 105 #elif defined(__ICCARM__)
Kojto 93:e188a91d3eaa 106 #pragma language=extended
Kojto 93:e188a91d3eaa 107 #elif defined(__GNUC__)
Kojto 93:e188a91d3eaa 108 /* anonymous unions are enabled by default */
Kojto 93:e188a91d3eaa 109 #elif defined(__TMS470__)
Kojto 93:e188a91d3eaa 110 /* anonymous unions are enabled by default */
Kojto 93:e188a91d3eaa 111 #elif defined(__TASKING__)
Kojto 93:e188a91d3eaa 112 #pragma warning 586
Kojto 93:e188a91d3eaa 113 #else
Kojto 93:e188a91d3eaa 114 #warning Not supported compiler type
Kojto 93:e188a91d3eaa 115 #endif
Kojto 93:e188a91d3eaa 116
Kojto 93:e188a91d3eaa 117
Kojto 93:e188a91d3eaa 118 typedef struct {
Kojto 93:e188a91d3eaa 119 __IO uint32_t CPU0; /*!< Configurable priority configuration register for CPU0. */
Kojto 93:e188a91d3eaa 120 __IO uint32_t SPIS1; /*!< Configurable priority configuration register for SPIS1. */
Kojto 93:e188a91d3eaa 121 __IO uint32_t RADIO; /*!< Configurable priority configuration register for RADIO. */
Kojto 93:e188a91d3eaa 122 __IO uint32_t ECB; /*!< Configurable priority configuration register for ECB. */
Kojto 93:e188a91d3eaa 123 __IO uint32_t CCM; /*!< Configurable priority configuration register for CCM. */
Kojto 93:e188a91d3eaa 124 __IO uint32_t AAR; /*!< Configurable priority configuration register for AAR. */
Kojto 93:e188a91d3eaa 125 } AMLI_RAMPRI_Type;
Kojto 93:e188a91d3eaa 126
Kojto 93:e188a91d3eaa 127 typedef struct {
Kojto 93:e188a91d3eaa 128 __O uint32_t EN; /*!< Enable channel group. */
Kojto 93:e188a91d3eaa 129 __O uint32_t DIS; /*!< Disable channel group. */
Kojto 93:e188a91d3eaa 130 } PPI_TASKS_CHG_Type;
Kojto 93:e188a91d3eaa 131
Kojto 93:e188a91d3eaa 132 typedef struct {
Kojto 93:e188a91d3eaa 133 __IO uint32_t EEP; /*!< Channel event end-point. */
Kojto 93:e188a91d3eaa 134 __IO uint32_t TEP; /*!< Channel task end-point. */
Kojto 93:e188a91d3eaa 135 } PPI_CH_Type;
Kojto 93:e188a91d3eaa 136
Kojto 93:e188a91d3eaa 137
Kojto 93:e188a91d3eaa 138 /* ================================================================================ */
Kojto 93:e188a91d3eaa 139 /* ================ POWER ================ */
Kojto 93:e188a91d3eaa 140 /* ================================================================================ */
Kojto 93:e188a91d3eaa 141
Kojto 93:e188a91d3eaa 142
Kojto 93:e188a91d3eaa 143 /**
Kojto 93:e188a91d3eaa 144 * @brief Power Control. (POWER)
Kojto 93:e188a91d3eaa 145 */
Kojto 93:e188a91d3eaa 146
Kojto 93:e188a91d3eaa 147 typedef struct { /*!< POWER Structure */
Kojto 93:e188a91d3eaa 148 __I uint32_t RESERVED0[30];
Kojto 93:e188a91d3eaa 149 __O uint32_t TASKS_CONSTLAT; /*!< Enable constant latency mode. */
Kojto 93:e188a91d3eaa 150 __O uint32_t TASKS_LOWPWR; /*!< Enable low power mode (variable latency). */
Kojto 93:e188a91d3eaa 151 __I uint32_t RESERVED1[34];
Kojto 93:e188a91d3eaa 152 __IO uint32_t EVENTS_POFWARN; /*!< Power failure warning. */
Kojto 93:e188a91d3eaa 153 __I uint32_t RESERVED2[126];
Kojto 93:e188a91d3eaa 154 __IO uint32_t INTENSET; /*!< Interrupt enable set register. */
Kojto 93:e188a91d3eaa 155 __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */
Kojto 93:e188a91d3eaa 156 __I uint32_t RESERVED3[61];
Kojto 93:e188a91d3eaa 157 __IO uint32_t RESETREAS; /*!< Reset reason. */
Kojto 93:e188a91d3eaa 158 __I uint32_t RESERVED4[63];
Kojto 93:e188a91d3eaa 159 __O uint32_t SYSTEMOFF; /*!< System off register. */
Kojto 93:e188a91d3eaa 160 __I uint32_t RESERVED5[3];
Kojto 93:e188a91d3eaa 161 __IO uint32_t POFCON; /*!< Power failure configuration. */
Kojto 93:e188a91d3eaa 162 __I uint32_t RESERVED6[2];
Kojto 93:e188a91d3eaa 163 __IO uint32_t GPREGRET; /*!< General purpose retention register. This register is a retained
Kojto 93:e188a91d3eaa 164 register. */
Kojto 93:e188a91d3eaa 165 __I uint32_t RESERVED7;
Kojto 93:e188a91d3eaa 166 __IO uint32_t RAMON; /*!< Ram on/off. */
Kojto 93:e188a91d3eaa 167 __I uint32_t RESERVED8[7];
Kojto 93:e188a91d3eaa 168 __IO uint32_t RESET; /*!< Pin reset functionality configuration register. This register
Kojto 93:e188a91d3eaa 169 is a retained register. */
Kojto 93:e188a91d3eaa 170 __I uint32_t RESERVED9[12];
Kojto 93:e188a91d3eaa 171 __IO uint32_t DCDCEN; /*!< DCDC converter enable configuration register. */
Kojto 93:e188a91d3eaa 172 } NRF_POWER_Type;
Kojto 93:e188a91d3eaa 173
Kojto 93:e188a91d3eaa 174
Kojto 93:e188a91d3eaa 175 /* ================================================================================ */
Kojto 93:e188a91d3eaa 176 /* ================ CLOCK ================ */
Kojto 93:e188a91d3eaa 177 /* ================================================================================ */
Kojto 93:e188a91d3eaa 178
Kojto 93:e188a91d3eaa 179
Kojto 93:e188a91d3eaa 180 /**
Kojto 93:e188a91d3eaa 181 * @brief Clock control. (CLOCK)
Kojto 93:e188a91d3eaa 182 */
Kojto 93:e188a91d3eaa 183
Kojto 93:e188a91d3eaa 184 typedef struct { /*!< CLOCK Structure */
Kojto 93:e188a91d3eaa 185 __O uint32_t TASKS_HFCLKSTART; /*!< Start HFCLK clock source. */
Kojto 93:e188a91d3eaa 186 __O uint32_t TASKS_HFCLKSTOP; /*!< Stop HFCLK clock source. */
Kojto 93:e188a91d3eaa 187 __O uint32_t TASKS_LFCLKSTART; /*!< Start LFCLK clock source. */
Kojto 93:e188a91d3eaa 188 __O uint32_t TASKS_LFCLKSTOP; /*!< Stop LFCLK clock source. */
Kojto 93:e188a91d3eaa 189 __O uint32_t TASKS_CAL; /*!< Start calibration of LFCLK RC oscillator. */
Kojto 93:e188a91d3eaa 190 __O uint32_t TASKS_CTSTART; /*!< Start calibration timer. */
Kojto 93:e188a91d3eaa 191 __O uint32_t TASKS_CTSTOP; /*!< Stop calibration timer. */
Kojto 93:e188a91d3eaa 192 __I uint32_t RESERVED0[57];
Kojto 93:e188a91d3eaa 193 __IO uint32_t EVENTS_HFCLKSTARTED; /*!< HFCLK oscillator started. */
Kojto 93:e188a91d3eaa 194 __IO uint32_t EVENTS_LFCLKSTARTED; /*!< LFCLK oscillator started. */
Kojto 93:e188a91d3eaa 195 __I uint32_t RESERVED1;
Kojto 93:e188a91d3eaa 196 __IO uint32_t EVENTS_DONE; /*!< Callibration of LFCLK RC oscillator completed. */
Kojto 93:e188a91d3eaa 197 __IO uint32_t EVENTS_CTTO; /*!< Callibration timer timeout. */
Kojto 93:e188a91d3eaa 198 __I uint32_t RESERVED2[124];
Kojto 93:e188a91d3eaa 199 __IO uint32_t INTENSET; /*!< Interrupt enable set register. */
Kojto 93:e188a91d3eaa 200 __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */
Kojto 93:e188a91d3eaa 201 __I uint32_t RESERVED3[64];
Kojto 93:e188a91d3eaa 202 __I uint32_t HFCLKSTAT; /*!< High frequency clock status. */
Kojto 93:e188a91d3eaa 203 __I uint32_t RESERVED4[2];
Kojto 93:e188a91d3eaa 204 __I uint32_t LFCLKSTAT; /*!< Low frequency clock status. */
Kojto 93:e188a91d3eaa 205 __I uint32_t RESERVED5[63];
Kojto 93:e188a91d3eaa 206 __IO uint32_t LFCLKSRC; /*!< Clock source for the LFCLK clock. */
Kojto 93:e188a91d3eaa 207 __I uint32_t RESERVED6[7];
Kojto 93:e188a91d3eaa 208 __IO uint32_t CTIV; /*!< Calibration timer interval. */
Kojto 93:e188a91d3eaa 209 __I uint32_t RESERVED7[5];
Kojto 93:e188a91d3eaa 210 __IO uint32_t XTALFREQ; /*!< Crystal frequency. */
Kojto 93:e188a91d3eaa 211 } NRF_CLOCK_Type;
Kojto 93:e188a91d3eaa 212
Kojto 93:e188a91d3eaa 213
Kojto 93:e188a91d3eaa 214 /* ================================================================================ */
Kojto 93:e188a91d3eaa 215 /* ================ MPU ================ */
Kojto 93:e188a91d3eaa 216 /* ================================================================================ */
Kojto 93:e188a91d3eaa 217
Kojto 93:e188a91d3eaa 218
Kojto 93:e188a91d3eaa 219 /**
Kojto 93:e188a91d3eaa 220 * @brief Memory Protection Unit. (MPU)
Kojto 93:e188a91d3eaa 221 */
Kojto 93:e188a91d3eaa 222
Kojto 93:e188a91d3eaa 223 typedef struct { /*!< MPU Structure */
Kojto 93:e188a91d3eaa 224 __I uint32_t RESERVED0[330];
Kojto 93:e188a91d3eaa 225 __IO uint32_t PERR0; /*!< Configuration of peripherals in mpu regions. */
Kojto 93:e188a91d3eaa 226 __IO uint32_t RLENR0; /*!< Length of RAM region 0. */
Kojto 93:e188a91d3eaa 227 __I uint32_t RESERVED1[52];
Kojto 93:e188a91d3eaa 228 __IO uint32_t PROTENSET0; /*!< Protection bit enable set register for low addresses. */
Kojto 93:e188a91d3eaa 229 __IO uint32_t PROTENSET1; /*!< Protection bit enable set register for high addresses. */
Kojto 93:e188a91d3eaa 230 __IO uint32_t DISABLEINDEBUG; /*!< Disable protection mechanism in debug mode. */
Kojto 93:e188a91d3eaa 231 } NRF_MPU_Type;
Kojto 93:e188a91d3eaa 232
Kojto 93:e188a91d3eaa 233
Kojto 93:e188a91d3eaa 234 /* ================================================================================ */
Kojto 93:e188a91d3eaa 235 /* ================ PU ================ */
Kojto 93:e188a91d3eaa 236 /* ================================================================================ */
Kojto 93:e188a91d3eaa 237
Kojto 93:e188a91d3eaa 238
Kojto 93:e188a91d3eaa 239 /**
Kojto 93:e188a91d3eaa 240 * @brief Patch unit. (PU)
Kojto 93:e188a91d3eaa 241 */
Kojto 93:e188a91d3eaa 242
Kojto 93:e188a91d3eaa 243 typedef struct { /*!< PU Structure */
Kojto 93:e188a91d3eaa 244 __I uint32_t RESERVED0[448];
Kojto 93:e188a91d3eaa 245 __IO uint32_t REPLACEADDR[8]; /*!< Address of first instruction to replace. */
Kojto 93:e188a91d3eaa 246 __I uint32_t RESERVED1[24];
Kojto 93:e188a91d3eaa 247 __IO uint32_t PATCHADDR[8]; /*!< Relative address of patch instructions. */
Kojto 93:e188a91d3eaa 248 __I uint32_t RESERVED2[24];
Kojto 93:e188a91d3eaa 249 __IO uint32_t PATCHEN; /*!< Patch enable register. */
Kojto 93:e188a91d3eaa 250 __IO uint32_t PATCHENSET; /*!< Patch enable register. */
Kojto 93:e188a91d3eaa 251 __IO uint32_t PATCHENCLR; /*!< Patch disable register. */
Kojto 93:e188a91d3eaa 252 } NRF_PU_Type;
Kojto 93:e188a91d3eaa 253
Kojto 93:e188a91d3eaa 254
Kojto 93:e188a91d3eaa 255 /* ================================================================================ */
Kojto 93:e188a91d3eaa 256 /* ================ AMLI ================ */
Kojto 93:e188a91d3eaa 257 /* ================================================================================ */
Kojto 93:e188a91d3eaa 258
Kojto 93:e188a91d3eaa 259
Kojto 93:e188a91d3eaa 260 /**
Kojto 93:e188a91d3eaa 261 * @brief AHB Multi-Layer Interface. (AMLI)
Kojto 93:e188a91d3eaa 262 */
Kojto 93:e188a91d3eaa 263
Kojto 93:e188a91d3eaa 264 typedef struct { /*!< AMLI Structure */
Kojto 93:e188a91d3eaa 265 __I uint32_t RESERVED0[896];
Kojto 93:e188a91d3eaa 266 AMLI_RAMPRI_Type RAMPRI; /*!< RAM configurable priority configuration structure. */
Kojto 93:e188a91d3eaa 267 } NRF_AMLI_Type;
Kojto 93:e188a91d3eaa 268
Kojto 93:e188a91d3eaa 269
Kojto 93:e188a91d3eaa 270 /* ================================================================================ */
Kojto 93:e188a91d3eaa 271 /* ================ RADIO ================ */
Kojto 93:e188a91d3eaa 272 /* ================================================================================ */
Kojto 93:e188a91d3eaa 273
Kojto 93:e188a91d3eaa 274
Kojto 93:e188a91d3eaa 275 /**
Kojto 93:e188a91d3eaa 276 * @brief The radio. (RADIO)
Kojto 93:e188a91d3eaa 277 */
Kojto 93:e188a91d3eaa 278
Kojto 93:e188a91d3eaa 279 typedef struct { /*!< RADIO Structure */
Kojto 93:e188a91d3eaa 280 __O uint32_t TASKS_TXEN; /*!< Enable radio in TX mode. */
Kojto 93:e188a91d3eaa 281 __O uint32_t TASKS_RXEN; /*!< Enable radio in RX mode. */
Kojto 93:e188a91d3eaa 282 __O uint32_t TASKS_START; /*!< Start radio. */
Kojto 93:e188a91d3eaa 283 __O uint32_t TASKS_STOP; /*!< Stop radio. */
Kojto 93:e188a91d3eaa 284 __O uint32_t TASKS_DISABLE; /*!< Disable radio. */
Kojto 93:e188a91d3eaa 285 __O uint32_t TASKS_RSSISTART; /*!< Start the RSSI and take one sample of the receive signal strength. */
Kojto 93:e188a91d3eaa 286 __O uint32_t TASKS_RSSISTOP; /*!< Stop the RSSI measurement. */
Kojto 93:e188a91d3eaa 287 __O uint32_t TASKS_BCSTART; /*!< Start the bit counter. */
Kojto 93:e188a91d3eaa 288 __O uint32_t TASKS_BCSTOP; /*!< Stop the bit counter. */
Kojto 93:e188a91d3eaa 289 __I uint32_t RESERVED0[55];
Kojto 93:e188a91d3eaa 290 __IO uint32_t EVENTS_READY; /*!< Ready event. */
Kojto 93:e188a91d3eaa 291 __IO uint32_t EVENTS_ADDRESS; /*!< Address event. */
Kojto 93:e188a91d3eaa 292 __IO uint32_t EVENTS_PAYLOAD; /*!< Payload event. */
Kojto 93:e188a91d3eaa 293 __IO uint32_t EVENTS_END; /*!< End event. */
Kojto 93:e188a91d3eaa 294 __IO uint32_t EVENTS_DISABLED; /*!< Disable event. */
Kojto 93:e188a91d3eaa 295 __IO uint32_t EVENTS_DEVMATCH; /*!< A device address match occurred on the last received packet. */
Kojto 93:e188a91d3eaa 296 __IO uint32_t EVENTS_DEVMISS; /*!< No device address match occurred on the last received packet. */
Kojto 93:e188a91d3eaa 297 __IO uint32_t EVENTS_RSSIEND; /*!< Sampling of the receive signal strength complete. A new RSSI
Kojto 93:e188a91d3eaa 298 sample is ready for readout at the RSSISAMPLE register. */
Kojto 93:e188a91d3eaa 299 __I uint32_t RESERVED1[2];
Kojto 93:e188a91d3eaa 300 __IO uint32_t EVENTS_BCMATCH; /*!< Bit counter reached bit count value specified in BC register. */
Kojto 93:e188a91d3eaa 301 __I uint32_t RESERVED2[53];
Kojto 93:e188a91d3eaa 302 __IO uint32_t SHORTS; /*!< Shortcut for the radio. */
Kojto 93:e188a91d3eaa 303 __I uint32_t RESERVED3[64];
Kojto 93:e188a91d3eaa 304 __IO uint32_t INTENSET; /*!< Interrupt enable set register. */
Kojto 93:e188a91d3eaa 305 __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */
Kojto 93:e188a91d3eaa 306 __I uint32_t RESERVED4[61];
Kojto 93:e188a91d3eaa 307 __I uint32_t CRCSTATUS; /*!< CRC status of received packet. */
Kojto 93:e188a91d3eaa 308 __I uint32_t RESERVED5;
Kojto 93:e188a91d3eaa 309 __I uint32_t RXMATCH; /*!< Received address. */
Kojto 93:e188a91d3eaa 310 __I uint32_t RXCRC; /*!< Received CRC. */
Kojto 93:e188a91d3eaa 311 __IO uint32_t DAI; /*!< Device address match index. */
Kojto 93:e188a91d3eaa 312 __I uint32_t RESERVED6[60];
Kojto 93:e188a91d3eaa 313 __IO uint32_t PACKETPTR; /*!< Packet pointer. Decision point: START task. */
Kojto 93:e188a91d3eaa 314 __IO uint32_t FREQUENCY; /*!< Frequency. */
Kojto 93:e188a91d3eaa 315 __IO uint32_t TXPOWER; /*!< Output power. */
Kojto 93:e188a91d3eaa 316 __IO uint32_t MODE; /*!< Data rate and modulation. */
Kojto 93:e188a91d3eaa 317 __IO uint32_t PCNF0; /*!< Packet configuration 0. */
Kojto 93:e188a91d3eaa 318 __IO uint32_t PCNF1; /*!< Packet configuration 1. */
Kojto 93:e188a91d3eaa 319 __IO uint32_t BASE0; /*!< Radio base address 0. Decision point: START task. */
Kojto 93:e188a91d3eaa 320 __IO uint32_t BASE1; /*!< Radio base address 1. Decision point: START task. */
Kojto 93:e188a91d3eaa 321 __IO uint32_t PREFIX0; /*!< Prefixes bytes for logical addresses 0 to 3. */
Kojto 93:e188a91d3eaa 322 __IO uint32_t PREFIX1; /*!< Prefixes bytes for logical addresses 4 to 7. */
Kojto 93:e188a91d3eaa 323 __IO uint32_t TXADDRESS; /*!< Transmit address select. */
Kojto 93:e188a91d3eaa 324 __IO uint32_t RXADDRESSES; /*!< Receive address select. */
Kojto 93:e188a91d3eaa 325 __IO uint32_t CRCCNF; /*!< CRC configuration. */
Kojto 93:e188a91d3eaa 326 __IO uint32_t CRCPOLY; /*!< CRC polynomial. */
Kojto 93:e188a91d3eaa 327 __IO uint32_t CRCINIT; /*!< CRC initial value. */
Kojto 93:e188a91d3eaa 328 __IO uint32_t TEST; /*!< Test features enable register. */
Kojto 93:e188a91d3eaa 329 __IO uint32_t TIFS; /*!< Inter Frame Spacing in microseconds. */
Kojto 93:e188a91d3eaa 330 __IO uint32_t RSSISAMPLE; /*!< RSSI sample. */
Kojto 93:e188a91d3eaa 331 __I uint32_t RESERVED7;
Kojto 93:e188a91d3eaa 332 __I uint32_t STATE; /*!< Current radio state. */
Kojto 93:e188a91d3eaa 333 __IO uint32_t DATAWHITEIV; /*!< Data whitening initial value. */
Kojto 93:e188a91d3eaa 334 __I uint32_t RESERVED8[2];
Kojto 93:e188a91d3eaa 335 __IO uint32_t BCC; /*!< Bit counter compare. */
Kojto 93:e188a91d3eaa 336 __I uint32_t RESERVED9[39];
Kojto 93:e188a91d3eaa 337 __IO uint32_t DAB[8]; /*!< Device address base segment. */
Kojto 93:e188a91d3eaa 338 __IO uint32_t DAP[8]; /*!< Device address prefix. */
Kojto 93:e188a91d3eaa 339 __IO uint32_t DACNF; /*!< Device address match configuration. */
Kojto 93:e188a91d3eaa 340 __I uint32_t RESERVED10[56];
Kojto 93:e188a91d3eaa 341 __IO uint32_t OVERRIDE0; /*!< Trim value override register 0. */
Kojto 93:e188a91d3eaa 342 __IO uint32_t OVERRIDE1; /*!< Trim value override register 1. */
Kojto 93:e188a91d3eaa 343 __IO uint32_t OVERRIDE2; /*!< Trim value override register 2. */
Kojto 93:e188a91d3eaa 344 __IO uint32_t OVERRIDE3; /*!< Trim value override register 3. */
Kojto 93:e188a91d3eaa 345 __IO uint32_t OVERRIDE4; /*!< Trim value override register 4. */
Kojto 93:e188a91d3eaa 346 __I uint32_t RESERVED11[561];
Kojto 93:e188a91d3eaa 347 __IO uint32_t POWER; /*!< Peripheral power control. */
Kojto 93:e188a91d3eaa 348 } NRF_RADIO_Type;
Kojto 93:e188a91d3eaa 349
Kojto 93:e188a91d3eaa 350
Kojto 93:e188a91d3eaa 351 /* ================================================================================ */
Kojto 93:e188a91d3eaa 352 /* ================ UART ================ */
Kojto 93:e188a91d3eaa 353 /* ================================================================================ */
Kojto 93:e188a91d3eaa 354
Kojto 93:e188a91d3eaa 355
Kojto 93:e188a91d3eaa 356 /**
Kojto 93:e188a91d3eaa 357 * @brief Universal Asynchronous Receiver/Transmitter. (UART)
Kojto 93:e188a91d3eaa 358 */
Kojto 93:e188a91d3eaa 359
Kojto 93:e188a91d3eaa 360 typedef struct { /*!< UART Structure */
Kojto 93:e188a91d3eaa 361 __O uint32_t TASKS_STARTRX; /*!< Start UART receiver. */
Kojto 93:e188a91d3eaa 362 __O uint32_t TASKS_STOPRX; /*!< Stop UART receiver. */
Kojto 93:e188a91d3eaa 363 __O uint32_t TASKS_STARTTX; /*!< Start UART transmitter. */
Kojto 93:e188a91d3eaa 364 __O uint32_t TASKS_STOPTX; /*!< Stop UART transmitter. */
Kojto 93:e188a91d3eaa 365 __I uint32_t RESERVED0[3];
Kojto 93:e188a91d3eaa 366 __O uint32_t TASKS_SUSPEND; /*!< Suspend UART. */
Kojto 93:e188a91d3eaa 367 __I uint32_t RESERVED1[56];
Kojto 93:e188a91d3eaa 368 __IO uint32_t EVENTS_CTS; /*!< CTS activated. */
Kojto 93:e188a91d3eaa 369 __IO uint32_t EVENTS_NCTS; /*!< CTS deactivated. */
Kojto 93:e188a91d3eaa 370 __IO uint32_t EVENTS_RXDRDY; /*!< Data received in RXD. */
Kojto 93:e188a91d3eaa 371 __I uint32_t RESERVED2[4];
Kojto 93:e188a91d3eaa 372 __IO uint32_t EVENTS_TXDRDY; /*!< Data sent from TXD. */
Kojto 93:e188a91d3eaa 373 __I uint32_t RESERVED3;
Kojto 93:e188a91d3eaa 374 __IO uint32_t EVENTS_ERROR; /*!< Error detected. */
Kojto 93:e188a91d3eaa 375 __I uint32_t RESERVED4[7];
Kojto 93:e188a91d3eaa 376 __IO uint32_t EVENTS_RXTO; /*!< Receiver timeout. */
Kojto 93:e188a91d3eaa 377 __I uint32_t RESERVED5[46];
Kojto 93:e188a91d3eaa 378 __IO uint32_t SHORTS; /*!< Shortcuts for TWI. */
Kojto 93:e188a91d3eaa 379 __I uint32_t RESERVED6[63];
Kojto 93:e188a91d3eaa 380 __IO uint32_t INTEN; /*!< Interrupt enable register. */
Kojto 93:e188a91d3eaa 381 __IO uint32_t INTENSET; /*!< Interrupt enable set register. */
Kojto 93:e188a91d3eaa 382 __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */
Kojto 93:e188a91d3eaa 383 __I uint32_t RESERVED7[93];
Kojto 93:e188a91d3eaa 384 __IO uint32_t ERRORSRC; /*!< Error source. Write error field to 1 to clear error. */
Kojto 93:e188a91d3eaa 385 __I uint32_t RESERVED8[31];
Kojto 93:e188a91d3eaa 386 __IO uint32_t ENABLE; /*!< Enable UART and acquire IOs. */
Kojto 93:e188a91d3eaa 387 __I uint32_t RESERVED9;
Kojto 93:e188a91d3eaa 388 __IO uint32_t PSELRTS; /*!< Pin select for RTS. */
Kojto 93:e188a91d3eaa 389 __IO uint32_t PSELTXD; /*!< Pin select for TXD. */
Kojto 93:e188a91d3eaa 390 __IO uint32_t PSELCTS; /*!< Pin select for CTS. */
Kojto 93:e188a91d3eaa 391 __IO uint32_t PSELRXD; /*!< Pin select for RXD. */
Kojto 93:e188a91d3eaa 392 __I uint32_t RXD; /*!< RXD register. On read action the buffer pointer is displaced.
Kojto 93:e188a91d3eaa 393 Once read the character is consummed. If read when no character
Kojto 93:e188a91d3eaa 394 available, the UART will stop working. */
Kojto 93:e188a91d3eaa 395 __O uint32_t TXD; /*!< TXD register. */
Kojto 93:e188a91d3eaa 396 __I uint32_t RESERVED10;
Kojto 93:e188a91d3eaa 397 __IO uint32_t BAUDRATE; /*!< UART Baudrate. */
Kojto 93:e188a91d3eaa 398 __I uint32_t RESERVED11[17];
Kojto 93:e188a91d3eaa 399 __IO uint32_t CONFIG; /*!< Configuration of parity and hardware flow control register. */
Kojto 93:e188a91d3eaa 400 __I uint32_t RESERVED12[675];
Kojto 93:e188a91d3eaa 401 __IO uint32_t POWER; /*!< Peripheral power control. */
Kojto 93:e188a91d3eaa 402 } NRF_UART_Type;
Kojto 93:e188a91d3eaa 403
Kojto 93:e188a91d3eaa 404
Kojto 93:e188a91d3eaa 405 /* ================================================================================ */
Kojto 93:e188a91d3eaa 406 /* ================ SPI ================ */
Kojto 93:e188a91d3eaa 407 /* ================================================================================ */
Kojto 93:e188a91d3eaa 408
Kojto 93:e188a91d3eaa 409
Kojto 93:e188a91d3eaa 410 /**
Kojto 93:e188a91d3eaa 411 * @brief SPI master 0. (SPI)
Kojto 93:e188a91d3eaa 412 */
Kojto 93:e188a91d3eaa 413
Kojto 93:e188a91d3eaa 414 typedef struct { /*!< SPI Structure */
Kojto 93:e188a91d3eaa 415 __I uint32_t RESERVED0[66];
Kojto 93:e188a91d3eaa 416 __IO uint32_t EVENTS_READY; /*!< TXD byte sent and RXD byte received. */
Kojto 93:e188a91d3eaa 417 __I uint32_t RESERVED1[126];
Kojto 93:e188a91d3eaa 418 __IO uint32_t INTENSET; /*!< Interrupt enable set register. */
Kojto 93:e188a91d3eaa 419 __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */
Kojto 93:e188a91d3eaa 420 __I uint32_t RESERVED2[125];
Kojto 93:e188a91d3eaa 421 __IO uint32_t ENABLE; /*!< Enable SPI. */
Kojto 93:e188a91d3eaa 422 __I uint32_t RESERVED3;
Kojto 93:e188a91d3eaa 423 __IO uint32_t PSELSCK; /*!< Pin select for SCK. */
Kojto 93:e188a91d3eaa 424 __IO uint32_t PSELMOSI; /*!< Pin select for MOSI. */
Kojto 93:e188a91d3eaa 425 __IO uint32_t PSELMISO; /*!< Pin select for MISO. */
Kojto 93:e188a91d3eaa 426 __I uint32_t RESERVED4;
Kojto 93:e188a91d3eaa 427 __IO uint32_t RXD; /*!< RX data. */
Kojto 93:e188a91d3eaa 428 __IO uint32_t TXD; /*!< TX data. */
Kojto 93:e188a91d3eaa 429 __I uint32_t RESERVED5;
Kojto 93:e188a91d3eaa 430 __IO uint32_t FREQUENCY; /*!< SPI frequency */
Kojto 93:e188a91d3eaa 431 __I uint32_t RESERVED6[11];
Kojto 93:e188a91d3eaa 432 __IO uint32_t CONFIG; /*!< Configuration register. */
Kojto 93:e188a91d3eaa 433 __I uint32_t RESERVED7[681];
Kojto 93:e188a91d3eaa 434 __IO uint32_t POWER; /*!< Peripheral power control. */
Kojto 93:e188a91d3eaa 435 } NRF_SPI_Type;
Kojto 93:e188a91d3eaa 436
Kojto 93:e188a91d3eaa 437
Kojto 93:e188a91d3eaa 438 /* ================================================================================ */
Kojto 93:e188a91d3eaa 439 /* ================ TWI ================ */
Kojto 93:e188a91d3eaa 440 /* ================================================================================ */
Kojto 93:e188a91d3eaa 441
Kojto 93:e188a91d3eaa 442
Kojto 93:e188a91d3eaa 443 /**
Kojto 93:e188a91d3eaa 444 * @brief Two-wire interface master 0. (TWI)
Kojto 93:e188a91d3eaa 445 */
Kojto 93:e188a91d3eaa 446
Kojto 93:e188a91d3eaa 447 typedef struct { /*!< TWI Structure */
Kojto 93:e188a91d3eaa 448 __O uint32_t TASKS_STARTRX; /*!< Start 2-Wire master receive sequence. */
Kojto 93:e188a91d3eaa 449 __I uint32_t RESERVED0;
Kojto 93:e188a91d3eaa 450 __O uint32_t TASKS_STARTTX; /*!< Start 2-Wire master transmit sequence. */
Kojto 93:e188a91d3eaa 451 __I uint32_t RESERVED1[2];
Kojto 93:e188a91d3eaa 452 __O uint32_t TASKS_STOP; /*!< Stop 2-Wire transaction. */
Kojto 93:e188a91d3eaa 453 __I uint32_t RESERVED2;
Kojto 93:e188a91d3eaa 454 __O uint32_t TASKS_SUSPEND; /*!< Suspend 2-Wire transaction. */
Kojto 93:e188a91d3eaa 455 __O uint32_t TASKS_RESUME; /*!< Resume 2-Wire transaction. */
Kojto 93:e188a91d3eaa 456 __I uint32_t RESERVED3[56];
Kojto 93:e188a91d3eaa 457 __IO uint32_t EVENTS_STOPPED; /*!< Two-wire stopped. */
Kojto 93:e188a91d3eaa 458 __IO uint32_t EVENTS_RXDREADY; /*!< Two-wire ready to deliver new RXD byte received. */
Kojto 93:e188a91d3eaa 459 __I uint32_t RESERVED4[4];
Kojto 93:e188a91d3eaa 460 __IO uint32_t EVENTS_TXDSENT; /*!< Two-wire finished sending last TXD byte. */
Kojto 93:e188a91d3eaa 461 __I uint32_t RESERVED5;
Kojto 93:e188a91d3eaa 462 __IO uint32_t EVENTS_ERROR; /*!< Two-wire error detected. */
Kojto 93:e188a91d3eaa 463 __I uint32_t RESERVED6[4];
Kojto 93:e188a91d3eaa 464 __IO uint32_t EVENTS_BB; /*!< Two-wire byte boundary. */
Kojto 93:e188a91d3eaa 465 __I uint32_t RESERVED7[49];
Kojto 93:e188a91d3eaa 466 __IO uint32_t SHORTS; /*!< Shortcuts for TWI. */
Kojto 93:e188a91d3eaa 467 __I uint32_t RESERVED8[64];
Kojto 93:e188a91d3eaa 468 __IO uint32_t INTENSET; /*!< Interrupt enable set register. */
Kojto 93:e188a91d3eaa 469 __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */
Kojto 93:e188a91d3eaa 470 __I uint32_t RESERVED9[110];
Kojto 93:e188a91d3eaa 471 __IO uint32_t ERRORSRC; /*!< Two-wire error source. Write error field to 1 to clear error. */
Kojto 93:e188a91d3eaa 472 __I uint32_t RESERVED10[14];
Kojto 93:e188a91d3eaa 473 __IO uint32_t ENABLE; /*!< Enable two-wire master. */
Kojto 93:e188a91d3eaa 474 __I uint32_t RESERVED11;
Kojto 93:e188a91d3eaa 475 __IO uint32_t PSELSCL; /*!< Pin select for SCL. */
Kojto 93:e188a91d3eaa 476 __IO uint32_t PSELSDA; /*!< Pin select for SDA. */
Kojto 93:e188a91d3eaa 477 __I uint32_t RESERVED12[2];
Kojto 93:e188a91d3eaa 478 __IO uint32_t RXD; /*!< RX data register. */
Kojto 93:e188a91d3eaa 479 __IO uint32_t TXD; /*!< TX data register. */
Kojto 93:e188a91d3eaa 480 __I uint32_t RESERVED13;
Kojto 93:e188a91d3eaa 481 __IO uint32_t FREQUENCY; /*!< Two-wire frequency. */
Kojto 93:e188a91d3eaa 482 __I uint32_t RESERVED14[24];
Kojto 93:e188a91d3eaa 483 __IO uint32_t ADDRESS; /*!< Address used in the two-wire transfer. */
Kojto 93:e188a91d3eaa 484 __I uint32_t RESERVED15[668];
Kojto 93:e188a91d3eaa 485 __IO uint32_t POWER; /*!< Peripheral power control. */
Kojto 93:e188a91d3eaa 486 } NRF_TWI_Type;
Kojto 93:e188a91d3eaa 487
Kojto 93:e188a91d3eaa 488
Kojto 93:e188a91d3eaa 489 /* ================================================================================ */
Kojto 93:e188a91d3eaa 490 /* ================ SPIS ================ */
Kojto 93:e188a91d3eaa 491 /* ================================================================================ */
Kojto 93:e188a91d3eaa 492
Kojto 93:e188a91d3eaa 493
Kojto 93:e188a91d3eaa 494 /**
Kojto 93:e188a91d3eaa 495 * @brief SPI slave 1. (SPIS)
Kojto 93:e188a91d3eaa 496 */
Kojto 93:e188a91d3eaa 497
Kojto 93:e188a91d3eaa 498 typedef struct { /*!< SPIS Structure */
Kojto 93:e188a91d3eaa 499 __I uint32_t RESERVED0[9];
Kojto 93:e188a91d3eaa 500 __O uint32_t TASKS_ACQUIRE; /*!< Acquire SPI semaphore. */
Kojto 93:e188a91d3eaa 501 __O uint32_t TASKS_RELEASE; /*!< Release SPI semaphore. */
Kojto 93:e188a91d3eaa 502 __I uint32_t RESERVED1[54];
Kojto 93:e188a91d3eaa 503 __IO uint32_t EVENTS_END; /*!< Granted transaction completed. */
Kojto 93:e188a91d3eaa 504 __I uint32_t RESERVED2[8];
Kojto 93:e188a91d3eaa 505 __IO uint32_t EVENTS_ACQUIRED; /*!< Semaphore acquired. */
Kojto 93:e188a91d3eaa 506 __I uint32_t RESERVED3[53];
Kojto 93:e188a91d3eaa 507 __IO uint32_t SHORTS; /*!< Shortcuts for SPIS. */
Kojto 93:e188a91d3eaa 508 __I uint32_t RESERVED4[64];
Kojto 93:e188a91d3eaa 509 __IO uint32_t INTENSET; /*!< Interrupt enable set register. */
Kojto 93:e188a91d3eaa 510 __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */
Kojto 93:e188a91d3eaa 511 __I uint32_t RESERVED5[61];
Kojto 93:e188a91d3eaa 512 __I uint32_t SEMSTAT; /*!< Semaphore status. */
Kojto 93:e188a91d3eaa 513 __I uint32_t RESERVED6[15];
Kojto 93:e188a91d3eaa 514 __IO uint32_t STATUS; /*!< Status from last transaction. */
Kojto 93:e188a91d3eaa 515 __I uint32_t RESERVED7[47];
Kojto 93:e188a91d3eaa 516 __IO uint32_t ENABLE; /*!< Enable SPIS. */
Kojto 93:e188a91d3eaa 517 __I uint32_t RESERVED8;
Kojto 93:e188a91d3eaa 518 __IO uint32_t PSELSCK; /*!< Pin select for SCK. */
Kojto 93:e188a91d3eaa 519 __IO uint32_t PSELMISO; /*!< Pin select for MISO. */
Kojto 93:e188a91d3eaa 520 __IO uint32_t PSELMOSI; /*!< Pin select for MOSI. */
Kojto 93:e188a91d3eaa 521 __IO uint32_t PSELCSN; /*!< Pin select for CSN. */
Kojto 93:e188a91d3eaa 522 __I uint32_t RESERVED9[7];
Kojto 93:e188a91d3eaa 523 __IO uint32_t RXDPTR; /*!< RX data pointer. */
Kojto 93:e188a91d3eaa 524 __IO uint32_t MAXRX; /*!< Maximum number of bytes in the receive buffer. */
Kojto 93:e188a91d3eaa 525 __IO uint32_t AMOUNTRX; /*!< Number of bytes received in last granted transaction. */
Kojto 93:e188a91d3eaa 526 __I uint32_t RESERVED10;
Kojto 93:e188a91d3eaa 527 __IO uint32_t TXDPTR; /*!< TX data pointer. */
Kojto 93:e188a91d3eaa 528 __IO uint32_t MAXTX; /*!< Maximum number of bytes in the transmit buffer. */
Kojto 93:e188a91d3eaa 529 __IO uint32_t AMOUNTTX; /*!< Number of bytes transmitted in last granted transaction. */
Kojto 93:e188a91d3eaa 530 __I uint32_t RESERVED11;
Kojto 93:e188a91d3eaa 531 __IO uint32_t CONFIG; /*!< Configuration register. */
Kojto 93:e188a91d3eaa 532 __I uint32_t RESERVED12;
Kojto 93:e188a91d3eaa 533 __IO uint32_t DEF; /*!< Default character. */
Kojto 93:e188a91d3eaa 534 __I uint32_t RESERVED13[24];
Kojto 93:e188a91d3eaa 535 __IO uint32_t ORC; /*!< Over-read character. */
Kojto 93:e188a91d3eaa 536 __I uint32_t RESERVED14[654];
Kojto 93:e188a91d3eaa 537 __IO uint32_t POWER; /*!< Peripheral power control. */
Kojto 93:e188a91d3eaa 538 } NRF_SPIS_Type;
Kojto 93:e188a91d3eaa 539
Kojto 93:e188a91d3eaa 540
Kojto 93:e188a91d3eaa 541 /* ================================================================================ */
Kojto 93:e188a91d3eaa 542 /* ================ GPIOTE ================ */
Kojto 93:e188a91d3eaa 543 /* ================================================================================ */
Kojto 93:e188a91d3eaa 544
Kojto 93:e188a91d3eaa 545
Kojto 93:e188a91d3eaa 546 /**
Kojto 93:e188a91d3eaa 547 * @brief GPIO tasks and events. (GPIOTE)
Kojto 93:e188a91d3eaa 548 */
Kojto 93:e188a91d3eaa 549
Kojto 93:e188a91d3eaa 550 typedef struct { /*!< GPIOTE Structure */
Kojto 93:e188a91d3eaa 551 __O uint32_t TASKS_OUT[4]; /*!< Tasks asssociated with GPIOTE channels. */
Kojto 93:e188a91d3eaa 552 __I uint32_t RESERVED0[60];
Kojto 93:e188a91d3eaa 553 __IO uint32_t EVENTS_IN[4]; /*!< Tasks asssociated with GPIOTE channels. */
Kojto 93:e188a91d3eaa 554 __I uint32_t RESERVED1[27];
Kojto 93:e188a91d3eaa 555 __IO uint32_t EVENTS_PORT; /*!< Event generated from multiple pins. */
Kojto 93:e188a91d3eaa 556 __I uint32_t RESERVED2[97];
Kojto 93:e188a91d3eaa 557 __IO uint32_t INTENSET; /*!< Interrupt enable set register. */
Kojto 93:e188a91d3eaa 558 __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */
Kojto 93:e188a91d3eaa 559 __I uint32_t RESERVED3[129];
Kojto 93:e188a91d3eaa 560 __IO uint32_t CONFIG[4]; /*!< Channel configuration registers. */
Kojto 93:e188a91d3eaa 561 __I uint32_t RESERVED4[695];
Kojto 93:e188a91d3eaa 562 __IO uint32_t POWER; /*!< Peripheral power control. */
Kojto 93:e188a91d3eaa 563 } NRF_GPIOTE_Type;
Kojto 93:e188a91d3eaa 564
Kojto 93:e188a91d3eaa 565
Kojto 93:e188a91d3eaa 566 /* ================================================================================ */
Kojto 93:e188a91d3eaa 567 /* ================ ADC ================ */
Kojto 93:e188a91d3eaa 568 /* ================================================================================ */
Kojto 93:e188a91d3eaa 569
Kojto 93:e188a91d3eaa 570
Kojto 93:e188a91d3eaa 571 /**
Kojto 93:e188a91d3eaa 572 * @brief Analog to digital converter. (ADC)
Kojto 93:e188a91d3eaa 573 */
Kojto 93:e188a91d3eaa 574
Kojto 93:e188a91d3eaa 575 typedef struct { /*!< ADC Structure */
Kojto 93:e188a91d3eaa 576 __O uint32_t TASKS_START; /*!< Start an ADC conversion. */
Kojto 93:e188a91d3eaa 577 __O uint32_t TASKS_STOP; /*!< Stop ADC. */
Kojto 93:e188a91d3eaa 578 __I uint32_t RESERVED0[62];
Kojto 93:e188a91d3eaa 579 __IO uint32_t EVENTS_END; /*!< ADC conversion complete. */
Kojto 93:e188a91d3eaa 580 __I uint32_t RESERVED1[128];
Kojto 93:e188a91d3eaa 581 __IO uint32_t INTENSET; /*!< Interrupt enable set register. */
Kojto 93:e188a91d3eaa 582 __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */
Kojto 93:e188a91d3eaa 583 __I uint32_t RESERVED2[61];
Kojto 93:e188a91d3eaa 584 __I uint32_t BUSY; /*!< ADC busy register. */
Kojto 93:e188a91d3eaa 585 __I uint32_t RESERVED3[63];
Kojto 93:e188a91d3eaa 586 __IO uint32_t ENABLE; /*!< ADC enable. */
Kojto 93:e188a91d3eaa 587 __IO uint32_t CONFIG; /*!< ADC configuration register. */
Kojto 93:e188a91d3eaa 588 __I uint32_t RESULT; /*!< Result of ADC conversion. */
Kojto 93:e188a91d3eaa 589 __I uint32_t RESERVED4[700];
Kojto 93:e188a91d3eaa 590 __IO uint32_t POWER; /*!< Peripheral power control. */
Kojto 93:e188a91d3eaa 591 } NRF_ADC_Type;
Kojto 93:e188a91d3eaa 592
Kojto 93:e188a91d3eaa 593
Kojto 93:e188a91d3eaa 594 /* ================================================================================ */
Kojto 93:e188a91d3eaa 595 /* ================ TIMER ================ */
Kojto 93:e188a91d3eaa 596 /* ================================================================================ */
Kojto 93:e188a91d3eaa 597
Kojto 93:e188a91d3eaa 598
Kojto 93:e188a91d3eaa 599 /**
Kojto 93:e188a91d3eaa 600 * @brief Timer 0. (TIMER)
Kojto 93:e188a91d3eaa 601 */
Kojto 93:e188a91d3eaa 602
Kojto 93:e188a91d3eaa 603 typedef struct { /*!< TIMER Structure */
Kojto 93:e188a91d3eaa 604 __O uint32_t TASKS_START; /*!< Start Timer. */
Kojto 93:e188a91d3eaa 605 __O uint32_t TASKS_STOP; /*!< Stop Timer. */
Kojto 93:e188a91d3eaa 606 __O uint32_t TASKS_COUNT; /*!< Increment Timer (In counter mode). */
Kojto 93:e188a91d3eaa 607 __O uint32_t TASKS_CLEAR; /*!< Clear timer. */
Kojto 93:e188a91d3eaa 608 __I uint32_t RESERVED0[12];
Kojto 93:e188a91d3eaa 609 __O uint32_t TASKS_CAPTURE[4]; /*!< Capture Timer value to CC[n] registers. */
Kojto 93:e188a91d3eaa 610 __I uint32_t RESERVED1[60];
Kojto 93:e188a91d3eaa 611 __IO uint32_t EVENTS_COMPARE[4]; /*!< Compare event on CC[n] match. */
Kojto 93:e188a91d3eaa 612 __I uint32_t RESERVED2[44];
Kojto 93:e188a91d3eaa 613 __IO uint32_t SHORTS; /*!< Shortcuts for Timer. */
Kojto 93:e188a91d3eaa 614 __I uint32_t RESERVED3[64];
Kojto 93:e188a91d3eaa 615 __IO uint32_t INTENSET; /*!< Interrupt enable set register. */
Kojto 93:e188a91d3eaa 616 __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */
Kojto 93:e188a91d3eaa 617 __I uint32_t RESERVED4[126];
Kojto 93:e188a91d3eaa 618 __IO uint32_t MODE; /*!< Timer Mode selection. */
Kojto 93:e188a91d3eaa 619 __IO uint32_t BITMODE; /*!< Sets timer behaviour. */
Kojto 93:e188a91d3eaa 620 __I uint32_t RESERVED5;
Kojto 93:e188a91d3eaa 621 __IO uint32_t PRESCALER; /*!< 4-bit prescaler to source clock frequency (max value 9). Source
Kojto 93:e188a91d3eaa 622 clock frequency is divided by 2^SCALE. */
Kojto 93:e188a91d3eaa 623 __I uint32_t RESERVED6[11];
Kojto 93:e188a91d3eaa 624 __IO uint32_t CC[4]; /*!< Capture/compare registers. */
Kojto 93:e188a91d3eaa 625 __I uint32_t RESERVED7[683];
Kojto 93:e188a91d3eaa 626 __IO uint32_t POWER; /*!< Peripheral power control. */
Kojto 93:e188a91d3eaa 627 } NRF_TIMER_Type;
Kojto 93:e188a91d3eaa 628
Kojto 93:e188a91d3eaa 629
Kojto 93:e188a91d3eaa 630 /* ================================================================================ */
Kojto 93:e188a91d3eaa 631 /* ================ RTC ================ */
Kojto 93:e188a91d3eaa 632 /* ================================================================================ */
Kojto 93:e188a91d3eaa 633
Kojto 93:e188a91d3eaa 634
Kojto 93:e188a91d3eaa 635 /**
Kojto 93:e188a91d3eaa 636 * @brief Real time counter 0. (RTC)
Kojto 93:e188a91d3eaa 637 */
Kojto 93:e188a91d3eaa 638
Kojto 93:e188a91d3eaa 639 typedef struct { /*!< RTC Structure */
Kojto 93:e188a91d3eaa 640 __O uint32_t TASKS_START; /*!< Start RTC Counter. */
Kojto 93:e188a91d3eaa 641 __O uint32_t TASKS_STOP; /*!< Stop RTC Counter. */
Kojto 93:e188a91d3eaa 642 __O uint32_t TASKS_CLEAR; /*!< Clear RTC Counter. */
Kojto 93:e188a91d3eaa 643 __O uint32_t TASKS_TRIGOVRFLW; /*!< Set COUNTER to 0xFFFFFFF0. */
Kojto 93:e188a91d3eaa 644 __I uint32_t RESERVED0[60];
Kojto 93:e188a91d3eaa 645 __IO uint32_t EVENTS_TICK; /*!< Event on COUNTER increment. */
Kojto 93:e188a91d3eaa 646 __IO uint32_t EVENTS_OVRFLW; /*!< Event on COUNTER overflow. */
Kojto 93:e188a91d3eaa 647 __I uint32_t RESERVED1[14];
Kojto 93:e188a91d3eaa 648 __IO uint32_t EVENTS_COMPARE[4]; /*!< Compare event on CC[n] match. */
Kojto 93:e188a91d3eaa 649 __I uint32_t RESERVED2[109];
Kojto 93:e188a91d3eaa 650 __IO uint32_t INTENSET; /*!< Interrupt enable set register. */
Kojto 93:e188a91d3eaa 651 __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */
Kojto 93:e188a91d3eaa 652 __I uint32_t RESERVED3[13];
Kojto 93:e188a91d3eaa 653 __IO uint32_t EVTEN; /*!< Configures event enable routing to PPI for each RTC event. */
Kojto 93:e188a91d3eaa 654 __IO uint32_t EVTENSET; /*!< Enable events routing to PPI. The reading of this register gives
Kojto 93:e188a91d3eaa 655 the value of EVTEN. */
Kojto 93:e188a91d3eaa 656 __IO uint32_t EVTENCLR; /*!< Disable events routing to PPI. The reading of this register
Kojto 93:e188a91d3eaa 657 gives the value of EVTEN. */
Kojto 93:e188a91d3eaa 658 __I uint32_t RESERVED4[110];
Kojto 93:e188a91d3eaa 659 __IO uint32_t COUNTER; /*!< Current COUNTER value. */
Kojto 93:e188a91d3eaa 660 __IO uint32_t PRESCALER; /*!< 12-bit prescaler for COUNTER frequency (32768/(PRESCALER+1)).
Kojto 93:e188a91d3eaa 661 Must be written when RTC is STOPed. */
Kojto 93:e188a91d3eaa 662 __I uint32_t RESERVED5[13];
Kojto 93:e188a91d3eaa 663 __IO uint32_t CC[4]; /*!< Capture/compare registers. */
Kojto 93:e188a91d3eaa 664 __I uint32_t RESERVED6[683];
Kojto 93:e188a91d3eaa 665 __IO uint32_t POWER; /*!< Peripheral power control. */
Kojto 93:e188a91d3eaa 666 } NRF_RTC_Type;
Kojto 93:e188a91d3eaa 667
Kojto 93:e188a91d3eaa 668
Kojto 93:e188a91d3eaa 669 /* ================================================================================ */
Kojto 93:e188a91d3eaa 670 /* ================ TEMP ================ */
Kojto 93:e188a91d3eaa 671 /* ================================================================================ */
Kojto 93:e188a91d3eaa 672
Kojto 93:e188a91d3eaa 673
Kojto 93:e188a91d3eaa 674 /**
Kojto 93:e188a91d3eaa 675 * @brief Temperature Sensor. (TEMP)
Kojto 93:e188a91d3eaa 676 */
Kojto 93:e188a91d3eaa 677
Kojto 93:e188a91d3eaa 678 typedef struct { /*!< TEMP Structure */
Kojto 93:e188a91d3eaa 679 __O uint32_t TASKS_START; /*!< Start temperature measurement. */
Kojto 93:e188a91d3eaa 680 __O uint32_t TASKS_STOP; /*!< Stop temperature measurement. */
Kojto 93:e188a91d3eaa 681 __I uint32_t RESERVED0[62];
Kojto 93:e188a91d3eaa 682 __IO uint32_t EVENTS_DATARDY; /*!< Temperature measurement complete, data ready event. */
Kojto 93:e188a91d3eaa 683 __I uint32_t RESERVED1[128];
Kojto 93:e188a91d3eaa 684 __IO uint32_t INTENSET; /*!< Interrupt enable set register. */
Kojto 93:e188a91d3eaa 685 __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */
Kojto 93:e188a91d3eaa 686 __I uint32_t RESERVED2[127];
Kojto 93:e188a91d3eaa 687 __I int32_t TEMP; /*!< Die temperature in degC, 2's complement format, 0.25 degC pecision. */
Kojto 93:e188a91d3eaa 688 __I uint32_t RESERVED3[700];
Kojto 93:e188a91d3eaa 689 __IO uint32_t POWER; /*!< Peripheral power control. */
Kojto 93:e188a91d3eaa 690 } NRF_TEMP_Type;
Kojto 93:e188a91d3eaa 691
Kojto 93:e188a91d3eaa 692
Kojto 93:e188a91d3eaa 693 /* ================================================================================ */
Kojto 93:e188a91d3eaa 694 /* ================ RNG ================ */
Kojto 93:e188a91d3eaa 695 /* ================================================================================ */
Kojto 93:e188a91d3eaa 696
Kojto 93:e188a91d3eaa 697
Kojto 93:e188a91d3eaa 698 /**
Kojto 93:e188a91d3eaa 699 * @brief Random Number Generator. (RNG)
Kojto 93:e188a91d3eaa 700 */
Kojto 93:e188a91d3eaa 701
Kojto 93:e188a91d3eaa 702 typedef struct { /*!< RNG Structure */
Kojto 93:e188a91d3eaa 703 __O uint32_t TASKS_START; /*!< Start the random number generator. */
Kojto 93:e188a91d3eaa 704 __O uint32_t TASKS_STOP; /*!< Stop the random number generator. */
Kojto 93:e188a91d3eaa 705 __I uint32_t RESERVED0[62];
Kojto 93:e188a91d3eaa 706 __IO uint32_t EVENTS_VALRDY; /*!< New random number generated and written to VALUE register. */
Kojto 93:e188a91d3eaa 707 __I uint32_t RESERVED1[63];
Kojto 93:e188a91d3eaa 708 __IO uint32_t SHORTS; /*!< Shortcut for the RNG. */
Kojto 93:e188a91d3eaa 709 __I uint32_t RESERVED2[64];
Kojto 93:e188a91d3eaa 710 __IO uint32_t INTENSET; /*!< Interrupt enable set register */
Kojto 93:e188a91d3eaa 711 __IO uint32_t INTENCLR; /*!< Interrupt enable clear register */
Kojto 93:e188a91d3eaa 712 __I uint32_t RESERVED3[126];
Kojto 93:e188a91d3eaa 713 __IO uint32_t CONFIG; /*!< Configuration register. */
Kojto 93:e188a91d3eaa 714 __I uint32_t VALUE; /*!< RNG random number. */
Kojto 93:e188a91d3eaa 715 __I uint32_t RESERVED4[700];
Kojto 93:e188a91d3eaa 716 __IO uint32_t POWER; /*!< Peripheral power control. */
Kojto 93:e188a91d3eaa 717 } NRF_RNG_Type;
Kojto 93:e188a91d3eaa 718
Kojto 93:e188a91d3eaa 719
Kojto 93:e188a91d3eaa 720 /* ================================================================================ */
Kojto 93:e188a91d3eaa 721 /* ================ ECB ================ */
Kojto 93:e188a91d3eaa 722 /* ================================================================================ */
Kojto 93:e188a91d3eaa 723
Kojto 93:e188a91d3eaa 724
Kojto 93:e188a91d3eaa 725 /**
Kojto 93:e188a91d3eaa 726 * @brief AES ECB Mode Encryption. (ECB)
Kojto 93:e188a91d3eaa 727 */
Kojto 93:e188a91d3eaa 728
Kojto 93:e188a91d3eaa 729 typedef struct { /*!< ECB Structure */
Kojto 93:e188a91d3eaa 730 __O uint32_t TASKS_STARTECB; /*!< Start ECB block encrypt. If a crypto operation is running, this
Kojto 93:e188a91d3eaa 731 will not initiate a new encryption and the ERRORECB event will
Kojto 93:e188a91d3eaa 732 be triggered. */
Kojto 93:e188a91d3eaa 733 __O uint32_t TASKS_STOPECB; /*!< Stop current ECB encryption. If a crypto operation is running,
Kojto 93:e188a91d3eaa 734 this will will trigger the ERRORECB event. */
Kojto 93:e188a91d3eaa 735 __I uint32_t RESERVED0[62];
Kojto 93:e188a91d3eaa 736 __IO uint32_t EVENTS_ENDECB; /*!< ECB block encrypt complete. */
Kojto 93:e188a91d3eaa 737 __IO uint32_t EVENTS_ERRORECB; /*!< ECB block encrypt aborted due to a STOPECB task or due to an
Kojto 93:e188a91d3eaa 738 error. */
Kojto 93:e188a91d3eaa 739 __I uint32_t RESERVED1[127];
Kojto 93:e188a91d3eaa 740 __IO uint32_t INTENSET; /*!< Interrupt enable set register. */
Kojto 93:e188a91d3eaa 741 __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */
Kojto 93:e188a91d3eaa 742 __I uint32_t RESERVED2[126];
Kojto 93:e188a91d3eaa 743 __IO uint32_t ECBDATAPTR; /*!< ECB block encrypt memory pointer. */
Kojto 93:e188a91d3eaa 744 __I uint32_t RESERVED3[701];
Kojto 93:e188a91d3eaa 745 __IO uint32_t POWER; /*!< Peripheral power control. */
Kojto 93:e188a91d3eaa 746 } NRF_ECB_Type;
Kojto 93:e188a91d3eaa 747
Kojto 93:e188a91d3eaa 748
Kojto 93:e188a91d3eaa 749 /* ================================================================================ */
Kojto 93:e188a91d3eaa 750 /* ================ AAR ================ */
Kojto 93:e188a91d3eaa 751 /* ================================================================================ */
Kojto 93:e188a91d3eaa 752
Kojto 93:e188a91d3eaa 753
Kojto 93:e188a91d3eaa 754 /**
Kojto 93:e188a91d3eaa 755 * @brief Accelerated Address Resolver. (AAR)
Kojto 93:e188a91d3eaa 756 */
Kojto 93:e188a91d3eaa 757
Kojto 93:e188a91d3eaa 758 typedef struct { /*!< AAR Structure */
Kojto 93:e188a91d3eaa 759 __O uint32_t TASKS_START; /*!< Start resolving addresses based on IRKs specified in the IRK
Kojto 93:e188a91d3eaa 760 data structure. */
Kojto 93:e188a91d3eaa 761 __I uint32_t RESERVED0;
Kojto 93:e188a91d3eaa 762 __O uint32_t TASKS_STOP; /*!< Stop resolving addresses. */
Kojto 93:e188a91d3eaa 763 __I uint32_t RESERVED1[61];
Kojto 93:e188a91d3eaa 764 __IO uint32_t EVENTS_END; /*!< Address resolution procedure completed. */
Kojto 93:e188a91d3eaa 765 __IO uint32_t EVENTS_RESOLVED; /*!< Address resolved. */
Kojto 93:e188a91d3eaa 766 __IO uint32_t EVENTS_NOTRESOLVED; /*!< Address not resolved. */
Kojto 93:e188a91d3eaa 767 __I uint32_t RESERVED2[126];
Kojto 93:e188a91d3eaa 768 __IO uint32_t INTENSET; /*!< Interrupt enable set register. */
Kojto 93:e188a91d3eaa 769 __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */
Kojto 93:e188a91d3eaa 770 __I uint32_t RESERVED3[61];
Kojto 93:e188a91d3eaa 771 __I uint32_t STATUS; /*!< Resolution status. */
Kojto 93:e188a91d3eaa 772 __I uint32_t RESERVED4[63];
Kojto 93:e188a91d3eaa 773 __IO uint32_t ENABLE; /*!< Enable AAR. */
Kojto 93:e188a91d3eaa 774 __IO uint32_t NIRK; /*!< Number of Identity root Keys in the IRK data structure. */
Kojto 93:e188a91d3eaa 775 __IO uint32_t IRKPTR; /*!< Pointer to the IRK data structure. */
Kojto 93:e188a91d3eaa 776 __I uint32_t RESERVED5;
Kojto 93:e188a91d3eaa 777 __IO uint32_t ADDRPTR; /*!< Pointer to the resolvable address (6 bytes). */
Kojto 93:e188a91d3eaa 778 __IO uint32_t SCRATCHPTR; /*!< Pointer to "scratch" data area used for temporary storage during
Kojto 93:e188a91d3eaa 779 resolution. A minimum of 3 bytes must be reserved. */
Kojto 93:e188a91d3eaa 780 __I uint32_t RESERVED6[697];
Kojto 93:e188a91d3eaa 781 __IO uint32_t POWER; /*!< Peripheral power control. */
Kojto 93:e188a91d3eaa 782 } NRF_AAR_Type;
Kojto 93:e188a91d3eaa 783
Kojto 93:e188a91d3eaa 784
Kojto 93:e188a91d3eaa 785 /* ================================================================================ */
Kojto 93:e188a91d3eaa 786 /* ================ CCM ================ */
Kojto 93:e188a91d3eaa 787 /* ================================================================================ */
Kojto 93:e188a91d3eaa 788
Kojto 93:e188a91d3eaa 789
Kojto 93:e188a91d3eaa 790 /**
Kojto 93:e188a91d3eaa 791 * @brief AES CCM Mode Encryption. (CCM)
Kojto 93:e188a91d3eaa 792 */
Kojto 93:e188a91d3eaa 793
Kojto 93:e188a91d3eaa 794 typedef struct { /*!< CCM Structure */
Kojto 93:e188a91d3eaa 795 __O uint32_t TASKS_KSGEN; /*!< Start generation of key-stream. This operation will stop by
Kojto 93:e188a91d3eaa 796 itself when completed. */
Kojto 93:e188a91d3eaa 797 __O uint32_t TASKS_CRYPT; /*!< Start encrypt/decrypt. This operation will stop by itself when
Kojto 93:e188a91d3eaa 798 completed. */
Kojto 93:e188a91d3eaa 799 __O uint32_t TASKS_STOP; /*!< Stop encrypt/decrypt. */
Kojto 93:e188a91d3eaa 800 __I uint32_t RESERVED0[61];
Kojto 93:e188a91d3eaa 801 __IO uint32_t EVENTS_ENDKSGEN; /*!< Keystream generation completed. */
Kojto 93:e188a91d3eaa 802 __IO uint32_t EVENTS_ENDCRYPT; /*!< Encrypt/decrypt completed. */
Kojto 93:e188a91d3eaa 803 __IO uint32_t EVENTS_ERROR; /*!< Error happened. */
Kojto 93:e188a91d3eaa 804 __I uint32_t RESERVED1[61];
Kojto 93:e188a91d3eaa 805 __IO uint32_t SHORTS; /*!< Shortcut for the CCM. */
Kojto 93:e188a91d3eaa 806 __I uint32_t RESERVED2[64];
Kojto 93:e188a91d3eaa 807 __IO uint32_t INTENSET; /*!< Interrupt enable set register. */
Kojto 93:e188a91d3eaa 808 __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */
Kojto 93:e188a91d3eaa 809 __I uint32_t RESERVED3[61];
Kojto 93:e188a91d3eaa 810 __I uint32_t MICSTATUS; /*!< CCM RX MIC check result. */
Kojto 93:e188a91d3eaa 811 __I uint32_t RESERVED4[63];
Kojto 93:e188a91d3eaa 812 __IO uint32_t ENABLE; /*!< CCM enable. */
Kojto 93:e188a91d3eaa 813 __IO uint32_t MODE; /*!< Operation mode. */
Kojto 93:e188a91d3eaa 814 __IO uint32_t CNFPTR; /*!< Pointer to data structure holding AES key and NONCE vector. */
Kojto 93:e188a91d3eaa 815 __IO uint32_t INPTR; /*!< Pointer to input packet. */
Kojto 93:e188a91d3eaa 816 __IO uint32_t OUTPTR; /*!< Pointer to output packet. */
Kojto 93:e188a91d3eaa 817 __IO uint32_t SCRATCHPTR; /*!< Pointer to "scratch" data area used for temporary storage during
Kojto 93:e188a91d3eaa 818 resolution. A minimum of 43 bytes must be reserved. */
Kojto 93:e188a91d3eaa 819 __I uint32_t RESERVED5[697];
Kojto 93:e188a91d3eaa 820 __IO uint32_t POWER; /*!< Peripheral power control. */
Kojto 93:e188a91d3eaa 821 } NRF_CCM_Type;
Kojto 93:e188a91d3eaa 822
Kojto 93:e188a91d3eaa 823
Kojto 93:e188a91d3eaa 824 /* ================================================================================ */
Kojto 93:e188a91d3eaa 825 /* ================ WDT ================ */
Kojto 93:e188a91d3eaa 826 /* ================================================================================ */
Kojto 93:e188a91d3eaa 827
Kojto 93:e188a91d3eaa 828
Kojto 93:e188a91d3eaa 829 /**
Kojto 93:e188a91d3eaa 830 * @brief Watchdog Timer. (WDT)
Kojto 93:e188a91d3eaa 831 */
Kojto 93:e188a91d3eaa 832
Kojto 93:e188a91d3eaa 833 typedef struct { /*!< WDT Structure */
Kojto 93:e188a91d3eaa 834 __O uint32_t TASKS_START; /*!< Start the watchdog. */
Kojto 93:e188a91d3eaa 835 __I uint32_t RESERVED0[63];
Kojto 93:e188a91d3eaa 836 __IO uint32_t EVENTS_TIMEOUT; /*!< Watchdog timeout. */
Kojto 93:e188a91d3eaa 837 __I uint32_t RESERVED1[128];
Kojto 93:e188a91d3eaa 838 __IO uint32_t INTENSET; /*!< Interrupt enable set register. */
Kojto 93:e188a91d3eaa 839 __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */
Kojto 93:e188a91d3eaa 840 __I uint32_t RESERVED2[61];
Kojto 93:e188a91d3eaa 841 __I uint32_t RUNSTATUS; /*!< Watchdog running status. */
Kojto 93:e188a91d3eaa 842 __I uint32_t REQSTATUS; /*!< Request status. */
Kojto 93:e188a91d3eaa 843 __I uint32_t RESERVED3[63];
Kojto 93:e188a91d3eaa 844 __IO uint32_t CRV; /*!< Counter reload value in number of 32kiHz clock cycles. */
Kojto 93:e188a91d3eaa 845 __IO uint32_t RREN; /*!< Reload request enable. */
Kojto 93:e188a91d3eaa 846 __IO uint32_t CONFIG; /*!< Configuration register. */
Kojto 93:e188a91d3eaa 847 __I uint32_t RESERVED4[60];
Kojto 93:e188a91d3eaa 848 __O uint32_t RR[8]; /*!< Reload requests registers. */
Kojto 93:e188a91d3eaa 849 __I uint32_t RESERVED5[631];
Kojto 93:e188a91d3eaa 850 __IO uint32_t POWER; /*!< Peripheral power control. */
Kojto 93:e188a91d3eaa 851 } NRF_WDT_Type;
Kojto 93:e188a91d3eaa 852
Kojto 93:e188a91d3eaa 853
Kojto 93:e188a91d3eaa 854 /* ================================================================================ */
Kojto 93:e188a91d3eaa 855 /* ================ QDEC ================ */
Kojto 93:e188a91d3eaa 856 /* ================================================================================ */
Kojto 93:e188a91d3eaa 857
Kojto 93:e188a91d3eaa 858
Kojto 93:e188a91d3eaa 859 /**
Kojto 93:e188a91d3eaa 860 * @brief Rotary decoder. (QDEC)
Kojto 93:e188a91d3eaa 861 */
Kojto 93:e188a91d3eaa 862
Kojto 93:e188a91d3eaa 863 typedef struct { /*!< QDEC Structure */
Kojto 93:e188a91d3eaa 864 __O uint32_t TASKS_START; /*!< Start the quadrature decoder. */
Kojto 93:e188a91d3eaa 865 __O uint32_t TASKS_STOP; /*!< Stop the quadrature decoder. */
Kojto 93:e188a91d3eaa 866 __O uint32_t TASKS_READCLRACC; /*!< Transfers the content from ACC registers to ACCREAD registers,
Kojto 93:e188a91d3eaa 867 and clears the ACC registers. */
Kojto 93:e188a91d3eaa 868 __I uint32_t RESERVED0[61];
Kojto 93:e188a91d3eaa 869 __IO uint32_t EVENTS_SAMPLERDY; /*!< A new sample is written to the sample register. */
Kojto 93:e188a91d3eaa 870 __IO uint32_t EVENTS_REPORTRDY; /*!< REPORTPER number of samples accumulated in ACC register, and
Kojto 93:e188a91d3eaa 871 ACC register different than zero. */
Kojto 93:e188a91d3eaa 872 __IO uint32_t EVENTS_ACCOF; /*!< ACC or ACCDBL register overflow. */
Kojto 93:e188a91d3eaa 873 __I uint32_t RESERVED1[61];
Kojto 93:e188a91d3eaa 874 __IO uint32_t SHORTS; /*!< Shortcut for the QDEC. */
Kojto 93:e188a91d3eaa 875 __I uint32_t RESERVED2[64];
Kojto 93:e188a91d3eaa 876 __IO uint32_t INTENSET; /*!< Interrupt enable set register. */
Kojto 93:e188a91d3eaa 877 __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */
Kojto 93:e188a91d3eaa 878 __I uint32_t RESERVED3[125];
Kojto 93:e188a91d3eaa 879 __IO uint32_t ENABLE; /*!< Enable the QDEC. */
Kojto 93:e188a91d3eaa 880 __IO uint32_t LEDPOL; /*!< LED output pin polarity. */
Kojto 93:e188a91d3eaa 881 __IO uint32_t SAMPLEPER; /*!< Sample period. */
Kojto 93:e188a91d3eaa 882 __I int32_t SAMPLE; /*!< Motion sample value. */
Kojto 93:e188a91d3eaa 883 __IO uint32_t REPORTPER; /*!< Number of samples to generate an EVENT_REPORTRDY. */
Kojto 93:e188a91d3eaa 884 __I int32_t ACC; /*!< Accumulated valid transitions register. */
Kojto 93:e188a91d3eaa 885 __I int32_t ACCREAD; /*!< Snapshot of ACC register. Value generated by the TASKS_READCLEACC
Kojto 93:e188a91d3eaa 886 task. */
Kojto 93:e188a91d3eaa 887 __IO uint32_t PSELLED; /*!< Pin select for LED output. */
Kojto 93:e188a91d3eaa 888 __IO uint32_t PSELA; /*!< Pin select for phase A input. */
Kojto 93:e188a91d3eaa 889 __IO uint32_t PSELB; /*!< Pin select for phase B input. */
Kojto 93:e188a91d3eaa 890 __IO uint32_t DBFEN; /*!< Enable debouncer input filters. */
Kojto 93:e188a91d3eaa 891 __I uint32_t RESERVED4[5];
Kojto 93:e188a91d3eaa 892 __IO uint32_t LEDPRE; /*!< Time LED is switched ON before the sample. */
Kojto 93:e188a91d3eaa 893 __I uint32_t ACCDBL; /*!< Accumulated double (error) transitions register. */
Kojto 93:e188a91d3eaa 894 __I uint32_t ACCDBLREAD; /*!< Snapshot of ACCDBL register. Value generated by the TASKS_READCLEACC
Kojto 93:e188a91d3eaa 895 task. */
Kojto 93:e188a91d3eaa 896 __I uint32_t RESERVED5[684];
Kojto 93:e188a91d3eaa 897 __IO uint32_t POWER; /*!< Peripheral power control. */
Kojto 93:e188a91d3eaa 898 } NRF_QDEC_Type;
Kojto 93:e188a91d3eaa 899
Kojto 93:e188a91d3eaa 900
Kojto 93:e188a91d3eaa 901 /* ================================================================================ */
Kojto 93:e188a91d3eaa 902 /* ================ LPCOMP ================ */
Kojto 93:e188a91d3eaa 903 /* ================================================================================ */
Kojto 93:e188a91d3eaa 904
Kojto 93:e188a91d3eaa 905
Kojto 93:e188a91d3eaa 906 /**
Kojto 93:e188a91d3eaa 907 * @brief Wakeup Comparator. (LPCOMP)
Kojto 93:e188a91d3eaa 908 */
Kojto 93:e188a91d3eaa 909
Kojto 93:e188a91d3eaa 910 typedef struct { /*!< LPCOMP Structure */
Kojto 93:e188a91d3eaa 911 __O uint32_t TASKS_START; /*!< Start the comparator. */
Kojto 93:e188a91d3eaa 912 __O uint32_t TASKS_STOP; /*!< Stop the comparator. */
Kojto 93:e188a91d3eaa 913 __O uint32_t TASKS_SAMPLE; /*!< Sample comparator value. */
Kojto 93:e188a91d3eaa 914 __I uint32_t RESERVED0[61];
Kojto 93:e188a91d3eaa 915 __IO uint32_t EVENTS_READY; /*!< LPCOMP is ready and output is valid. */
Kojto 93:e188a91d3eaa 916 __IO uint32_t EVENTS_DOWN; /*!< Input voltage crossed the threshold going down. */
Kojto 93:e188a91d3eaa 917 __IO uint32_t EVENTS_UP; /*!< Input voltage crossed the threshold going up. */
Kojto 93:e188a91d3eaa 918 __IO uint32_t EVENTS_CROSS; /*!< Input voltage crossed the threshold in any direction. */
Kojto 93:e188a91d3eaa 919 __I uint32_t RESERVED1[60];
Kojto 93:e188a91d3eaa 920 __IO uint32_t SHORTS; /*!< Shortcut for the LPCOMP. */
Kojto 93:e188a91d3eaa 921 __I uint32_t RESERVED2[64];
Kojto 93:e188a91d3eaa 922 __IO uint32_t INTENSET; /*!< Interrupt enable set register. */
Kojto 93:e188a91d3eaa 923 __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */
Kojto 93:e188a91d3eaa 924 __I uint32_t RESERVED3[61];
Kojto 93:e188a91d3eaa 925 __I uint32_t RESULT; /*!< Result of last compare. */
Kojto 93:e188a91d3eaa 926 __I uint32_t RESERVED4[63];
Kojto 93:e188a91d3eaa 927 __IO uint32_t ENABLE; /*!< Enable the LPCOMP. */
Kojto 93:e188a91d3eaa 928 __IO uint32_t PSEL; /*!< Input pin select. */
Kojto 93:e188a91d3eaa 929 __IO uint32_t REFSEL; /*!< Reference select. */
Kojto 93:e188a91d3eaa 930 __IO uint32_t EXTREFSEL; /*!< External reference select. */
Kojto 93:e188a91d3eaa 931 __I uint32_t RESERVED5[4];
Kojto 93:e188a91d3eaa 932 __IO uint32_t ANADETECT; /*!< Analog detect configuration. */
Kojto 93:e188a91d3eaa 933 __I uint32_t RESERVED6[694];
Kojto 93:e188a91d3eaa 934 __IO uint32_t POWER; /*!< Peripheral power control. */
Kojto 93:e188a91d3eaa 935 } NRF_LPCOMP_Type;
Kojto 93:e188a91d3eaa 936
Kojto 93:e188a91d3eaa 937
Kojto 93:e188a91d3eaa 938 /* ================================================================================ */
Kojto 93:e188a91d3eaa 939 /* ================ COMP ================ */
Kojto 93:e188a91d3eaa 940 /* ================================================================================ */
Kojto 93:e188a91d3eaa 941
Kojto 93:e188a91d3eaa 942
Kojto 93:e188a91d3eaa 943 /**
Kojto 93:e188a91d3eaa 944 * @brief Comparator. (COMP)
Kojto 93:e188a91d3eaa 945 */
Kojto 93:e188a91d3eaa 946
Kojto 93:e188a91d3eaa 947 typedef struct { /*!< COMP Structure */
Kojto 93:e188a91d3eaa 948 __O uint32_t TASKS_START; /*!< Start the comparator. */
Kojto 93:e188a91d3eaa 949 __O uint32_t TASKS_STOP; /*!< Stop the comparator. */
Kojto 93:e188a91d3eaa 950 __O uint32_t TASKS_SAMPLE; /*!< Sample comparator value. */
Kojto 93:e188a91d3eaa 951 __I uint32_t RESERVED0[61];
Kojto 93:e188a91d3eaa 952 __IO uint32_t EVENTS_READY; /*!< COMP is ready and output is valid. */
Kojto 93:e188a91d3eaa 953 __IO uint32_t EVENTS_DOWN; /*!< Input voltage crossed the threshold going down. */
Kojto 93:e188a91d3eaa 954 __IO uint32_t EVENTS_UP; /*!< Input voltage crossed the threshold going up. */
Kojto 93:e188a91d3eaa 955 __IO uint32_t EVENTS_CROSS; /*!< Input voltage crossed the threshold in any direction. */
Kojto 93:e188a91d3eaa 956 __I uint32_t RESERVED1[60];
Kojto 93:e188a91d3eaa 957 __IO uint32_t SHORTS; /*!< Shortcut for the COMP. */
Kojto 93:e188a91d3eaa 958 __I uint32_t RESERVED2[64];
Kojto 93:e188a91d3eaa 959 __IO uint32_t INTENSET; /*!< Interrupt enable set register. */
Kojto 93:e188a91d3eaa 960 __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */
Kojto 93:e188a91d3eaa 961 __I uint32_t RESERVED3[61];
Kojto 93:e188a91d3eaa 962 __I uint32_t RESULT; /*!< Compare result. */
Kojto 93:e188a91d3eaa 963 __I uint32_t RESERVED4[63];
Kojto 93:e188a91d3eaa 964 __IO uint32_t ENABLE; /*!< Enable the COMP. */
Kojto 93:e188a91d3eaa 965 __IO uint32_t PSEL; /*!< Input pin select. */
Kojto 93:e188a91d3eaa 966 __IO uint32_t REFSEL; /*!< Reference select. */
Kojto 93:e188a91d3eaa 967 __IO uint32_t EXTREFSEL; /*!< External reference select. */
Kojto 93:e188a91d3eaa 968 __I uint32_t RESERVED5[8];
Kojto 93:e188a91d3eaa 969 __IO uint32_t TH; /*!< Threshold configuration for hysteresis unit. */
Kojto 93:e188a91d3eaa 970 __IO uint32_t MODE; /*!< Mode configuration. */
Kojto 93:e188a91d3eaa 971 __I uint32_t RESERVED6[689];
Kojto 93:e188a91d3eaa 972 __IO uint32_t POWER; /*!< Peripheral power control. */
Kojto 93:e188a91d3eaa 973 } NRF_COMP_Type;
Kojto 93:e188a91d3eaa 974
Kojto 93:e188a91d3eaa 975
Kojto 93:e188a91d3eaa 976 /* ================================================================================ */
Kojto 93:e188a91d3eaa 977 /* ================ SWI ================ */
Kojto 93:e188a91d3eaa 978 /* ================================================================================ */
Kojto 93:e188a91d3eaa 979
Kojto 93:e188a91d3eaa 980
Kojto 93:e188a91d3eaa 981 /**
Kojto 93:e188a91d3eaa 982 * @brief SW Interrupts. (SWI)
Kojto 93:e188a91d3eaa 983 */
Kojto 93:e188a91d3eaa 984
Kojto 93:e188a91d3eaa 985 typedef struct { /*!< SWI Structure */
Kojto 93:e188a91d3eaa 986 __I uint32_t UNUSED; /*!< Unused. */
Kojto 93:e188a91d3eaa 987 } NRF_SWI_Type;
Kojto 93:e188a91d3eaa 988
Kojto 93:e188a91d3eaa 989
Kojto 93:e188a91d3eaa 990 /* ================================================================================ */
Kojto 93:e188a91d3eaa 991 /* ================ NVMC ================ */
Kojto 93:e188a91d3eaa 992 /* ================================================================================ */
Kojto 93:e188a91d3eaa 993
Kojto 93:e188a91d3eaa 994
Kojto 93:e188a91d3eaa 995 /**
Kojto 93:e188a91d3eaa 996 * @brief Non Volatile Memory Controller. (NVMC)
Kojto 93:e188a91d3eaa 997 */
Kojto 93:e188a91d3eaa 998
Kojto 93:e188a91d3eaa 999 typedef struct { /*!< NVMC Structure */
Kojto 93:e188a91d3eaa 1000 __I uint32_t RESERVED0[256];
Kojto 93:e188a91d3eaa 1001 __I uint32_t READY; /*!< Ready flag. */
Kojto 93:e188a91d3eaa 1002 __I uint32_t RESERVED1[64];
Kojto 93:e188a91d3eaa 1003 __IO uint32_t CONFIG; /*!< Configuration register. */
Kojto 93:e188a91d3eaa 1004 __IO uint32_t ERASEPAGE; /*!< Register for erasing a non-protected non-volatile memory page. */
Kojto 93:e188a91d3eaa 1005 __IO uint32_t ERASEALL; /*!< Register for erasing all non-volatile user memory. */
Kojto 93:e188a91d3eaa 1006 __IO uint32_t ERASEPROTECTEDPAGE; /*!< Register for erasing a protected non-volatile memory page. */
Kojto 93:e188a91d3eaa 1007 __IO uint32_t ERASEUICR; /*!< Register for start erasing User Information Congfiguration Registers. */
Kojto 93:e188a91d3eaa 1008 } NRF_NVMC_Type;
Kojto 93:e188a91d3eaa 1009
Kojto 93:e188a91d3eaa 1010
Kojto 93:e188a91d3eaa 1011 /* ================================================================================ */
Kojto 93:e188a91d3eaa 1012 /* ================ PPI ================ */
Kojto 93:e188a91d3eaa 1013 /* ================================================================================ */
Kojto 93:e188a91d3eaa 1014
Kojto 93:e188a91d3eaa 1015
Kojto 93:e188a91d3eaa 1016 /**
Kojto 93:e188a91d3eaa 1017 * @brief PPI controller. (PPI)
Kojto 93:e188a91d3eaa 1018 */
Kojto 93:e188a91d3eaa 1019
Kojto 93:e188a91d3eaa 1020 typedef struct { /*!< PPI Structure */
Kojto 93:e188a91d3eaa 1021 PPI_TASKS_CHG_Type TASKS_CHG[4]; /*!< Channel group tasks. */
Kojto 93:e188a91d3eaa 1022 __I uint32_t RESERVED0[312];
Kojto 93:e188a91d3eaa 1023 __IO uint32_t CHEN; /*!< Channel enable. */
Kojto 93:e188a91d3eaa 1024 __IO uint32_t CHENSET; /*!< Channel enable set. */
Kojto 93:e188a91d3eaa 1025 __IO uint32_t CHENCLR; /*!< Channel enable clear. */
Kojto 93:e188a91d3eaa 1026 __I uint32_t RESERVED1;
Kojto 93:e188a91d3eaa 1027 PPI_CH_Type CH[16]; /*!< PPI Channel. */
Kojto 93:e188a91d3eaa 1028 __I uint32_t RESERVED2[156];
Kojto 93:e188a91d3eaa 1029 __IO uint32_t CHG[4]; /*!< Channel group configuration. */
Kojto 93:e188a91d3eaa 1030 } NRF_PPI_Type;
Kojto 93:e188a91d3eaa 1031
Kojto 93:e188a91d3eaa 1032
Kojto 93:e188a91d3eaa 1033 /* ================================================================================ */
Kojto 93:e188a91d3eaa 1034 /* ================ FICR ================ */
Kojto 93:e188a91d3eaa 1035 /* ================================================================================ */
Kojto 93:e188a91d3eaa 1036
Kojto 93:e188a91d3eaa 1037
Kojto 93:e188a91d3eaa 1038 /**
Kojto 93:e188a91d3eaa 1039 * @brief Factory Information Configuration. (FICR)
Kojto 93:e188a91d3eaa 1040 */
Kojto 93:e188a91d3eaa 1041
Kojto 93:e188a91d3eaa 1042 typedef struct { /*!< FICR Structure */
Kojto 93:e188a91d3eaa 1043 __I uint32_t RESERVED0[4];
Kojto 93:e188a91d3eaa 1044 __I uint32_t CODEPAGESIZE; /*!< Code memory page size in bytes. */
Kojto 93:e188a91d3eaa 1045 __I uint32_t CODESIZE; /*!< Code memory size in pages. */
Kojto 93:e188a91d3eaa 1046 __I uint32_t RESERVED1[4];
Kojto 93:e188a91d3eaa 1047 __I uint32_t CLENR0; /*!< Length of code region 0 in bytes. */
Kojto 93:e188a91d3eaa 1048 __I uint32_t PPFC; /*!< Pre-programmed factory code present. */
Kojto 93:e188a91d3eaa 1049 __I uint32_t RESERVED2;
Kojto 93:e188a91d3eaa 1050 __I uint32_t NUMRAMBLOCK; /*!< Number of individualy controllable RAM blocks. */
Kojto 93:e188a91d3eaa 1051 __I uint32_t SIZERAMBLOCK[4]; /*!< Size of RAM block in bytes. */
Kojto 93:e188a91d3eaa 1052 __I uint32_t RESERVED3[5];
Kojto 93:e188a91d3eaa 1053 __I uint32_t CONFIGID; /*!< Configuration identifier. */
Kojto 93:e188a91d3eaa 1054 __I uint32_t DEVICEID[2]; /*!< Device identifier. */
Kojto 93:e188a91d3eaa 1055 __I uint32_t RESERVED4[6];
Kojto 93:e188a91d3eaa 1056 __I uint32_t ER[4]; /*!< Encryption root. */
Kojto 93:e188a91d3eaa 1057 __I uint32_t IR[4]; /*!< Identity root. */
Kojto 93:e188a91d3eaa 1058 __I uint32_t DEVICEADDRTYPE; /*!< Device address type. */
Kojto 93:e188a91d3eaa 1059 __I uint32_t DEVICEADDR[2]; /*!< Device address. */
Kojto 93:e188a91d3eaa 1060 __I uint32_t OVERRIDEEN; /*!< Radio calibration override enable. */
Kojto 93:e188a91d3eaa 1061 __I uint32_t RESERVED5[15];
Kojto 93:e188a91d3eaa 1062 __I uint32_t BLE_1MBIT[5]; /*!< Override values for the OVERRIDEn registers in RADIO for BLE_1Mbit
Kojto 93:e188a91d3eaa 1063 mode. */
Kojto 93:e188a91d3eaa 1064 } NRF_FICR_Type;
Kojto 93:e188a91d3eaa 1065
Kojto 93:e188a91d3eaa 1066
Kojto 93:e188a91d3eaa 1067 /* ================================================================================ */
Kojto 93:e188a91d3eaa 1068 /* ================ UICR ================ */
Kojto 93:e188a91d3eaa 1069 /* ================================================================================ */
Kojto 93:e188a91d3eaa 1070
Kojto 93:e188a91d3eaa 1071
Kojto 93:e188a91d3eaa 1072 /**
Kojto 93:e188a91d3eaa 1073 * @brief User Information Configuration. (UICR)
Kojto 93:e188a91d3eaa 1074 */
Kojto 93:e188a91d3eaa 1075
Kojto 93:e188a91d3eaa 1076 typedef struct { /*!< UICR Structure */
Kojto 93:e188a91d3eaa 1077 __IO uint32_t CLENR0; /*!< Length of code region 0. */
Kojto 93:e188a91d3eaa 1078 __IO uint32_t RBPCONF; /*!< Readback protection configuration. */
Kojto 93:e188a91d3eaa 1079 __IO uint32_t XTALFREQ; /*!< Reset value for CLOCK XTALFREQ register. */
Kojto 93:e188a91d3eaa 1080 __I uint32_t RESERVED0;
Kojto 93:e188a91d3eaa 1081 __I uint32_t FWID; /*!< Firmware ID. */
Kojto 93:e188a91d3eaa 1082 __IO uint32_t BOOTLOADERADDR; /*!< Bootloader start address. */
Kojto 93:e188a91d3eaa 1083 } NRF_UICR_Type;
Kojto 93:e188a91d3eaa 1084
Kojto 93:e188a91d3eaa 1085
Kojto 93:e188a91d3eaa 1086 /* ================================================================================ */
Kojto 93:e188a91d3eaa 1087 /* ================ GPIO ================ */
Kojto 93:e188a91d3eaa 1088 /* ================================================================================ */
Kojto 93:e188a91d3eaa 1089
Kojto 93:e188a91d3eaa 1090
Kojto 93:e188a91d3eaa 1091 /**
Kojto 93:e188a91d3eaa 1092 * @brief General purpose input and output. (GPIO)
Kojto 93:e188a91d3eaa 1093 */
Kojto 93:e188a91d3eaa 1094
Kojto 93:e188a91d3eaa 1095 typedef struct { /*!< GPIO Structure */
Kojto 93:e188a91d3eaa 1096 __I uint32_t RESERVED0[321];
Kojto 93:e188a91d3eaa 1097 __IO uint32_t OUT; /*!< Write GPIO port. */
Kojto 93:e188a91d3eaa 1098 __IO uint32_t OUTSET; /*!< Set individual bits in GPIO port. */
Kojto 93:e188a91d3eaa 1099 __IO uint32_t OUTCLR; /*!< Clear individual bits in GPIO port. */
Kojto 93:e188a91d3eaa 1100 __I uint32_t IN; /*!< Read GPIO port. */
Kojto 93:e188a91d3eaa 1101 __IO uint32_t DIR; /*!< Direction of GPIO pins. */
Kojto 93:e188a91d3eaa 1102 __IO uint32_t DIRSET; /*!< DIR set register. */
Kojto 93:e188a91d3eaa 1103 __IO uint32_t DIRCLR; /*!< DIR clear register. */
Kojto 93:e188a91d3eaa 1104 __I uint32_t RESERVED1[120];
Kojto 93:e188a91d3eaa 1105 __IO uint32_t PIN_CNF[32]; /*!< Configuration of GPIO pins. */
Kojto 93:e188a91d3eaa 1106 } NRF_GPIO_Type;
Kojto 93:e188a91d3eaa 1107
Kojto 93:e188a91d3eaa 1108
Kojto 93:e188a91d3eaa 1109 /* -------------------- End of section using anonymous unions ------------------- */
Kojto 93:e188a91d3eaa 1110 #if defined(__CC_ARM)
Kojto 93:e188a91d3eaa 1111 #pragma pop
Kojto 93:e188a91d3eaa 1112 #elif defined(__ICCARM__)
Kojto 93:e188a91d3eaa 1113 /* leave anonymous unions enabled */
Kojto 93:e188a91d3eaa 1114 #elif defined(__GNUC__)
Kojto 93:e188a91d3eaa 1115 /* anonymous unions are enabled by default */
Kojto 93:e188a91d3eaa 1116 #elif defined(__TMS470__)
Kojto 93:e188a91d3eaa 1117 /* anonymous unions are enabled by default */
Kojto 93:e188a91d3eaa 1118 #elif defined(__TASKING__)
Kojto 93:e188a91d3eaa 1119 #pragma warning restore
Kojto 93:e188a91d3eaa 1120 #else
Kojto 93:e188a91d3eaa 1121 #warning Not supported compiler type
Kojto 93:e188a91d3eaa 1122 #endif
Kojto 93:e188a91d3eaa 1123
Kojto 93:e188a91d3eaa 1124
Kojto 93:e188a91d3eaa 1125
Kojto 93:e188a91d3eaa 1126
Kojto 93:e188a91d3eaa 1127 /* ================================================================================ */
Kojto 93:e188a91d3eaa 1128 /* ================ Peripheral memory map ================ */
Kojto 93:e188a91d3eaa 1129 /* ================================================================================ */
Kojto 93:e188a91d3eaa 1130
Kojto 93:e188a91d3eaa 1131 #define NRF_POWER_BASE 0x40000000UL
Kojto 93:e188a91d3eaa 1132 #define NRF_CLOCK_BASE 0x40000000UL
Kojto 93:e188a91d3eaa 1133 #define NRF_MPU_BASE 0x40000000UL
Kojto 93:e188a91d3eaa 1134 #define NRF_PU_BASE 0x40000000UL
Kojto 93:e188a91d3eaa 1135 #define NRF_AMLI_BASE 0x40000000UL
Kojto 93:e188a91d3eaa 1136 #define NRF_RADIO_BASE 0x40001000UL
Kojto 93:e188a91d3eaa 1137 #define NRF_UART0_BASE 0x40002000UL
Kojto 93:e188a91d3eaa 1138 #define NRF_SPI0_BASE 0x40003000UL
Kojto 93:e188a91d3eaa 1139 #define NRF_TWI0_BASE 0x40003000UL
Kojto 93:e188a91d3eaa 1140 #define NRF_SPI1_BASE 0x40004000UL
Kojto 93:e188a91d3eaa 1141 #define NRF_TWI1_BASE 0x40004000UL
Kojto 93:e188a91d3eaa 1142 #define NRF_SPIS1_BASE 0x40004000UL
Kojto 93:e188a91d3eaa 1143 #define NRF_GPIOTE_BASE 0x40006000UL
Kojto 93:e188a91d3eaa 1144 #define NRF_ADC_BASE 0x40007000UL
Kojto 93:e188a91d3eaa 1145 #define NRF_TIMER0_BASE 0x40008000UL
Kojto 93:e188a91d3eaa 1146 #define NRF_TIMER1_BASE 0x40009000UL
Kojto 93:e188a91d3eaa 1147 #define NRF_TIMER2_BASE 0x4000A000UL
Kojto 93:e188a91d3eaa 1148 #define NRF_RTC0_BASE 0x4000B000UL
Kojto 93:e188a91d3eaa 1149 #define NRF_TEMP_BASE 0x4000C000UL
Kojto 93:e188a91d3eaa 1150 #define NRF_RNG_BASE 0x4000D000UL
Kojto 93:e188a91d3eaa 1151 #define NRF_ECB_BASE 0x4000E000UL
Kojto 93:e188a91d3eaa 1152 #define NRF_AAR_BASE 0x4000F000UL
Kojto 93:e188a91d3eaa 1153 #define NRF_CCM_BASE 0x4000F000UL
Kojto 93:e188a91d3eaa 1154 #define NRF_WDT_BASE 0x40010000UL
Kojto 93:e188a91d3eaa 1155 #define NRF_RTC1_BASE 0x40011000UL
Kojto 93:e188a91d3eaa 1156 #define NRF_QDEC_BASE 0x40012000UL
Kojto 93:e188a91d3eaa 1157 #define NRF_LPCOMP_BASE 0x40013000UL
Kojto 93:e188a91d3eaa 1158 #define NRF_COMP_BASE 0x40013000UL
Kojto 93:e188a91d3eaa 1159 #define NRF_SWI_BASE 0x40014000UL
Kojto 93:e188a91d3eaa 1160 #define NRF_NVMC_BASE 0x4001E000UL
Kojto 93:e188a91d3eaa 1161 #define NRF_PPI_BASE 0x4001F000UL
Kojto 93:e188a91d3eaa 1162 #define NRF_FICR_BASE 0x10000000UL
Kojto 93:e188a91d3eaa 1163 #define NRF_UICR_BASE 0x10001000UL
Kojto 93:e188a91d3eaa 1164 #define NRF_GPIO_BASE 0x50000000UL
Kojto 93:e188a91d3eaa 1165
Kojto 93:e188a91d3eaa 1166
Kojto 93:e188a91d3eaa 1167 /* ================================================================================ */
Kojto 93:e188a91d3eaa 1168 /* ================ Peripheral declaration ================ */
Kojto 93:e188a91d3eaa 1169 /* ================================================================================ */
Kojto 93:e188a91d3eaa 1170
Kojto 93:e188a91d3eaa 1171 #define NRF_POWER ((NRF_POWER_Type *) NRF_POWER_BASE)
Kojto 93:e188a91d3eaa 1172 #define NRF_CLOCK ((NRF_CLOCK_Type *) NRF_CLOCK_BASE)
Kojto 93:e188a91d3eaa 1173 #define NRF_MPU ((NRF_MPU_Type *) NRF_MPU_BASE)
Kojto 93:e188a91d3eaa 1174 #define NRF_PU ((NRF_PU_Type *) NRF_PU_BASE)
Kojto 93:e188a91d3eaa 1175 #define NRF_AMLI ((NRF_AMLI_Type *) NRF_AMLI_BASE)
Kojto 93:e188a91d3eaa 1176 #define NRF_RADIO ((NRF_RADIO_Type *) NRF_RADIO_BASE)
Kojto 93:e188a91d3eaa 1177 #define NRF_UART0 ((NRF_UART_Type *) NRF_UART0_BASE)
Kojto 93:e188a91d3eaa 1178 #define NRF_SPI0 ((NRF_SPI_Type *) NRF_SPI0_BASE)
Kojto 93:e188a91d3eaa 1179 #define NRF_TWI0 ((NRF_TWI_Type *) NRF_TWI0_BASE)
Kojto 93:e188a91d3eaa 1180 #define NRF_SPI1 ((NRF_SPI_Type *) NRF_SPI1_BASE)
Kojto 93:e188a91d3eaa 1181 #define NRF_TWI1 ((NRF_TWI_Type *) NRF_TWI1_BASE)
Kojto 93:e188a91d3eaa 1182 #define NRF_SPIS1 ((NRF_SPIS_Type *) NRF_SPIS1_BASE)
Kojto 93:e188a91d3eaa 1183 #define NRF_GPIOTE ((NRF_GPIOTE_Type *) NRF_GPIOTE_BASE)
Kojto 93:e188a91d3eaa 1184 #define NRF_ADC ((NRF_ADC_Type *) NRF_ADC_BASE)
Kojto 93:e188a91d3eaa 1185 #define NRF_TIMER0 ((NRF_TIMER_Type *) NRF_TIMER0_BASE)
Kojto 93:e188a91d3eaa 1186 #define NRF_TIMER1 ((NRF_TIMER_Type *) NRF_TIMER1_BASE)
Kojto 93:e188a91d3eaa 1187 #define NRF_TIMER2 ((NRF_TIMER_Type *) NRF_TIMER2_BASE)
Kojto 93:e188a91d3eaa 1188 #define NRF_RTC0 ((NRF_RTC_Type *) NRF_RTC0_BASE)
Kojto 93:e188a91d3eaa 1189 #define NRF_TEMP ((NRF_TEMP_Type *) NRF_TEMP_BASE)
Kojto 93:e188a91d3eaa 1190 #define NRF_RNG ((NRF_RNG_Type *) NRF_RNG_BASE)
Kojto 93:e188a91d3eaa 1191 #define NRF_ECB ((NRF_ECB_Type *) NRF_ECB_BASE)
Kojto 93:e188a91d3eaa 1192 #define NRF_AAR ((NRF_AAR_Type *) NRF_AAR_BASE)
Kojto 93:e188a91d3eaa 1193 #define NRF_CCM ((NRF_CCM_Type *) NRF_CCM_BASE)
Kojto 93:e188a91d3eaa 1194 #define NRF_WDT ((NRF_WDT_Type *) NRF_WDT_BASE)
Kojto 93:e188a91d3eaa 1195 #define NRF_RTC1 ((NRF_RTC_Type *) NRF_RTC1_BASE)
Kojto 93:e188a91d3eaa 1196 #define NRF_QDEC ((NRF_QDEC_Type *) NRF_QDEC_BASE)
Kojto 93:e188a91d3eaa 1197 #define NRF_LPCOMP ((NRF_LPCOMP_Type *) NRF_LPCOMP_BASE)
Kojto 93:e188a91d3eaa 1198 #define NRF_COMP ((NRF_COMP_Type *) NRF_COMP_BASE)
Kojto 93:e188a91d3eaa 1199 #define NRF_SWI ((NRF_SWI_Type *) NRF_SWI_BASE)
Kojto 93:e188a91d3eaa 1200 #define NRF_NVMC ((NRF_NVMC_Type *) NRF_NVMC_BASE)
Kojto 93:e188a91d3eaa 1201 #define NRF_PPI ((NRF_PPI_Type *) NRF_PPI_BASE)
Kojto 93:e188a91d3eaa 1202 #define NRF_FICR ((NRF_FICR_Type *) NRF_FICR_BASE)
Kojto 93:e188a91d3eaa 1203 #define NRF_UICR ((NRF_UICR_Type *) NRF_UICR_BASE)
Kojto 93:e188a91d3eaa 1204 #define NRF_GPIO ((NRF_GPIO_Type *) NRF_GPIO_BASE)
Kojto 93:e188a91d3eaa 1205
Kojto 93:e188a91d3eaa 1206
Kojto 93:e188a91d3eaa 1207 /** @} */ /* End of group Device_Peripheral_Registers */
Kojto 93:e188a91d3eaa 1208 /** @} */ /* End of group nRF51 */
Kojto 93:e188a91d3eaa 1209 /** @} */ /* End of group Nordic Semiconductor */
Kojto 93:e188a91d3eaa 1210
Kojto 93:e188a91d3eaa 1211 #ifdef __cplusplus
Kojto 93:e188a91d3eaa 1212 }
Kojto 93:e188a91d3eaa 1213 #endif
Kojto 93:e188a91d3eaa 1214
Kojto 93:e188a91d3eaa 1215
Kojto 93:e188a91d3eaa 1216 #endif /* nRF51_H */