7 #ifndef NRFCXX_NRF52832_CORE_HPP 8 #define NRFCXX_NRF52832_CORE_HPP 16 void POWER_CLOCK_IRQHandler ();
17 void RADIO_IRQHandler ();
18 void UARTE0_UART0_IRQHandler ();
19 void SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler ();
20 void SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler ();
21 void NFCT_IRQHandler ();
22 void GPIOTE_IRQHandler ();
23 void SAADC_IRQHandler ();
24 void TIMER0_IRQHandler ();
25 void TIMER1_IRQHandler ();
26 void TIMER2_IRQHandler ();
27 void RTC0_IRQHandler ();
28 void TEMP_IRQHandler ();
29 void RNG_IRQHandler ();
30 void ECB_IRQHandler ();
31 void CCM_AAR_IRQHandler ();
32 void WDT_IRQHandler ();
33 void RTC1_IRQHandler ();
34 void QDEC_IRQHandler ();
35 void COMP_LPCOMP_IRQHandler ();
36 void SWI0_EGU0_IRQHandler ();
37 void SWI1_EGU1_IRQHandler ();
38 void SWI2_EGU2_IRQHandler ();
39 void SWI3_EGU3_IRQHandler ();
40 void SWI4_EGU4_IRQHandler ();
41 void SWI5_EGU5_IRQHandler ();
42 void TIMER3_IRQHandler ();
43 void TIMER4_IRQHandler ();
44 void PWM0_IRQHandler ();
45 void PDM_IRQHandler ();
46 void MWU_IRQHandler ();
47 void PWM1_IRQHandler ();
48 void PWM2_IRQHandler ();
49 void SPIM2_SPIS2_SPI2_IRQHandler ();
50 void RTC2_IRQHandler ();
51 void I2S_IRQHandler ();
52 void FPU_IRQHandler ();
59 using FICR_Type = peripheral<NRF_FICR_Type>;
60 static constexpr FICR_Type FICR{NRF_FICR_BASE};
62 using UICR_Type = peripheral<NRF_UICR_Type>;
63 static constexpr UICR_Type UICR{NRF_UICR_BASE};
65 using BPROT_Type = peripheral<NRF_BPROT_Type>;
66 static constexpr BPROT_Type BPROT{NRF_BPROT_BASE};
68 using POWER_Type = peripheral<NRF_POWER_Type>;
69 static constexpr POWER_Type POWER{NRF_POWER_BASE, POWER_CLOCK_IRQn};
71 using CLOCK_Type = peripheral<NRF_CLOCK_Type>;
72 static constexpr CLOCK_Type CLOCK{NRF_CLOCK_BASE, POWER_CLOCK_IRQn};
74 using RADIO_Type = peripheral<NRF_RADIO_Type>;
75 static constexpr RADIO_Type RADIO{NRF_RADIO_BASE, RADIO_IRQn};
77 using UARTE_Type = peripheral<NRF_UARTE_Type>;
78 static constexpr UARTE_Type UARTE0{NRF_UARTE0_BASE, UARTE0_UART0_IRQn};
80 using UART_Type = peripheral<NRF_UART_Type>;
81 static constexpr UART_Type UART0{NRF_UART0_BASE, UARTE0_UART0_IRQn};
83 using SPIM_Type = peripheral<NRF_SPIM_Type>;
84 static constexpr SPIM_Type SPIM0{NRF_SPIM0_BASE, SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQn, 0};
85 static constexpr SPIM_Type SPIM1{NRF_SPIM1_BASE, SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn, 1};
86 static constexpr SPIM_Type SPIM2{NRF_SPIM2_BASE, SPIM2_SPIS2_SPI2_IRQn, 2};
88 using SPIS_Type = peripheral<NRF_SPIS_Type>;
89 static constexpr SPIS_Type SPIS0{NRF_SPIS0_BASE, SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQn, 0};
90 static constexpr SPIS_Type SPIS1{NRF_SPIS1_BASE, SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn, 1};
91 static constexpr SPIS_Type SPIS2{NRF_SPIS2_BASE, SPIM2_SPIS2_SPI2_IRQn, 2};
93 using SPI_Type = peripheral<NRF_SPI_Type>;
94 static constexpr SPI_Type SPI0{NRF_SPI0_BASE, SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQn, 0};
95 static constexpr SPI_Type SPI1{NRF_SPI1_BASE, SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn, 1};
96 static constexpr SPI_Type SPI2{NRF_SPI2_BASE, SPIM2_SPIS2_SPI2_IRQn, 2};
98 using TWIM_Type = peripheral<NRF_TWIM_Type>;
99 static constexpr TWIM_Type TWIM0{NRF_TWIM0_BASE, SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQn, 0};
100 static constexpr TWIM_Type TWIM1{NRF_TWIM1_BASE, SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn, 1};
102 using TWIS_Type = peripheral<NRF_TWIS_Type>;
103 static constexpr TWIS_Type TWIS0{NRF_TWIS0_BASE, SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQn, 0};
104 static constexpr TWIS_Type TWIS1{NRF_TWIS1_BASE, SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn, 1};
106 using TWI_Type = peripheral<NRF_TWI_Type>;
107 static constexpr TWI_Type TWI0{NRF_TWI0_BASE, SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQn, 0};
108 static constexpr TWI_Type TWI1{NRF_TWI1_BASE, SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn, 1};
110 using NFCT_Type = peripheral<NRF_NFCT_Type>;
111 static constexpr NFCT_Type NFCT{NRF_NFCT_BASE, NFCT_IRQn};
113 using GPIOTE_Type = peripheral<NRF_GPIOTE_Type>;
116 using SAADC_Type = peripheral<NRF_SAADC_Type>;
118 static constexpr
auto& ADCVariant = SAADC;
119 #define ADCSeriesVariant_IRQHandler SAADC_IRQHandler 121 using TIMER_Type = peripheral<NRF_TIMER_Type>;
122 static constexpr TIMER_Type TIMER0{NRF_TIMER0_BASE, TIMER0_IRQn, 0, 4};
123 static constexpr TIMER_Type TIMER1{NRF_TIMER1_BASE, TIMER1_IRQn, 1, 4};
124 static constexpr TIMER_Type TIMER2{NRF_TIMER2_BASE, TIMER2_IRQn, 2, 4};
125 static constexpr TIMER_Type TIMER3{NRF_TIMER3_BASE, TIMER3_IRQn, 3, 6};
126 static constexpr TIMER_Type TIMER4{NRF_TIMER4_BASE, TIMER4_IRQn, 4, 6};
128 using RTC_Type = peripheral<NRF_RTC_Type>;
129 static constexpr RTC_Type RTC0{NRF_RTC0_BASE, RTC0_IRQn, 0, 3};
130 static constexpr RTC_Type RTC1{NRF_RTC1_BASE, RTC1_IRQn, 1, 4};
131 static constexpr RTC_Type RTC2{NRF_RTC2_BASE, RTC2_IRQn, 2, 4};
132 #define UPTIME_RTC_IRQHandler RTC1_IRQHandler 133 static constexpr
const RTC_Type& UPTIME_RTC{RTC1};
135 using TEMP_Type = peripheral<NRF_TEMP_Type>;
136 static constexpr TEMP_Type TEMP{NRF_TEMP_BASE, TEMP_IRQn};
138 using RNG_Type = peripheral<NRF_RNG_Type>;
139 static constexpr RNG_Type RNG{NRF_RNG_BASE, RNG_IRQn};
141 using ECB_Type = peripheral<NRF_ECB_Type>;
142 static constexpr ECB_Type ECB{NRF_ECB_BASE, ECB_IRQn};
144 using CCM_Type = peripheral<NRF_CCM_Type>;
145 static constexpr CCM_Type CCM{NRF_CCM_BASE, CCM_AAR_IRQn};
147 using AAR_Type = peripheral<NRF_AAR_Type>;
148 static constexpr AAR_Type AAR{NRF_AAR_BASE, CCM_AAR_IRQn};
150 using WDT_Type = peripheral<NRF_WDT_Type>;
151 static constexpr WDT_Type WDT{NRF_WDT_BASE, WDT_IRQn};
153 using QDEC_Type = peripheral<NRF_QDEC_Type>;
154 static constexpr QDEC_Type QDEC{NRF_QDEC_BASE, QDEC_IRQn};
156 using COMP_Type = peripheral<NRF_COMP_Type>;
157 static constexpr COMP_Type COMP{NRF_COMP_BASE, COMP_LPCOMP_IRQn};
159 using LPCOMP_Type = peripheral<NRF_LPCOMP_Type>;
160 static constexpr LPCOMP_Type LPCOMP{NRF_LPCOMP_BASE, COMP_LPCOMP_IRQn};
162 using SWI_Type = peripheral<NRF_SWI_Type>;
163 static constexpr SWI_Type SWI0{NRF_SWI0_BASE, SWI0_EGU0_IRQn, 0};
164 static constexpr SWI_Type SWI1{NRF_SWI1_BASE, SWI1_EGU1_IRQn, 1};
165 static constexpr SWI_Type SWI2{NRF_SWI2_BASE, SWI2_EGU2_IRQn, 2};
166 static constexpr SWI_Type SWI3{NRF_SWI3_BASE, SWI3_EGU3_IRQn, 3};
167 static constexpr SWI_Type SWI4{NRF_SWI4_BASE, SWI4_EGU4_IRQn, 4};
168 static constexpr SWI_Type SWI5{NRF_SWI5_BASE, SWI5_EGU5_IRQn, 5};
170 using EGU_Type = peripheral<NRF_EGU_Type>;
171 static constexpr EGU_Type EGU0{NRF_EGU0_BASE, SWI0_EGU0_IRQn, 0};
172 static constexpr EGU_Type EGU1{NRF_EGU1_BASE, SWI1_EGU1_IRQn, 1};
173 static constexpr EGU_Type EGU2{NRF_EGU2_BASE, SWI2_EGU2_IRQn, 2};
174 static constexpr EGU_Type EGU3{NRF_EGU3_BASE, SWI3_EGU3_IRQn, 3};
175 static constexpr EGU_Type EGU4{NRF_EGU4_BASE, SWI4_EGU4_IRQn, 4};
176 static constexpr EGU_Type EGU5{NRF_EGU5_BASE, SWI5_EGU5_IRQn, 5};
178 using PWM_Type = peripheral<NRF_PWM_Type>;
179 static constexpr PWM_Type PWM0{NRF_PWM0_BASE, PWM0_IRQn, 0};
180 static constexpr PWM_Type PWM1{NRF_PWM1_BASE, PWM1_IRQn, 1};
181 static constexpr PWM_Type PWM2{NRF_PWM2_BASE, PWM2_IRQn, 2};
183 using PDM_Type = peripheral<NRF_PDM_Type>;
184 static constexpr PDM_Type PDM0{NRF_PDM_BASE, PDM_IRQn};
186 using NVMC_Type = peripheral<NRF_NVMC_Type>;
187 static constexpr NVMC_Type NVMC{NRF_NVMC_BASE};
189 struct PPI_Type :
public peripheral<NRF_PPI_Type>
209 static constexpr PPI_Type PPI{};
211 using MWU_Type = peripheral<NRF_MWU_Type>;
212 static constexpr MWU_Type MWU{NRF_MWU_BASE, MWU_IRQn};
214 using I2S_Type = peripheral<NRF_I2S_Type>;
215 static constexpr I2S_Type I2S{NRF_I2S_BASE, I2S_IRQn};
219 using FPU_Type = peripheral<NRF_FPU_Type>;
220 static constexpr FPU_Type FPU{NRF_FPU_BASE, FPU_IRQn};
223 using GPIO_Type = peripheral<NRF_GPIO_Type>;
226 static constexpr
const GPIO_Type& GPIO{P0};
229 struct GPIO_Instance<0>
231 static constexpr
const GPIO_Type& peripheral{P0};
232 static constexpr
int begin_psel = 0;
233 static constexpr
int end_psel = begin_psel + P0.
AUX;