1 /***************************************************************************//**
2 * @file
3 * @brief Peripheral Reflex System (PRS) peripheral API
4 *******************************************************************************
5 * # License
6 * <b>Copyright 2018 Silicon Laboratories Inc. www.silabs.com</b>
7 *******************************************************************************
8 *
9 * SPDX-License-Identifier: Zlib
10 *
11 * The licensor of this software is Silicon Laboratories Inc.
12 *
13 * This software is provided 'as-is', without any express or implied
14 * warranty. In no event will the authors be held liable for any damages
15 * arising from the use of this software.
16 *
17 * Permission is granted to anyone to use this software for any purpose,
18 * including commercial applications, and to alter it and redistribute it
19 * freely, subject to the following restrictions:
20 *
21 * 1. The origin of this software must not be misrepresented; you must not
22 * claim that you wrote the original software. If you use this software
23 * in a product, an acknowledgment in the product documentation would be
24 * appreciated but is not required.
25 * 2. Altered source versions must be plainly marked as such, and must not be
26 * misrepresented as being the original software.
27 * 3. This notice may not be removed or altered from any source distribution.
28 *
29 ******************************************************************************/
30
31 #ifndef EM_PRS_H
32 #define EM_PRS_H
33
34 #include "em_device.h"
35 #include "em_gpio.h"
36
37 #include <stdbool.h>
38 #include <stddef.h>
39
40 #if defined(PRS_COUNT) && (PRS_COUNT > 0)
41
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45
46 /***************************************************************************//**
47 * @addtogroup prs
48 * @{
49 ******************************************************************************/
50
51 /*******************************************************************************
52 ******************************* DEFINES ***********************************
53 ******************************************************************************/
54
55 #if defined(_SILICON_LABS_32B_SERIES_2)
56 /** PRS Synchronous channel count. */
57 #define PRS_SYNC_CHAN_COUNT PRS_SYNC_CH_NUM
58 /** PRS Asynchronous channel count. */
59 #define PRS_ASYNC_CHAN_COUNT PRS_ASYNC_CH_NUM
60 #elif defined(_EFM32_GECKO_FAMILY)
61 /** PRS Synchronous channel count. */
62 #define PRS_SYNC_CHAN_COUNT PRS_CHAN_COUNT
63 /** PRS Asynchronous channel count. */
64 #define PRS_ASYNC_CHAN_COUNT 0
65 #else
66 /** PRS Synchronous channel count. */
67 #define PRS_SYNC_CHAN_COUNT PRS_CHAN_COUNT
68 /** PRS Asynchronous channel count. */
69 #define PRS_ASYNC_CHAN_COUNT PRS_CHAN_COUNT
70 #endif
71
72 #if !defined(_EFM32_GECKO_FAMILY)
73 /** PRS asynchronous support */
74 #define PRS_ASYNC_SUPPORTED 1
75 #endif
76
77 /** @cond DO_NOT_INCLUDE_WITH_DOXYGEN */
78 /* Some devices have renamed signals so some of these signals are mapped to
79 common names. */
80 #if defined(PRS_USART0_RXDATAV)
81 #define PRS_USART0_RXDATA PRS_USART0_RXDATAV
82 #endif
83 #if defined(PRS_USART1_RXDATAV)
84 #define PRS_USART1_RXDATA PRS_USART1_RXDATAV
85 #endif
86 #if defined(PRS_USART2_RXDATAV)
87 #define PRS_USART2_RXDATA PRS_USART2_RXDATAV
88 #endif
89 #if defined(PRS_BURTC_OVERFLOW)
90 #define PRS_BURTC_OF PRS_BURTC_OVERFLOW
91 #endif
92 #if defined(PRS_BURTC_COMP0)
93 #define PRS_BURTC_COMP PRS_BURTC_COMP0
94 #endif
95 /** @endcond */
96
97 /*******************************************************************************
98 ******************************** ENUMS ************************************
99 ******************************************************************************/
100
101 /** PRS Channel type. */
102 typedef enum {
103 prsTypeAsync, /**< Asynchronous channel type. */
104 prsTypeSync /**< Synchronous channel type.*/
105 } PRS_ChType_t;
106
107 /** Edge detection type. */
108 typedef enum {
109 prsEdgeOff, /**< Leave signal as is. */
110 prsEdgePos, /**< Generate pulses on positive edge. */
111 prsEdgeNeg, /**< Generate pulses on negative edge. */
112 prsEdgeBoth /**< Generate pulses on both edges. */
113 } PRS_Edge_TypeDef;
114
115 #if defined(_PRS_ASYNC_CH_CTRL_FNSEL_MASK)
116 /** Logic functions that can be used when combining two PRS channels. */
117 typedef enum {
118 prsLogic_Zero = _PRS_ASYNC_CH_CTRL_FNSEL_LOGICAL_ZERO, /**< Logical 0. */
119 prsLogic_A_NOR_B = _PRS_ASYNC_CH_CTRL_FNSEL_A_NOR_B, /**< A NOR B. */
120 prsLogic_NOT_A_AND_B = _PRS_ASYNC_CH_CTRL_FNSEL_NOT_A_AND_B, /**< (!A) NOR B. */
121 prsLogic_NOT_A = _PRS_ASYNC_CH_CTRL_FNSEL_NOT_A, /**< !A. */
122 prsLogic_A_AND_NOT_B = _PRS_ASYNC_CH_CTRL_FNSEL_A_AND_NOT_B, /**< A AND (!B). */
123 prsLogic_NOT_B = _PRS_ASYNC_CH_CTRL_FNSEL_NOT_B, /**< !B. */
124 prsLogic_A_XOR_B = _PRS_ASYNC_CH_CTRL_FNSEL_A_XOR_B, /**< A XOR B. */
125 prsLogic_A_NAND_B = _PRS_ASYNC_CH_CTRL_FNSEL_A_NAND_B, /**< A NAND B. */
126 prsLogic_A_AND_B = _PRS_ASYNC_CH_CTRL_FNSEL_A_AND_B, /**< A AND B. */
127 prsLogic_A_XNOR_B = _PRS_ASYNC_CH_CTRL_FNSEL_A_XNOR_B, /**< A XNOR B. */
128 prsLogic_B = _PRS_ASYNC_CH_CTRL_FNSEL_B, /**< B. */
129 prsLogic_NOT_A_OR_B = _PRS_ASYNC_CH_CTRL_FNSEL_NOT_A_OR_B, /**< (!A) OR B. */
130 prsLogic_A = _PRS_ASYNC_CH_CTRL_FNSEL_A, /**< A. */
131 prsLogic_A_OR_NOT_B = _PRS_ASYNC_CH_CTRL_FNSEL_A_OR_NOT_B, /**< A OR (!B). */
132 prsLogic_A_OR_B = _PRS_ASYNC_CH_CTRL_FNSEL_A_OR_B, /**< A OR B. */
133 prsLogic_One = _PRS_ASYNC_CH_CTRL_FNSEL_LOGICAL_ONE, /**< Logical 1. */
134 } PRS_Logic_t;
135 #endif
136
137 /** PRS Signal. */
138 typedef enum {
139 #if defined(_PRS_SYNC_CH_CTRL_SOURCESEL_MASK)
140 prsSignalNone = PRS_SYNC_CH_CTRL_SOURCESEL_DEFAULT | (0x0 << _PRS_SYNC_CH_CTRL_SIGSEL_SHIFT), /**< No Signal. */
141 prsSignalSW = PRS_SYNC_CH_CTRL_SOURCESEL_DEFAULT | (0x1 << _PRS_SYNC_CH_CTRL_SIGSEL_SHIFT), /**< Software-reserved Signal. */
142 #else
143 prsSignalNone = PRS_CH_CTRL_SOURCESEL_NONE | (0x0 << _PRS_CH_CTRL_SIGSEL_SHIFT), /**< No Signal. */
144 prsSignalSW = PRS_CH_CTRL_SOURCESEL_NONE | (0x1 << _PRS_CH_CTRL_SIGSEL_SHIFT), /**< Software-reserved Signal. */
145 #endif
146
147 #if defined(PRS_PRS_CH11)
148 prsSignalPRS_CH0 = PRS_PRS_CH0, /**< PRS_CH0 signal */
149 prsSignalPRS_CH1 = PRS_PRS_CH1, /**< PRS_CH1 signal */
150 prsSignalPRS_CH2 = PRS_PRS_CH2, /**< PRS_CH2 signal */
151 prsSignalPRS_CH3 = PRS_PRS_CH3, /**< PRS_CH3 signal */
152 prsSignalPRS_CH4 = PRS_PRS_CH4, /**< PRS_CH4 signal */
153 prsSignalPRS_CH5 = PRS_PRS_CH5, /**< PRS_CH5 signal */
154 prsSignalPRS_CH6 = PRS_PRS_CH6, /**< PRS_CH6 signal */
155 prsSignalPRS_CH7 = PRS_PRS_CH7, /**< PRS_CH7 signal */
156 prsSignalPRS_CH8 = PRS_PRS_CH8, /**< PRS_CH8 signal */
157 prsSignalPRS_CH9 = PRS_PRS_CH9, /**< PRS_CH9 signal */
158 prsSignalPRS_CH10 = PRS_PRS_CH10, /**< PRS_CH10 signal */
159 prsSignalPRS_CH11 = PRS_PRS_CH11, /**< PRS_CH11 signal */
160 #endif
161 #if defined(PRS_PRS_CH23)
162 prsSignalPRS_CH12 = PRS_PRS_CH12, /**< PRS_CH12 signal */
163 prsSignalPRS_CH13 = PRS_PRS_CH13, /**< PRS_CH13 signal */
164 prsSignalPRS_CH14 = PRS_PRS_CH14, /**< PRS_CH14 signal */
165 prsSignalPRS_CH15 = PRS_PRS_CH15, /**< PRS_CH15 signal */
166 prsSignalPRS_CH16 = PRS_PRS_CH16, /**< PRS_CH16 signal */
167 prsSignalPRS_CH17 = PRS_PRS_CH17, /**< PRS_CH17 signal */
168 prsSignalPRS_CH18 = PRS_PRS_CH18, /**< PRS_CH18 signal */
169 prsSignalPRS_CH19 = PRS_PRS_CH19, /**< PRS_CH19 signal */
170 prsSignalPRS_CH20 = PRS_PRS_CH20, /**< PRS_CH20 signal */
171 prsSignalPRS_CH21 = PRS_PRS_CH21, /**< PRS_CH21 signal */
172 prsSignalPRS_CH22 = PRS_PRS_CH22, /**< PRS_CH22 signal */
173 prsSignalPRS_CH23 = PRS_PRS_CH23, /**< PRS_CH23 signal */
174 #endif
175
176 #if defined(PRS_ADC0_SINGLE)
177 prsSignalADC0_SINGLE = PRS_ADC0_SINGLE, /**< ADC0_SINGLE signal */
178 prsSignalADC0_SCAN = PRS_ADC0_SCAN, /**< ADC0_SCAN signal */
179 #endif
180 #if defined(PRS_ADC1_SINGLE)
181 prsSignalADC1_SINGLE = PRS_ADC1_SINGLE, /**< ADC1_SINGLE signal */
182 prsSignalADC1_SCAN = PRS_ADC1_SCAN, /**< ADC1_SCAN signal */
183 #endif
184
185 /* Timer Signals */
186 #if defined(TIMER0)
187 prsSignalTIMER0_UF = PRS_TIMER0_UF, /**< TIMER0 underflow Signal. */
188 prsSignalTIMER0_OF = PRS_TIMER0_OF, /**< TIMER0 overflow Signal. */
189 prsSignalTIMER0_CC0 = PRS_TIMER0_CC0, /**< TIMER0 capture/compare channel 0 Signal. */
190 prsSignalTIMER0_CC1 = PRS_TIMER0_CC1, /**< TIMER0 capture/compare channel 1 Signal. */
191 prsSignalTIMER0_CC2 = PRS_TIMER0_CC2, /**< TIMER0 capture/compare channel 2 Signal. */
192 #endif
193 #if defined(TIMER1)
194 prsSignalTIMER1_UF = PRS_TIMER1_UF, /**< TIMER1 underflow Signal. */
195 prsSignalTIMER1_OF = PRS_TIMER1_OF, /**< TIMER1 overflow Signal. */
196 prsSignalTIMER1_CC0 = PRS_TIMER1_CC0, /**< TIMER1 capture/compare channel 0 Signal. */
197 prsSignalTIMER1_CC1 = PRS_TIMER1_CC1, /**< TIMER1 capture/compare channel 1 Signal. */
198 prsSignalTIMER1_CC2 = PRS_TIMER1_CC2, /**< TIMER1 capture/compare channel 2 Signal. */
199 #endif
200 #if defined(TIMER2)
201 prsSignalTIMER2_UF = PRS_TIMER2_UF, /**< TIMER2 underflow Signal. */
202 prsSignalTIMER2_OF = PRS_TIMER2_OF, /**< TIMER2 overflow Signal. */
203 prsSignalTIMER2_CC0 = PRS_TIMER2_CC0, /**< TIMER2 capture/compare channel 0 Signal. */
204 prsSignalTIMER2_CC1 = PRS_TIMER2_CC1, /**< TIMER2 capture/compare channel 1 Signal. */
205 prsSignalTIMER2_CC2 = PRS_TIMER2_CC2, /**< TIMER2 capture/compare channel 2 Signal. */
206 #endif
207 #if defined(TIMER3)
208 prsSignalTIMER3_UF = PRS_TIMER3_UF, /**< TIMER3 underflow Signal. */
209 prsSignalTIMER3_OF = PRS_TIMER3_OF, /**< TIMER3 overflow Signal. */
210 prsSignalTIMER3_CC0 = PRS_TIMER3_CC0, /**< TIMER3 capture/compare channel 0 Signal. */
211 prsSignalTIMER3_CC1 = PRS_TIMER3_CC1, /**< TIMER3 capture/compare channel 1 Signal. */
212 prsSignalTIMER3_CC2 = PRS_TIMER3_CC2, /**< TIMER3 capture/compare channel 2 Signal. */
213 #if defined(PRS_TIMER1_CC3)
214 prsSignalTIMER1_CC3 = PRS_TIMER1_CC3, /**< TIMER3 capture/compare channel 3 Signal. */
215 #endif
216 #endif
217 #if defined(TIMER4)
218 prsSignalTIMER4_UF = PRS_TIMER4_UF, /**< TIMER4 underflow Signal. */
219 prsSignalTIMER4_OF = PRS_TIMER4_OF, /**< TIMER4 overflow Signal. */
220 prsSignalTIMER4_CC0 = PRS_TIMER4_CC0, /**< TIMER4 capture/compare channel 0 Signal. */
221 prsSignalTIMER4_CC1 = PRS_TIMER4_CC1, /**< TIMER4 capture/compare channel 1 Signal. */
222 prsSignalTIMER4_CC2 = PRS_TIMER4_CC2, /**< TIMER4 capture/compare channel 2 Signal. */
223 #endif
224 #if defined(TIMER5)
225 prsSignalTIMER5_UF = PRS_TIMER5_UF, /**< TIMER5 underflow Signal. */
226 prsSignalTIMER5_OF = PRS_TIMER5_OF, /**< TIMER5 overflow Signal. */
227 prsSignalTIMER5_CC0 = PRS_TIMER5_CC0, /**< TIMER5 capture/compare channel 0 Signal. */
228 prsSignalTIMER5_CC1 = PRS_TIMER5_CC1, /**< TIMER5 capture/compare channel 1 Signal. */
229 prsSignalTIMER5_CC2 = PRS_TIMER5_CC2, /**< TIMER5 capture/compare channel 2 Signal. */
230 #endif
231 #if defined(TIMER6)
232 prsSignalTIMER6_UF = PRS_TIMER6_UF, /**< TIMER6 underflow Signal. */
233 prsSignalTIMER6_OF = PRS_TIMER6_OF, /**< TIMER6 overflow Signal. */
234 prsSignalTIMER6_CC0 = PRS_TIMER6_CC0, /**< TIMER6 capture/compare channel 0 Signal. */
235 prsSignalTIMER6_CC1 = PRS_TIMER6_CC1, /**< TIMER6 capture/compare channel 1 Signal. */
236 prsSignalTIMER6_CC2 = PRS_TIMER6_CC2, /**< TIMER6 capture/compare channel 2 Signal. */
237 #endif
238 #if defined(TIMER7)
239 prsSignalTIMER7_UF = PRS_TIMER7_UF, /**< TIMER7 underflow Signal. */
240 prsSignalTIMER7_OF = PRS_TIMER7_OF, /**< TIMER7 overflow Signal. */
241 prsSignalTIMER7_CC0 = PRS_TIMER7_CC0, /**< TIMER7 capture/compare channel 0 Signal. */
242 prsSignalTIMER7_CC1 = PRS_TIMER7_CC1, /**< TIMER7 capture/compare channel 1 Signal. */
243 prsSignalTIMER7_CC2 = PRS_TIMER7_CC2, /**< TIMER7 capture/compare channel 2 Signal. */
244 #endif
245 #if defined(PRS_LETIMER0_CH0)
246 prsSignalLETIMER0_CH0 = PRS_LETIMER0_CH0, /**< LETIMER0 channel 0 Signal. */
247 prsSignalLETIMER0_CH1 = PRS_LETIMER0_CH1, /**< LETIMER0 channel 1 Signal. */
248 #endif
249 #if defined(PRS_LETIMER1_CH0)
250 prsSignalLETIMER1_CH0 = PRS_LETIMER1_CH0, /**< LETIMER1 channel 0 Signal. */
251 prsSignalLETIMER1_CH1 = PRS_LETIMER1_CH1, /**< LETIMER1 channel 1 Signal. */
252 #endif
253 #if defined(PRS_PCNT0_TCC)
254 prsSignalPCNT0_TCC = PRS_PCNT0_TCC, /**< PCNT0_TCC Signal. */
255 #endif
256 #if defined(PRS_PCNT0_UFOF)
257 prsSignalPCNT0_UFOF = PRS_PCNT0_UFOF, /**< PCNT0_TCC Signal. */
258 prsSignalPCNT0_DIR = PRS_PCNT0_DIR, /**< PCNT0_TCC Signal. */
259 #endif
260 #if defined(PRS_PCNT1_TCC)
261 prsSignalPCNT1_TCC = PRS_PCNT1_TCC, /**< PCNT1_TCC Signal. */
262 prsSignalPCNT1_UFOF = PRS_PCNT1_UFOF, /**< PCNT1_TCC Signal. */
263 prsSignalPCNT1_DIR = PRS_PCNT1_DIR, /**< PCNT1_TCC Signal. */
264 #endif
265 #if defined(PRS_PCNT2_TCC)
266 prsSignalPCNT2_TCC = PRS_PCNT2_TCC, /**< PCNT2_TCC Signal. */
267 prsSignalPCNT2_UFOF = PRS_PCNT2_UFOF, /**< PCNT2_TCC Signal. */
268 prsSignalPCNT2_DIR = PRS_PCNT2_DIR, /**< PCNT2_TCC Signal. */
269 #endif
270 #if defined(PRS_CRYOTIMER_PERIOD)
271 prsSignalCRYOTIMER_PERIOD = PRS_CRYOTIMER_PERIOD, /**< CRYOTIMER_PERIOD Signal. */
272 #endif
273 #if defined(PRS_CORE_CTIOUT0)
274 prsSignalCORE_CTIOUT0 = PRS_CORE_CTIOUT0, /**< CORE CTIOUT0 Signal. */
275 prsSignalCORE_CTIOUT1 = PRS_CORE_CTIOUT1, /**< CORE CTIOUT1 Signal. */
276 prsSignalCORE_CTIOUT2 = PRS_CORE_CTIOUT2, /**< CORE CTIOUT2 Signal. */
277 prsSignalCORE_CTIOUT3 = PRS_CORE_CTIOUT3, /**< CORE CTIOUT3 Signal. */
278 #endif
279 #if defined(PRS_CMUL_CLKOUT0)
280 prsSignalCMUL_CLKOUT0 = PRS_CMUL_CLKOUT0, /**< CMU CLKOUT0 Signal. */
281 prsSignalCMUL_CLKOUT1 = PRS_CMUL_CLKOUT1, /**< CMU CLKOUT1 Signal. */
282 prsSignalCMUL_CLKOUT2 = PRS_CMUL_CLKOUT2, /**< CMU CLKOUT2 Signal. */
283 #endif
284 #if defined(PRS_PRSL_ASYNCH0)
285 prsSignalPRSL_ASYNCH0 = PRS_PRSL_ASYNCH0, /**< PRS channel 0 Signal. */
286 prsSignalPRSL_ASYNCH1 = PRS_PRSL_ASYNCH1, /**< PRS channel 1 Signal. */
287 prsSignalPRSL_ASYNCH2 = PRS_PRSL_ASYNCH2, /**< PRS channel 2 Signal. */
288 prsSignalPRSL_ASYNCH3 = PRS_PRSL_ASYNCH3, /**< PRS channel 3 Signal. */
289 prsSignalPRSL_ASYNCH4 = PRS_PRSL_ASYNCH4, /**< PRS channel 4 Signal. */
290 prsSignalPRSL_ASYNCH5 = PRS_PRSL_ASYNCH5, /**< PRS channel 5 Signal. */
291 prsSignalPRSL_ASYNCH6 = PRS_PRSL_ASYNCH6, /**< PRS channel 6 Signal. */
292 prsSignalPRSL_ASYNCH7 = PRS_PRSL_ASYNCH7, /**< PRS channel 7 Signal. */
293 prsSignalPRS_ASYNCH8 = PRS_PRS_ASYNCH8, /**< PRS channel 8 Signal. */
294 prsSignalPRS_ASYNCH9 = PRS_PRS_ASYNCH9, /**< PRS channel 9 Signal. */
295 prsSignalPRS_ASYNCH10 = PRS_PRS_ASYNCH10, /**< PRS channel 10 Signal. */
296 prsSignalPRS_ASYNCH11 = PRS_PRS_ASYNCH11, /**< PRS channel 11 Signal. */
297 #endif
298
299 /* RTC/RTCC/SYSRTC/BURTC Signals */
300 #if defined(PRS_RTC_OF)
301 prsSignalRTC_OF = PRS_RTC_OF, /**< RTC_OF signal. */
302 prsSignalRTC_COMP0 = PRS_RTC_COMP0, /**< RTC_COMP0 signal. */
303 prsSignalRTC_COMP1 = PRS_RTC_COMP1, /**< RTC_COMP1 signal. */
304 #if defined(PRS_RTC_COMP5)
305 prsSignalRTC_COMP2 = PRS_RTC_COMP2, /**< RTC_COMP2 signal. */
306 prsSignalRTC_COMP3 = PRS_RTC_COMP3, /**< RTC_COMP3 signal. */
307 prsSignalRTC_COMP4 = PRS_RTC_COMP4, /**< RTC_COMP4 signal. */
308 prsSignalRTC_COMP5 = PRS_RTC_COMP5, /**< RTC_COMP5 signal. */
309 #endif
310 #endif
311 #if defined(RTCC)
312 prsSignalRTCC_CCV0 = PRS_RTCC_CCV0, /**< RTCC capture/compare channel 0 Signal. */
313 prsSignalRTCC_CCV1 = PRS_RTCC_CCV1, /**< RTCC capture/compare channel 1 Signal. */
314 prsSignalRTCC_CCV2 = PRS_RTCC_CCV2, /**< RTCC capture/compare channel 2 Signal. */
315 #endif
316 #if defined(BURTC)
317 prsSignalBURTC_COMP = PRS_BURTC_COMP, /**< BURTC compare Signal. */
318 prsSignalBURTC_OF = PRS_BURTC_OF, /**< BURTC overflow Signal. */
319 #endif
320 #if defined(SYSRTC0)
321 prsSignalSYSRTC0_GRP0OUT0 = PRS_SYSRTC0_GRP0OUT0, /**< SYSRTC GRP0OUT0 Signal. */
322 prsSignalSYSRTC0_GRP0OUT1 = PRS_SYSRTC0_GRP0OUT1, /**< SYSRTC GRP0OUT1 Signal. */
323 prsSignalSYSRTC0_GRP1OUT0 = PRS_SYSRTC0_GRP1OUT0, /**< SYSRTC GRP1OUT0 Signal. */
324 prsSignalSYSRTC0_GRP1OUT1 = PRS_SYSRTC0_GRP1OUT1, /**< SYSRTC GRP1OUT1 Signal. */
325 #endif
326 #if defined(PRS_HFXO0L_STATUS)
327 prsSignalHFXO0L_STATUS = PRS_HFXO0L_STATUS, /**< HFXO0L_STATUS Signal. */
328 prsSignalHFXO0L_STATUS1 = PRS_HFXO0L_STATUS1, /**< HFXO0L_STATUS1 Signal. */
329 #endif
330 #if defined(PRS_HFRCO0_COREEN)
331 prsSignalHFRCO0_COREEN = PRS_HFRCO0_COREEN, /**< HFRCO0_COREEN Signal. */
332 prsSignalHFRCO0_STATE0 = PRS_HFRCO0_STATE0, /**< HFRCO0_STATE0 Signal. */
333 prsSignalHFRCO0_STATE1 = PRS_HFRCO0_STATE1, /**< HFRCO0_STATE1 Signal. */
334 prsSignalHFRCO0_STATE2 = PRS_HFRCO0_STATE2, /**< HFRCO0_STATE2 Signal. */
335 #endif
336 #if defined(PRS_HFRCOEM23_COREEN)
337 prsSignalHFRCOEM23_COREEN = PRS_HFRCOEM23_COREEN, /**< HFRCOEM23_COREEN Signal. */
338 prsSignalHFRCOEM23_STATE0 = PRS_HFRCOEM23_STATE0, /**< HFRCOEM23_STATE0 Signal. */
339 prsSignalHFRCOEM23_STATE1 = PRS_HFRCOEM23_STATE1, /**< HFRCOEM23_STATE1 Signal. */
340 prsSignalHFRCOEM23_STATE2 = PRS_HFRCOEM23_STATE2, /**< HFRCOEM23_STATE2 Signal. */
341 #endif
342
343 /* ACMP Signals */
344 #if defined(ACMP0)
345 prsSignalACMP0_OUT = PRS_ACMP0_OUT, /**< ACMP0 Signal. */
346 #endif
347 #if defined(ACMP1)
348 prsSignalACMP1_OUT = PRS_ACMP1_OUT, /**< ACMP1 output Signal. */
349 #endif
350 #if defined(ACMP2)
351 prsSignalACMP2_OUT = PRS_ACMP2_OUT, /**< ACMP2 output Signal. */
352 #endif
353 #if defined(ACMP3)
354 prsSignalACMP3_OUT = PRS_ACMP3_OUT, /**< ACMP3 output Signal. */
355 #endif
356
357 /* VDAC Signals */
358 #if defined(VDAC0) & (_SILICON_LABS_32B_SERIES >= 2)
359 prsSignalVDAC0_CH0WARM = PRS_VDAC0L_CH0WARM, /**< VDAC0 channel 0 warmed Signal. */
360 prsSignalVDAC0_CH1WARM = PRS_VDAC0L_CH1WARM, /**< VDAC0 channel 1 warmed Signal. */
361 prsSignalVDAC0_CH0DONE = PRS_VDAC0L_CH0DONEASYNC, /**< VDAC0 channel 0 conversion done Signal. */
362 prsSignalVDAC0_CH1DONE = PRS_VDAC0L_CH1DONEASYNC, /**< VDAC0 channel 1 conversion done Signal. */
363 prsSignalVDAC0_INTERNALTIMEROF = PRS_VDAC0L_INTERNALTIMEROF, /**< VDAC0 internal timer overflow Signal. */
364 prsSignalVDAC0_REFRESHTIMEROF = PRS_VDAC0L_REFRESHTIMEROF, /**< VDAC0 internal timer overflow Signal. */
365 #endif
366 #if defined(PRS_VDAC0_OPA3)
367 prsSignalVDAC0_CH0 = PRS_VDAC0_CH0, /**< VDAC0_CH0 Signal. */
368 prsSignalVDAC0_CH1 = PRS_VDAC0_CH1, /**< VDAC0_CH1 Signal. */
369 prsSignalVDAC0_OPA0 = PRS_VDAC0_OPA0, /**< VDAC0_OPA0 Signal. */
370 prsSignalVDAC0_OPA1 = PRS_VDAC0_OPA1, /**< VDAC0_OPA1 Signal. */
371 prsSignalVDAC0_OPA2 = PRS_VDAC0_OPA2, /**< VDAC0_OPA2 Signal. */
372 prsSignalVDAC0_OPA3 = PRS_VDAC0_OPA3, /**< VDAC0_OPA3 Signal. */
373 #endif
374 #if defined(VDAC1) & (_SILICON_LABS_32B_SERIES >= 2)
375 prsSignalVDAC1_CH0WARM = PRS_VDAC1L_CH0WARM, /**< VDAC1 channel 0 warmed Signal. */
376 prsSignalVDAC1_CH1WARM = PRS_VDAC1L_CH1WARM, /**< VDAC1 channel 1 warmed Signal. */
377 prsSignalVDAC1_CH0DONE = PRS_VDAC1L_CH0DONEASYNC, /**< VDAC1 channel 0 conversion done Signal. */
378 prsSignalVDAC1_CH1DONE = PRS_VDAC1L_CH1DONEASYNC, /**< VDAC1 channel 1 conversion done Signal. */
379 prsSignalVDAC1_INTERNALTIMEROF = PRS_VDAC1L_INTERNALTIMEROF, /**< VDAC1 internal timer overflow Signal. */
380 prsSignalVDAC1_REFRESHTIMEROF = PRS_VDAC1L_REFRESHTIMEROF, /**< VDAC1 internal timer overflow Signal. */
381 #endif
382
383 #if defined(PRS_LESENSE_SCANRES15)
384 prsSignalLESENSE_SCANRES0 = PRS_LESENSE_SCANRES0, /**< LESENSE_SCANRES0 Signal. */
385 prsSignalLESENSE_SCANRES1 = PRS_LESENSE_SCANRES1, /**< LESENSE_SCANRES1 Signal. */
386 prsSignalLESENSE_SCANRES2 = PRS_LESENSE_SCANRES2, /**< LESENSE_SCANRES2 Signal. */
387 prsSignalLESENSE_SCANRES3 = PRS_LESENSE_SCANRES3, /**< LESENSE_SCANRES3 Signal. */
388 prsSignalLESENSE_SCANRES4 = PRS_LESENSE_SCANRES4, /**< LESENSE_SCANRES4 Signal. */
389 prsSignalLESENSE_SCANRES5 = PRS_LESENSE_SCANRES5, /**< LESENSE_SCANRES5 Signal. */
390 prsSignalLESENSE_SCANRES6 = PRS_LESENSE_SCANRES6, /**< LESENSE_SCANRES6 Signal. */
391 prsSignalLESENSE_SCANRES7 = PRS_LESENSE_SCANRES7, /**< LESENSE_SCANRES7 Signal. */
392 prsSignalLESENSE_SCANRES8 = PRS_LESENSE_SCANRES8, /**< LESENSE_SCANRES8 Signal. */
393 prsSignalLESENSE_SCANRES9 = PRS_LESENSE_SCANRES9, /**< LESENSE_SCANRES9 Signal. */
394 prsSignalLESENSE_SCANRES10 = PRS_LESENSE_SCANRES10, /**< LESENSE_SCANRES10 Signal. */
395 prsSignalLESENSE_SCANRES11 = PRS_LESENSE_SCANRES11, /**< LESENSE_SCANRES11 Signal. */
396 prsSignalLESENSE_SCANRES12 = PRS_LESENSE_SCANRES12, /**< LESENSE_SCANRES12 Signal. */
397 prsSignalLESENSE_SCANRES13 = PRS_LESENSE_SCANRES13, /**< LESENSE_SCANRES13 Signal. */
398 prsSignalLESENSE_SCANRES14 = PRS_LESENSE_SCANRES14, /**< LESENSE_SCANRES14 Signal. */
399 prsSignalLESENSE_SCANRES15 = PRS_LESENSE_SCANRES15, /**< LESENSE_SCANRES15 Signal. */
400 #endif
401 #if defined(PRS_LESENSE_DEC2)
402 prsSignalLESENSE_DEC0 = PRS_LESENSE_DEC0, /**< LESENSE_DEC0 Signal. */
403 prsSignalLESENSE_DEC1 = PRS_LESENSE_DEC1, /**< LESENSE_DEC1 Signal. */
404 prsSignalLESENSE_DEC2 = PRS_LESENSE_DEC2, /**< LESENSE_DEC2 Signal. */
405 #endif
406 #if defined(PRS_LESENSE_DECOUT2)
407 prsSignalLESENSE_DECOUT0 = PRS_LESENSE_DECOUT0, /**< LESENSE_DECOUT0 Signal. */
408 prsSignalLESENSE_DECOUT1 = PRS_LESENSE_DECOUT1, /**< LESENSE_DECOUT1 Signal. */
409 prsSignalLESENSE_DECOUT2 = PRS_LESENSE_DECOUT2, /**< LESENSE_DECOUT2 Signal. */
410 #endif
411 #if defined(PRS_LESENSE_DECCMP)
412 prsSignalLESENSE_DECCMP = PRS_LESENSE_DECCMP, /**< LESENSE_DECCMP Signal. */
413 #endif
414 #if defined(PRS_LESENSE_MEASACT)
415 prsSignalLESENSE_MEASACT = PRS_LESENSE_MEASACT, /**< LESENSE_MEASACT Signal. */
416 #endif
417
418 /* USART Signals */
419 #if defined(USART0)
420 prsSignalUSART0_TXC = PRS_USART0_TXC, /**< USART0 TX complete Signal. */
421 #if defined(PRS_USART0_RXDATA)
422 prsSignalUSART0_RXDATA = PRS_USART0_RXDATA, /**< USART0 RX data available Signal. */
423 #endif
424 #if defined(PRS_USART0_RXDATAV)
425 prsSignalUSART0_RXDATAV = PRS_USART0_RXDATAV, /**< USART0 RX data available Signal. */
426 #endif
427 #if defined(PRS_USART0_IRTX)
428 prsSignalUSART0_IRTX = PRS_USART0_IRTX, /**< USART0 IR TX Signal. */
429 #endif
430 #if defined(PRS_USART0_RTS)
431 prsSignalUSART0_RTS = PRS_USART0_RTS, /**< USART0 RTS Signal. */
432 prsSignalUSART0_TX = PRS_USART0_TX, /**< USART0 TX Signal. */
433 prsSignalUSART0_CS = PRS_USART0_CS, /**< USART0 chip select Signal. */
434 #endif
435 #endif
436 #if defined(USART1)
437 prsSignalUSART1_TXC = PRS_USART1_TXC, /**< USART1 TX complete Signal. */
438 #if defined(PRS_USART1_RXDATA)
439 prsSignalUSART1_RXDATA = PRS_USART1_RXDATA, /**< USART1 RX data available Signal. */
440 #endif
441 #if defined(PRS_USART1_RXDATAV)
442 prsSignalUSART1_RXDATAV = PRS_USART1_RXDATAV, /**< USART1 RX data available Signal. */
443 #endif
444 #if defined(PRS_USART1_IRTX)
445 prsSignalUSART1_IRTX = PRS_USART1_IRTX, /**< USART1 IR TX Signal. */
446 #endif
447 #if defined(PRS_USART1_RTS)
448 prsSignalUSART1_RTS = PRS_USART1_RTS, /**< USART1 RTS Signal. */
449 prsSignalUSART1_TX = PRS_USART1_TX, /**< USART1 TX Signal. */
450 prsSignalUSART1_CS = PRS_USART1_CS, /**< USART1 chip select Signal. */
451 #endif
452 #endif
453 #if defined(USART2)
454 prsSignalUSART2_TXC = PRS_USART2_TXC, /**< USART2 TX complete Signal. */
455 #if defined(PRS_USART2_RXDATA)
456 prsSignalUSART2_RXDATA = PRS_USART2_RXDATA, /**< USART2 RX data available Signal. */
457 #endif
458 #if defined(PRS_USART2_RXDATAV)
459 prsSignalUSART2_RXDATAV = PRS_USART2_RXDATAV, /**< USART2 RX data available Signal. */
460 #endif
461 #if defined(PRS_USART2_IRTX)
462 prsSignalUSART2_IRTX = PRS_USART2_IRTX, /**< USART2 IR TX Signal. */
463 #endif
464 #if defined(PRS_USART2_RTS)
465 prsSignalUSART2_RTS = PRS_USART2_RTS, /**< USART2 RTS Signal. */
466 prsSignalUSART2_TX = PRS_USART2_TX, /**< USART2 TX Signal. */
467 prsSignalUSART2_CS = PRS_USART2_CS, /**< USART2 chip select Signal. */
468 #endif
469 #endif
470 #if defined(PRS_USART3_TXC)
471 prsSignalUSART3_TXC = PRS_USART3_TXC, /**< USART3 TX complete Signal. */
472 prsSignalUSART3_RXDATAV = PRS_USART3_RXDATAV, /**< USART3 RX data available Signal. */
473 prsSignalUSART3_RTS = PRS_USART3_RTS, /**< USART3 RTS Signal. */
474 prsSignalUSART3_TX = PRS_USART3_TX, /**< USART3 TX Signal. */
475 prsSignalUSART3_CS = PRS_USART3_CS, /**< USART3 chip select Signal. */
476 #endif
477 #if defined(PRS_USART4_TXC)
478 prsSignalUSART4_TXC = PRS_USART4_TXC, /**< USART4 TX complete Signal. */
479 prsSignalUSART4_RXDATAV = PRS_USART4_RXDATAV, /**< USART4 RX data available Signal. */
480 prsSignalUSART4_RTS = PRS_USART4_RTS, /**< USART4 RTS Signal. */
481 prsSignalUSART4_TX = PRS_USART4_TX, /**< USART4 TX Signal. */
482 prsSignalUSART4_CS = PRS_USART4_CS, /**< USART4 chip select Signal. */
483 #endif
484 #if defined(PRS_USART5_TXC)
485 prsSignalUSART5_TXC = PRS_USART5_TXC, /**< USART5 TX complete Signal. */
486 prsSignalUSART5_RXDATAV = PRS_USART5_RXDATAV, /**< USART5 RX data available Signal. */
487 prsSignalUSART5_RTS = PRS_USART5_RTS, /**< USART5 RTS Signal. */
488 prsSignalUSART5_TX = PRS_USART5_TX, /**< USART5 TX Signal. */
489 prsSignalUSART5_CS = PRS_USART5_CS, /**< USART5 chip select Signal. */
490 #endif
491
492 #if defined(UART0)
493 prsSignalUART0_TXC = PRS_UART0_TXC, /**< UART0 TX complete Signal. */
494 prsSignalUART0_RXDATAV = PRS_UART0_RXDATAV, /**< UART0 RX data available Signal. */
495 #if defined(PRS_UART1_IRTX)
496 prsSignalUART0_IRTX = PRS_UART0_IRTX, /**< UART0 IR TX Signal. */
497 #endif
498 #if defined(PRS_UART0_RTS)
499 prsSignalUART0_RTS = PRS_UART0_RTS, /**< UART0 RTS Signal. */
500 prsSignalUART0_TX = PRS_UART0_TX, /**< UART0 TX Signal. */
501 prsSignalUART0_CS = PRS_UART0_CS, /**< UART0 chip select Signal. */
502 #endif
503 #endif
504
505 #if defined(UART1)
506 prsSignalUART1_TXC = PRS_UART1_TXC, /**< UART1 TX complete Signal. */
507 prsSignalUART1_RXDATAV = PRS_UART1_RXDATAV, /**< UART1 RX data available Signal. */
508 #if defined(PRS_UART1_IRTX)
509 prsSignalUART1_IRTX = PRS_UART1_IRTX, /**< UART1 IR RX Signal. */
510 #endif
511 #if defined(PRS_UART1_RTS)
512 prsSignalUART1_RTS = PRS_UART1_RTS, /**< UART1 RTS Signal. */
513 prsSignalUART1_TX = PRS_UART1_TX, /**< UART1 RX Signal. */
514 prsSignalUART1_CS = PRS_UART1_CS, /**< UART1 chip select Signal. */
515 #endif
516 #endif
517
518 #if defined(PRS_USB_SOF)
519 prsSignalUSB_SOF = PRS_USB_SOF, /**< USB_SOF Signal. */
520 prsSignalUSB_SOFSR = PRS_USB_SOFSR, /**< USB_SOFSR Signal. */
521 #endif
522
523 #if defined(PRS_CM4_TXEV)
524 prsSignalCM4_TXEV = PRS_CM4_TXEV, /**< TXEV Signal. */
525 #endif
526 #if defined(PRS_CM4_ICACHEPCHITSOF)
527 prsSignalCM4_ICACHEPCHITSOF = PRS_CM4_ICACHEPCHITSOF, /**< ICACHEPCHITSOF Signal. */
528 prsSignalCM4_ICACHEPCMISSESOF = PRS_CM4_ICACHEPCMISSESOF, /**< ICACHEPCMISSESOF Signal. */
529 #endif
530
531 #if defined(PRS_WTIMER0_UF)
532 prsSignalWTIMER0_UF = PRS_WTIMER0_UF, /**< WTIMER0_UF Signal. */
533 prsSignalWTIMER0_OF = PRS_WTIMER0_OF, /**< WTIMER0_OF Signal. */
534 prsSignalWTIMER0_CC0 = PRS_WTIMER0_CC0, /**< WTIMER0_CC0 Signal. */
535 prsSignalWTIMER0_CC1 = PRS_WTIMER0_CC1, /**< WTIMER0_CC1 Signal. */
536 prsSignalWTIMER0_CC2 = PRS_WTIMER0_CC2, /**< WTIMER0_CC2 Signal. */
537 #endif
538 #if defined(PRS_WTIMER1_UF)
539 prsSignalWTIMER1_UF = PRS_WTIMER1_UF, /**< WTIMER1_UF Signal. */
540 prsSignalWTIMER1_OF = PRS_WTIMER1_OF, /**< WTIMER1_OF Signal. */
541 prsSignalWTIMER1_CC0 = PRS_WTIMER1_CC0, /**< WTIMER1_CC0 Signal. */
542 prsSignalWTIMER1_CC1 = PRS_WTIMER1_CC1, /**< WTIMER1_CC1 Signal. */
543 prsSignalWTIMER1_CC2 = PRS_WTIMER1_CC2, /**< WTIMER1_CC2 Signal. */
544 prsSignalWTIMER1_CC3 = PRS_WTIMER1_CC3, /**< WTIMER1_CC3 Signal. */
545 #endif
546 #if defined(PRS_WTIMER2_UF)
547 prsSignalWTIMER2_UF = PRS_WTIMER2_UF, /**< WTIMER2_UF Signal. */
548 prsSignalWTIMER2_OF = PRS_WTIMER2_OF, /**< WTIMER2_OF Signal. */
549 prsSignalWTIMER2_CC0 = PRS_WTIMER2_CC0, /**< WTIMER2_CC0 Signal. */
550 prsSignalWTIMER2_CC1 = PRS_WTIMER2_CC1, /**< WTIMER2_CC1 Signal. */
551 prsSignalWTIMER2_CC2 = PRS_WTIMER2_CC2, /**< WTIMER2_CC2 Signal. */
552 #endif
553 #if defined(PRS_WTIMER3_UF)
554 prsSignalWTIMER3_UF = PRS_WTIMER3_UF, /**< WTIMER3_UF Signal. */
555 prsSignalWTIMER3_OF = PRS_WTIMER3_OF, /**< WTIMER3_OF Signal. */
556 prsSignalWTIMER3_CC0 = PRS_WTIMER3_CC0, /**< WTIMER3_CC0 Signal. */
557 prsSignalWTIMER3_CC1 = PRS_WTIMER3_CC1, /**< WTIMER3_CC1 Signal. */
558 prsSignalWTIMER3_CC2 = PRS_WTIMER3_CC2, /**< WTIMER3_CC2 Signal. */
559 #endif
560
561 /* EUSART Signals */
562 #if defined(EUSART0)
563 prsSignalEUSART0_CS = PRS_EUSART0L_CS, /**< EUSART0 chip select Signal. */
564 prsSignalEUSART0_IRTX = PRS_EUSART0L_IRDATX, /**< EUSART0 IR RX Signal. */
565 prsSignalEUSART0_RTS = PRS_EUSART0L_RTS, /**< EUSART0 RTS Signal. */
566 prsSignalEUSART0_RXDATA = PRS_EUSART0L_RXDATAV, /**< EUSART0 RX data available Signal. */
567 prsSignalEUSART0_TX = PRS_EUSART0L_TX, /**< EUSART0 TX Signal. */
568 prsSignalEUSART0_TXC = PRS_EUSART0L_TXC, /**< EUSART0 TX complete Signal. */
569 prsSignalEUSART0_RXFL = PRS_EUSART0L_RXFL, /**< EUSART0 rxfl Signal. */
570 prsSignalEUSART0_TXFL = PRS_EUSART0L_TXFL, /**< EUSART0 txfl Signal. */
571 #endif
572 #if defined(EUSART1)
573 prsSignalEUSART1_CS = PRS_EUSART1L_CS, /**< EUSART1 chip select Signal. */
574 prsSignalEUSART1_IRTX = PRS_EUSART1L_IRDATX, /**< EUSART1 IR TX Signal. */
575 prsSignalEUSART1_RTS = PRS_EUSART1L_RTS, /**< EUSART1 RTS Signal. */
576 prsSignalEUSART1_RXDATA = PRS_EUSART1L_RXDATAV, /**< EUSART1 RX data available Signal. */
577 prsSignalEUSART1_TX = PRS_EUSART1L_TX, /**< EUSART1 TX Signal. */
578 prsSignalEUSART1_TXC = PRS_EUSART1L_TXC, /**< EUSART1 TX complete Signal. */
579 prsSignalEUSART1_RXFL = PRS_EUSART1L_RXFL, /**< EUSART1 rxfl Signal. */
580 prsSignalEUSART1_TXFL = PRS_EUSART1L_TXFL, /**< EUSART1 txfl Signal. */
581 #endif
582 #if defined(EUSART2)
583 prsSignalEUSART2_CS = PRS_EUSART2L_CS, /**< EUSART2 chip select Signal. */
584 prsSignalEUSART2_IRTX = PRS_EUSART2L_IRDATX, /**< EUSART2 IR TX Signal. */
585 prsSignalEUSART2_RTS = PRS_EUSART2L_RTS, /**< EUSART2 RTS Signal. */
586 prsSignalEUSART2_RXDATA = PRS_EUSART2L_RXDATAV, /**< EUSART2 RX data available Signal. */
587 prsSignalEUSART2_TX = PRS_EUSART2L_TX, /**< EUSART2 TX Signal. */
588 prsSignalEUSART2_TXC = PRS_EUSART2L_TXC, /**< EUSART2 TX complete Signal. */
589 prsSignalEUSART2_RXFL = PRS_EUSART2L_RXFL, /**< EUSART2 rxfl Signal. */
590 prsSignalEUSART2_TXFL = PRS_EUSART2L_TXFL, /**< EUSART2 txfl Signal. */
591 #endif
592 #if defined(EUSART3)
593 prsSignalEUSART3_CS = PRS_EUSART3L_CS, /**< EUSART3 chip select Signal. */
594 prsSignalEUSART3_IRTX = PRS_EUSART3L_IRDATX, /**< EUSART3 IR TX Signal. */
595 prsSignalEUSART3_RTS = PRS_EUSART3L_RTS, /**< EUSART3 RTS Signal. */
596 prsSignalEUSART3_RXDATA = PRS_EUSART3L_RXDATAV, /**< EUSART3 RX data available Signal. */
597 prsSignalEUSART3_TX = PRS_EUSART3L_TX, /**< EUSART3 TX Signal. */
598 prsSignalEUSART3_TXC = PRS_EUSART3L_TXC, /**< EUSART3 TX complete Signal. */
599 prsSignalEUSART3_RXFL = PRS_EUSART3L_RXFL, /**< EUSART3 rxfl Signal. */
600 prsSignalEUSART3_TXFL = PRS_EUSART3L_TXFL, /**< EUSART3 txfl Signal. */
601 #endif
602 #if defined(EUSART4)
603 prsSignalEUSART4_CS = PRS_EUSART4L_CS, /**< EUSART4 chip select Signal. */
604 prsSignalEUSART4_IRTX = PRS_EUSART4L_IRDATX, /**< EUSART4 IR TX Signal. */
605 prsSignalEUSART4_RTS = PRS_EUSART4L_RTS, /**< EUSART4 RTS Signal. */
606 prsSignalEUSART4_RXDATA = PRS_EUSART4L_RXDATAV, /**< EUSART4 RX data available Signal. */
607 prsSignalEUSART4_TX = PRS_EUSART4L_TX, /**< EUSART4 TX Signal. */
608 prsSignalEUSART4_TXC = PRS_EUSART4L_TXC, /**< EUSART4 TX complete Signal. */
609 prsSignalEUSART4_RXFL = PRS_EUSART4L_RXFL, /**< EUSART4 rxfl Signal. */
610 prsSignalEUSART4_TXFL = PRS_EUSART4L_TXFL, /**< EUSART4 txfl Signal. */
611 #endif
612 /* ADC Signals */
613 #if defined(IADC0)
614 prsSignalIADC0_SCANENTRY = PRS_IADC0_SCANENTRYDONE, /**< IADC0 scan entry Signal. */
615 prsSignalIADC0_SCANTABLE = PRS_IADC0_SCANTABLEDONE, /**< IADC0 scan table Signal. */
616 prsSignalIADC0_SINGLE = PRS_IADC0_SINGLEDONE, /**< IADC0 single Signal. */
617 #endif
618
619 /* GPIO pin Signals */
620 prsSignalGPIO_PIN0 = PRS_GPIO_PIN0, /**< GPIO Pin 0 Signal. */
621 prsSignalGPIO_PIN1 = PRS_GPIO_PIN1, /**< GPIO Pin 1 Signal. */
622 prsSignalGPIO_PIN2 = PRS_GPIO_PIN2, /**< GPIO Pin 2 Signal. */
623 prsSignalGPIO_PIN3 = PRS_GPIO_PIN3, /**< GPIO Pin 3 Signal. */
624 prsSignalGPIO_PIN4 = PRS_GPIO_PIN4, /**< GPIO Pin 4 Signal. */
625 prsSignalGPIO_PIN5 = PRS_GPIO_PIN5, /**< GPIO Pin 5 Signal. */
626 prsSignalGPIO_PIN6 = PRS_GPIO_PIN6, /**< GPIO Pin 6 Signal. */
627 prsSignalGPIO_PIN7 = PRS_GPIO_PIN7, /**< GPIO Pin 7 Signal. */
628 #if defined(PRS_GPIO_PIN15)
629 prsSignalGPIO_PIN8 = PRS_GPIO_PIN8, /**< GPIO Pin 8 Signal. */
630 prsSignalGPIO_PIN9 = PRS_GPIO_PIN9, /**< GPIO Pin 9 Signal. */
631 prsSignalGPIO_PIN10 = PRS_GPIO_PIN10, /**< GPIO Pin 10 Signal. */
632 prsSignalGPIO_PIN11 = PRS_GPIO_PIN11, /**< GPIO Pin 11 Signal. */
633 prsSignalGPIO_PIN12 = PRS_GPIO_PIN12, /**< GPIO Pin 12 Signal. */
634 prsSignalGPIO_PIN13 = PRS_GPIO_PIN13, /**< GPIO Pin 13 Signal. */
635 prsSignalGPIO_PIN14 = PRS_GPIO_PIN14, /**< GPIO Pin 14 Signal. */
636 prsSignalGPIO_PIN15 = PRS_GPIO_PIN15, /**< GPIO Pin 15 Signal. */
637 #endif
638 #if defined(PRS_AGCL_CCA)
639 prsSignalAGCL_CCA = PRS_AGCL_CCA, /**< AGCL_CCA Signal. */
640 prsSignalAGCL_CCAREQ = PRS_AGCL_CCAREQ, /**< AGCL_CCAREQ Signal. */
641 prsSignalAGCL_GAINADJUST = PRS_AGCL_GAINADJUST, /**< AGCL_GAINADJUST Signal. */
642 prsSignalAGCL_GAINOK = PRS_AGCL_GAINOK, /**< AGCL_GAINOK Signal. */
643 prsSignalAGCL_GAINREDUCED = PRS_AGCL_GAINREDUCED, /**< AGCL_GAINREDUCED Signal. */
644 prsSignalAGCL_IFPKI1 = PRS_AGCL_IFPKI1, /**< AGCL_IFPKI1 Signal. */
645 prsSignalAGCL_IFPKQ2 = PRS_AGCL_IFPKQ2, /**< AGCL_IFPKQ2 Signal. */
646 prsSignalAGCL_IFPKRST = PRS_AGCL_IFPKRST, /**< AGCL_IFPKRST Signal. */
647 #endif
648 #if defined(PRS_AGC_PEAKDET)
649 prsSignalAGC_PEAKDET = PRS_AGC_PEAKDET, /**< AGC_PEAKDET Signal. */
650 prsSignalAGC_PROPAGATED = PRS_AGC_PROPAGATED, /**< AGC_PROPAGATED Signal. */
651 prsSignalAGC_RSSIDONE = PRS_AGC_RSSIDONE, /**< AGC_RSSIDONE Signal. */
652 #endif
653 #if defined(PRS_BUFC_THR0)
654 prsSignalBUFC_THR0 = PRS_BUFC_THR0, /**< BUFC_THR0 Signal. */
655 prsSignalBUFC_THR1 = PRS_BUFC_THR1, /**< BUFC_THR1 Signal. */
656 prsSignalBUFC_THR2 = PRS_BUFC_THR2, /**< BUFC_THR2 Signal. */
657 prsSignalBUFC_THR3 = PRS_BUFC_THR3, /**< BUFC_THR3 Signal. */
658 #endif
659 #if defined(PRS_BUFC_CNT0)
660 prsSignalBUFC_CNT0 = PRS_BUFC_CNT0, /**< BUFC_CNT0 Signal. */
661 prsSignalBUFC_CNT1 = PRS_BUFC_CNT1, /**< BUFC_CNT1 Signal. */
662 prsSignalBUFC_FULL = PRS_BUFC_FULL, /**< BUFC_FULL Signal. */
663 #endif
664 #if defined(PRS_MODEML_ADVANCE)
665 prsSignalMODEML_ADVANCE = PRS_MODEML_ADVANCE, /**< MODEML_ADVANCE Signal. */
666 prsSignalMODEML_ANT0 = PRS_MODEML_ANT0, /**< MODEML_ANT0 Signal. */
667 prsSignalMODEML_ANT1 = PRS_MODEML_ANT1, /**< MODEML_ANT1 Signal. */
668 prsSignalMODEML_COHDSADET = PRS_MODEML_COHDSADET, /**< MODEML_COHDSADET Signal. */
669 prsSignalMODEML_COHDSALIVE = PRS_MODEML_COHDSALIVE, /**< MODEML_COHDSALIVE Signal. */
670 prsSignalMODEML_DCLK = PRS_MODEML_DCLK, /**< MODEML_DCLK Signal. */
671 prsSignalMODEML_DOUT = PRS_MODEML_DOUT, /**< MODEML_DOUT Signal. */
672 prsSignalMODEML_FRAMEDET = PRS_MODEML_FRAMEDET, /**< MODEML_FRAMEDET Signal. */
673 #endif
674 #if defined(PRS_MODEM_FRAMEDET)
675 prsSignalMODEM_FRAMEDET = PRS_MODEM_FRAMEDET, /**< MODEM_FRAMEDET Signal. */
676 prsSignalMODEM_TIMDET = PRS_MODEM_TIMDET, /**< MODEM_TIMDET Signal. */
677 prsSignalMODEM_SYNCSENT = PRS_MODEM_SYNCSENT, /**< MODEM_SYNCSENT Signal. */
678 prsSignalMODEM_PRESENT = PRS_MODEM_PRESENT, /**< MODEM_PRESENT Signal. */
679 prsSignalMODEM_ANT0 = PRS_MODEM_ANT0, /**< MODEM_ANT0 Signal. */
680 prsSignalMODEM_ANT1 = PRS_MODEM_ANT1, /**< MODEM_ANT1 Signal. */
681 #endif
682 #if defined(PRS_MODEM_FRAMESENT)
683 prsSignalMODEM_FRAMESENT = PRS_MODEM_FRAMESENT, /**< MODEM_FRAMESENT Signal. */
684 #endif
685 #if defined(PRS_MODEM_PREDET)
686 prsSignalMODEM_PREDET = PRS_MODEM_PREDET, /**< MODEM_PREDET Signal. */
687 #endif
688 #if defined(PRS_MODEM_LRDSADET)
689 prsSignalMODEM_LRDSADET = PRS_MODEM_LRDSADET, /**< MODEM_LRDSADET Signal. */
690 prsSignalMODEM_LRDSALIVE = PRS_MODEM_LRDSALIVE, /**< MODEM_LRDSALIVE Signal. */
691 #endif
692 #if defined(PRS_MODEM_LOWCORR)
693 prsSignalMODEM_LOWCORR = PRS_MODEM_LOWCORR, /**< MODEM_LOWCORR Signal. */
694 prsSignalMODEM_NEWSYMBOL = PRS_MODEM_NEWSYMBOL, /**< MODEM_NEWSYMBOL Signal. */
695 prsSignalMODEM_NEWWND = PRS_MODEM_NEWWND, /**< MODEM_NEWWND Signal. */
696 prsSignalMODEM_POSTPONE = PRS_MODEM_POSTPONE, /**< MODEM_POSTPONE Signal. */
697 #endif
698 #if defined(PRS_MODEMH_PRESENT)
699 prsSignalMODEMH_PRESENT = PRS_MODEMH_PRESENT, /**< MODEMH_PRESENT Signal. */
700 prsSignalMODEMH_RSSIJUMP = PRS_MODEMH_RSSIJUMP, /**< MODEMH_RSSIJUMP Signal. */
701 prsSignalMODEMH_SYNCSENT = PRS_MODEMH_SYNCSENT, /**< MODEMH_SYNCSENT Signal. */
702 prsSignalMODEMH_TIMDET = PRS_MODEMH_TIMDET, /**< MODEMH_TIMDET Signal. */
703 prsSignalMODEMH_WEAK = PRS_MODEMH_WEAK, /**< MODEMH_WEAK Signal. */
704 prsSignalMODEMH_EOF = PRS_MODEMH_EOF, /**< MODEMH_EOF Signal. */
705 #endif
706 #if defined(PRS_MODEMH_SI)
707 prsSignalMODEMH_SI = PRS_MODEMH_SI, /**< MODEMH_SI Signal. */
708 #endif
709 #if defined(PRS_FRC_DCLK)
710 prsSignalFRC_DCLK = PRS_FRC_DCLK, /**< FRC_DCLK Signal. */
711 prsSignalFRC_DOUT = PRS_FRC_DOUT, /**< FRC_DOUT Signal. */
712 #endif
713 #if defined(PRS_PROTIMERL_BOF)
714 prsSignalPROTIMERL_BOF = PRS_PROTIMERL_BOF, /**< PROTIMERL_BOF Signal. */
715 prsSignalPROTIMERL_CC0 = PRS_PROTIMERL_CC0, /**< PROTIMERL_CC0 Signal. */
716 prsSignalPROTIMERL_CC1 = PRS_PROTIMERL_CC1, /**< PROTIMERL_CC1 Signal. */
717 prsSignalPROTIMERL_CC2 = PRS_PROTIMERL_CC2, /**< PROTIMERL_CC2 Signal. */
718 prsSignalPROTIMERL_CC3 = PRS_PROTIMERL_CC3, /**< PROTIMERL_CC3 Signal. */
719 prsSignalPROTIMERL_CC4 = PRS_PROTIMERL_CC4, /**< PROTIMERL_CC4 Signal. */
720 prsSignalPROTIMERL_LBTF = PRS_PROTIMERL_LBTF, /**< PROTIMERL_LBTF Signal. */
721 prsSignalPROTIMERL_LBTR = PRS_PROTIMERL_LBTR, /**< PROTIMERL_LBTR Signal. */
722 #endif
723 #if defined(PRS_PROTIMER_LBTR)
724 prsSignalPROTIMER_LBTR = PRS_PROTIMER_LBTR, /**< PROTIMER_LBTR Signal. */
725 prsSignalPROTIMER_LBTF = PRS_PROTIMER_LBTF, /**< PROTIMER_LBTF Signal. */
726 #endif
727 #if defined(PRS_PROTIMER_LBTS)
728 prsSignalPROTIMER_LBTS = PRS_PROTIMER_LBTS, /**< PROTIMER_LBTS Signal. */
729 #endif
730 #if defined(PRS_PROTIMER_POF)
731 prsSignalPROTIMER_POF = PRS_PROTIMER_POF, /**< PROTIMER_POF Signal. */
732 prsSignalPROTIMER_T0MATCH = PRS_PROTIMER_T0MATCH, /**< PROTIMER_T0MATCH Signal. */
733 prsSignalPROTIMER_T0UF = PRS_PROTIMER_T0UF, /**< PROTIMER_T0UF Signal. */
734 prsSignalPROTIMER_T1MATCH = PRS_PROTIMER_T1MATCH, /**< PROTIMER_T1MATCH Signal. */
735 prsSignalPROTIMER_T1UF = PRS_PROTIMER_T1UF, /**< PROTIMER_T1UF Signal. */
736 prsSignalPROTIMER_WOF = PRS_PROTIMER_WOF, /**< PROTIMER_WOF Signal. */
737 #endif
738 #if defined(PRS_RAC_ACTIVE)
739 prsSignalRAC_ACTIVE = PRS_RAC_ACTIVE, /**< RAC_ACTIVE Signal. */
740 prsSignalRAC_LNAEN = PRS_RAC_LNAEN, /**< RAC_LNAEN Signal. */
741 prsSignalRAC_PAEN = PRS_RAC_PAEN, /**< RAC_PAEN Signal. */
742 prsSignalRAC_RX = PRS_RAC_RX, /**< RAC_RX Signal. */
743 prsSignalRAC_TX = PRS_RAC_TX, /**< RAC_TX Signal. */
744 #endif
745 #if defined(PRS_RACL_ACTIVE)
746 prsSignalRACL_ACTIVE = PRS_RACL_ACTIVE, /**< RACL_ACTIVE Signal. */
747 prsSignalRACL_LNAEN = PRS_RACL_LNAEN, /**< RACL_LNAEN Signal. */
748 prsSignalRACL_PAEN = PRS_RACL_PAEN, /**< RACL_PAEN Signal. */
749 prsSignalRACL_RX = PRS_RACL_RX, /**< RACL_RX Signal. */
750 prsSignalRACL_TX = PRS_RACL_TX, /**< RACL_TX Signal. */
751 prsSignalRACL_CTIOUT0 = PRS_RACL_CTIOUT0, /**< RACL_CTIOUT0 Signal. */
752 prsSignalRACL_CTIOUT1 = PRS_RACL_CTIOUT1, /**< RACL_CTIOUT1 Signal. */
753 prsSignalRACL_CTIOUT2 = PRS_RACL_CTIOUT2, /**< RACL_CTIOUT2 Signal. */
754 #endif
755 #if defined(PRS_RAC_CTIOUT3)
756 prsSignalRAC_CTIOUT3 = PRS_RAC_CTIOUT3, /**< RAC_CTIOUT3 Signal. */
757 #endif
758 #if defined(PRS_RAC_AUXADCDATA)
759 prsSignalRAC_AUXADCDATA = PRS_RAC_AUXADCDATA, /**< RAC_AUXADCDATA Signal. */
760 prsSignalRAC_AUXADCDATAVALID = PRS_RAC_AUXADCDATAVALID, /**< RAC_AUXADCDATAVALID Signal. */
761 #endif
762 #if defined(PRS_SYNTH_MUX0)
763 prsSignalSYNTH_MUX0 = PRS_SYNTH_MUX0, /**< SYNTH_MUX0 Signal. */
764 prsSignalSYNTH_MUX1 = PRS_SYNTH_MUX1, /**< SYNTH_MUX1 Signal. */
765 #endif
766 #if defined(PRS_PRORTC_CCV0)
767 prsSignalPRORTC_CCV0 = PRS_PRORTC_CCV0, /**< PRORTC_CCV0 Signal. */
768 prsSignalPRORTC_CCV1 = PRS_PRORTC_CCV1, /**< PRORTC_CCV1 Signal. */
769 #endif
770 #if defined(PRS_LVGD_LVGDFALLDETECTED)
771 prsSignalLVGD_LVGDFALLDETECTED = PRS_LVGD_LVGDFALLDETECTED, /**< LVGD_LVGDFALLDETECTED Signal. */
772 prsSignalLVGD_LVGDFALLDETECTEDRAW = PRS_LVGD_LVGDFALLDETECTEDRAW, /**< LVGD_LVGDFALLDETECTEDRAW Signal. */
773 prsSignalLVGD_LVGDRISEDETECTED = PRS_LVGD_LVGDRISEDETECTED, /**< LVGD_LVGDRISEDETECTED Signal. */
774 prsSignalLVGD_LVGDRISEDETECTEDRAW = PRS_LVGD_LVGDRISEDETECTEDRAW, /**< LVGD_LVGDRISEDETECTEDRAW Signal. */
775 #endif
776 #if defined(PRS_SE_COREENGATED)
777 prsSignalSE_COREENGATED = PRS_SE_COREENGATED, /**< SE_COREENGATED Signal. */
778 prsSignalSE_STATE0GATED = PRS_SE_STATE0GATED, /**< SE_STATE0GATED Signal. */
779 prsSignalSE_STATE1GATED = PRS_SE_STATE1GATED, /**< SE_STATE1GATED Signal. */
780 prsSignalSE_STATE2GATED = PRS_SE_STATE2GATED, /**< SE_STATE2GATED Signal. */
781 #endif
782 #if defined(RFFPLL0)
783 prsSignalRFFPLL0L_CLKDIGDIV4 = PRS_RFFPLL0L_CLKDIGDIV4, /**< RFFPLL0L CLKDIGDIV4 Signal. */
784 prsSignalRFFPLL0L_CLKMODEMDIV4 = PRS_RFFPLL0L_CLKMODEMDIV4, /**< RFFPLL0L CLKMODEMDIV4 Signal. */
785 #if defined(PRS_RFFPLL0L_RFBIASFSMSTATE0)
786 prsSignalRFFPLL0L_RFBIASFSMSTATE0 = PRS_RFFPLL0L_RFBIASFSMSTATE0, /**< RFFPLL0L RFBIASFSMSTATE0 Signal. */
787 prsSignalRFFPLL0L_RFBIASFSMSTATE1 = PRS_RFFPLL0L_RFBIASFSMSTATE1, /**< RFFPLL0L RFBIASFSMSTATE1 Signal. */
788 prsSignalRFFPLL0L_RFFPLLFSMSTATE0 = PRS_RFFPLL0L_RFFPLLFSMSTATE0, /**< RFFPLL0L RFFPLLFSMSTATE0 Signal. */
789 prsSignalRFFPLL0L_RFFPLLFSMSTATE1 = PRS_RFFPLL0L_RFFPLLFSMSTATE1, /**< RFFPLL0L RFFPLLFSMSTATE1 Signal. */
790 prsSignalRFFPLL0L_RFFPLLFSMSTATE2 = PRS_RFFPLL0L_RFFPLLFSMSTATE2, /**< RFFPLL0L RFFPLLFSMSTATE2 Signal. */
791 prsSignalRFFPLL0L_RFBIASFSMSTATE2 = PRS_RFFPLL0L_RFBIASFSMSTATE2, /**< RFFPLL0L RFBIASFSMSTATE2 Signal. */
792 prsSignalRFFPLL0_RFFPLLFSMSTATE3 = PRS_RFFPLL0_RFFPLLFSMSTATE3, /**< RFFPLL0 RFFPLLFSMSTATE3 Signal. */
793 #endif
794 #endif
795 #if defined(FEFILT0)
796 prsSignalFEFILT0_REMPTY = PRS_FEFILT0_REMPTY, /**< FEFILT0 REMPTY Signal. */
797 prsSignalFEFILT0_WFULL = PRS_FEFILT0_WFULL, /**< FEFILT0 WFULL Signal. */
798 #endif
799 #if defined(FEFILT0)
800 prsSignalFEFILT1_REMPTY = PRS_FEFILT1_REMPTY, /**< FEFILT1 REMPTY Signal. */
801 prsSignalFEFILT1_WFULL = PRS_FEFILT1_WFULL, /**< FEFILT1 WFULL Signal. */
802 #endif
803 #if defined(ETAMPDET)
804 prsSignalETAMPDET_TAMPERSRCETAMPDET = PRS_ETAMPDET_TAMPERSRCETAMPDET, /**< ETAMPDET TAMPERSRCETAMPDET Signal. */
805 #endif
806 #if defined(SMCTRL)
807 prsSignalSMCTRLL_SOFTM0 = PRS_SMCTRLL_SOFTM0, /**< SMCTRLL SOFTM0 Signal. */
808 prsSignalSMCTRLL_SOFTM1 = PRS_SMCTRLL_SOFTM1, /**< SMCTRLL SOFTM1 Signal. */
809 prsSignalSMCTRLL_SOFTM2 = PRS_SMCTRLL_SOFTM2, /**< SMCTRLL SOFTM2 Signal. */
810 prsSignalSMCTRLL_SOFTM3 = PRS_SMCTRLL_SOFTM3, /**< SMCTRLL SOFTM3 Signal. */
811 prsSignalSMCTRLL_SOFTM4 = PRS_SMCTRLL_SOFTM4, /**< SMCTRLL SOFTM4 Signal. */
812 prsSignalSMCTRLL_SOFTM5 = PRS_SMCTRLL_SOFTM5, /**< SMCTRLL SOFTM5 Signal. */
813 prsSignalSMCTRLL_SOFTM6 = PRS_SMCTRLL_SOFTM6, /**< SMCTRLL SOFTM6 Signal. */
814 prsSignalSMCTRLL_SOFTM7 = PRS_SMCTRLL_SOFTM7, /**< SMCTRLL SOFTM7 Signal. */
815 prsSignalSMCTRL_SOFTM8 = PRS_SMCTRL_SOFTM8, /**< SMCTRL SOFTM8 Signal. */
816 prsSignalSMCTRL_SOFTM9 = PRS_SMCTRL_SOFTM9, /**< SMCTRL SOFTM9 Signal. */
817 prsSignalSMCTRL_SOFTM10 = PRS_SMCTRL_SOFTM10, /**< SMCTRL SOFTM10 Signal. */
818 prsSignalSMCTRL_SOFTM11 = PRS_SMCTRL_SOFTM11, /**< SMCTRL SOFTM11 Signal. */
819 #endif
820 #if defined(PRS_SEHFRCO_COREEN)
821 prsSignalSEHFRCO_COREEN = PRS_SEHFRCO_COREEN, /**< SEHFRCO COREEN Signal. */
822 prsSignalSEHFRCO_STATE0 = PRS_SEHFRCO_STATE0, /**< SEHFRCO STATE0 Signal. */
823 prsSignalSEHFRCO_STATE1 = PRS_SEHFRCO_STATE1, /**< SEHFRCO STATE1 Signal. */
824 prsSignalSEHFRCO_STATE2 = PRS_SEHFRCO_STATE2, /**< SEHFRCO STATE2 Signal. */
825 #endif
826 #if defined(PRS_SEATAMPDET_SEATAMPDETSUPTPDELAY)
827 prsSignalSEATAMPDET_SEATAMPDETSUPTPDELAY = PRS_SEATAMPDET_SEATAMPDETSUPTPDELAY, /**< SEATAMPDET SEATAMPDETSUPTPDELAY Signal. */
828 #endif
829 #if defined(PRS_DCDC_MONO70NSANA)
830 prsSignalDCDC_MONO70NSANA = PRS_DCDC_MONO70NSANA, /** DCDC Pulses for Coulomb Counter Calibration Signal. */
831 #endif
832 #if defined(PRS_LFRCO_CALMEAS)
833 prsSignalLFRCO_CALMEAS = PRS_LFRCO_CALMEAS, /** LFRCO Calibration Measure Signal. */
834 prsSignalLFRCO_SDM = PRS_LFRCO_SDM, /** LFRCO Sigma Delta Modulator output Signal. */
835 prsSignalLFRCO_TCMEAS = PRS_LFRCO_TCMEAS, /** LFRCO Temperature Check Measure Signal. */
836 #endif
837 } PRS_Signal_t;
838
839 #if defined(_SILICON_LABS_32B_SERIES_2)
840 /** PRS Consumers. */
841 typedef enum {
842 prsConsumerNone = 0x000, /**< No PRS consumer */
843 prsConsumerCMU_CALDN = offsetof(PRS_TypeDef, CONSUMER_CMU_CALDN), /**< CMU calibration down consumer. */
844 prsConsumerCMU_CALUP = offsetof(PRS_TypeDef, CONSUMER_CMU_CALUP), /**< CMU calibration up consumer. */
845 #if defined(IADC_PRESENT)
846 prsConsumerIADC0_SCANTRIGGER = offsetof(PRS_TypeDef, CONSUMER_IADC0_SCANTRIGGER), /**< IADC0 scan trigger consumer. */
847 prsConsumerIADC0_SINGLETRIGGER = offsetof(PRS_TypeDef, CONSUMER_IADC0_SINGLETRIGGER), /**< IADC0 single trigger consumer. */
848 #endif
849 prsConsumerLDMA_REQUEST0 = offsetof(PRS_TypeDef, CONSUMER_LDMAXBAR_DMAREQ0), /**< LDMA Request 0 consumer. */
850 prsConsumerLDMA_REQUEST1 = offsetof(PRS_TypeDef, CONSUMER_LDMAXBAR_DMAREQ1), /**< LDMA Request 1 consumer. */
851 #if defined(LETIMER0)
852 prsConsumerLETIMER0_CLEAR = offsetof(PRS_TypeDef, CONSUMER_LETIMER0_CLEAR), /**< LETIMER0 clear consumer. */
853 prsConsumerLETIMER0_START = offsetof(PRS_TypeDef, CONSUMER_LETIMER0_START), /**< LETIMER0 start consumer. */
854 prsConsumerLETIMER0_STOP = offsetof(PRS_TypeDef, CONSUMER_LETIMER0_STOP), /**< LETIMER0 stop consumer. */
855 #endif
856 prsConsumerTIMER0_CC0 = offsetof(PRS_TypeDef, CONSUMER_TIMER0_CC0), /**< TIMER0 capture/compare channel 0 consumer. */
857 prsConsumerTIMER0_CC1 = offsetof(PRS_TypeDef, CONSUMER_TIMER0_CC1), /**< TIMER0 capture/compare channel 1 consumer. */
858 prsConsumerTIMER0_CC2 = offsetof(PRS_TypeDef, CONSUMER_TIMER0_CC2), /**< TIMER0 capture/compare channel 2 consumer. */
859 prsConsumerTIMER1_CC0 = offsetof(PRS_TypeDef, CONSUMER_TIMER1_CC0), /**< TIMER1 capture/compare channel 0 consumer. */
860 prsConsumerTIMER1_CC1 = offsetof(PRS_TypeDef, CONSUMER_TIMER1_CC1), /**< TIMER1 capture/compare channel 1 consumer. */
861 prsConsumerTIMER1_CC2 = offsetof(PRS_TypeDef, CONSUMER_TIMER1_CC2), /**< TIMER1 capture/compare channel 2 consumer. */
862 prsConsumerTIMER2_CC0 = offsetof(PRS_TypeDef, CONSUMER_TIMER2_CC0), /**< TIMER2 capture/compare channel 0 consumer. */
863 prsConsumerTIMER2_CC1 = offsetof(PRS_TypeDef, CONSUMER_TIMER2_CC1), /**< TIMER2 capture/compare channel 1 consumer. */
864 prsConsumerTIMER2_CC2 = offsetof(PRS_TypeDef, CONSUMER_TIMER2_CC2), /**< TIMER2 capture/compare channel 2 consumer. */
865 prsConsumerTIMER3_CC0 = offsetof(PRS_TypeDef, CONSUMER_TIMER3_CC0), /**< TIMER3 capture/compare channel 0 consumer. */
866 prsConsumerTIMER3_CC1 = offsetof(PRS_TypeDef, CONSUMER_TIMER3_CC1), /**< TIMER3 capture/compare channel 1 consumer. */
867 prsConsumerTIMER3_CC2 = offsetof(PRS_TypeDef, CONSUMER_TIMER3_CC2), /**< TIMER3 capture/compare channel 2 consumer. */
868 #if defined(TIMER4)
869 prsConsumerTIMER4_CC0 = offsetof(PRS_TypeDef, CONSUMER_TIMER4_CC0), /**< TIMER4 capture/compare channel 0 consumer. */
870 prsConsumerTIMER4_CC1 = offsetof(PRS_TypeDef, CONSUMER_TIMER4_CC1), /**< TIMER4 capture/compare channel 1 consumer. */
871 prsConsumerTIMER4_CC2 = offsetof(PRS_TypeDef, CONSUMER_TIMER4_CC2), /**< TIMER4 capture/compare channel 2 consumer. */
872 #endif
873 #if defined(TIMER5)
874 prsConsumerTIMER5_CC0 = offsetof(PRS_TypeDef, CONSUMER_TIMER5_CC0), /**< TIMER5 capture/compare channel 0 consumer. */
875 prsConsumerTIMER5_CC1 = offsetof(PRS_TypeDef, CONSUMER_TIMER5_CC1), /**< TIMER5 capture/compare channel 1 consumer. */
876 prsConsumerTIMER5_CC2 = offsetof(PRS_TypeDef, CONSUMER_TIMER5_CC2), /**< TIMER5 capture/compare channel 2 consumer. */
877 #endif
878 #if defined(TIMER6)
879 prsConsumerTIMER6_CC0 = offsetof(PRS_TypeDef, CONSUMER_TIMER6_CC0), /**< TIMER6 capture/compare channel 0 consumer. */
880 prsConsumerTIMER6_CC1 = offsetof(PRS_TypeDef, CONSUMER_TIMER6_CC1), /**< TIMER6 capture/compare channel 1 consumer. */
881 prsConsumerTIMER6_CC2 = offsetof(PRS_TypeDef, CONSUMER_TIMER6_CC2), /**< TIMER6 capture/compare channel 2 consumer. */
882 #endif
883 #if defined(TIMER7)
884 prsConsumerTIMER7_CC0 = offsetof(PRS_TypeDef, CONSUMER_TIMER7_CC0), /**< TIMER7 capture/compare channel 0 consumer. */
885 prsConsumerTIMER7_CC1 = offsetof(PRS_TypeDef, CONSUMER_TIMER7_CC1), /**< TIMER7 capture/compare channel 1 consumer. */
886 prsConsumerTIMER7_CC2 = offsetof(PRS_TypeDef, CONSUMER_TIMER7_CC2), /**< TIMER7 capture/compare channel 2 consumer. */
887 #endif
888 #if defined(USART0)
889 prsConsumerUSART0_CLK = offsetof(PRS_TypeDef, CONSUMER_USART0_CLK), /**< USART0 clock consumer. */
890 prsConsumerUSART0_IR = offsetof(PRS_TypeDef, CONSUMER_USART0_IR), /**< USART0 IR consumer. */
891 prsConsumerUSART0_RX = offsetof(PRS_TypeDef, CONSUMER_USART0_RX), /**< USART0 RX consumer. */
892 prsConsumerUSART0_TRIGGER = offsetof(PRS_TypeDef, CONSUMER_USART0_TRIGGER), /**< USART0 trigger consumer. */
893 #endif
894 #if defined(USART1)
895 prsConsumerUSART1_CLK = offsetof(PRS_TypeDef, CONSUMER_USART1_CLK), /**< USART1 clock consumer. */
896 prsConsumerUSART1_IR = offsetof(PRS_TypeDef, CONSUMER_USART1_IR), /**< USART1 IR consumer. */
897 prsConsumerUSART1_RX = offsetof(PRS_TypeDef, CONSUMER_USART1_RX), /**< USART1 TX consumer. */
898 prsConsumerUSART1_TRIGGER = offsetof(PRS_TypeDef, CONSUMER_USART1_TRIGGER), /**< USART1 trigger consumer. */
899 #endif
900 #if defined(USART2)
901 prsConsumerUSART2_CLK = offsetof(PRS_TypeDef, CONSUMER_USART2_CLK), /**< USART2 clock consumer. */
902 prsConsumerUSART2_IR = offsetof(PRS_TypeDef, CONSUMER_USART2_IR), /**< USART2 IR consumer. */
903 prsConsumerUSART2_RX = offsetof(PRS_TypeDef, CONSUMER_USART2_RX), /**< USART2 RX consumer. */
904 prsConsumerUSART2_TRIGGER = offsetof(PRS_TypeDef, CONSUMER_USART2_TRIGGER), /**< USART2 trigger consumer. */
905 #endif
906 #if defined(EUSART0)
907 prsConsumerEUSART0_CLK = offsetof(PRS_TypeDef, CONSUMER_EUSART0_CLK), /**< EUSART0 clk consumer. */
908 prsConsumerEUSART0_RX = offsetof(PRS_TypeDef, CONSUMER_EUSART0_RX), /**< EUSART0 RX consumer. */
909 prsConsumerEUSART0_TRIGGER = offsetof(PRS_TypeDef, CONSUMER_EUSART0_TRIGGER), /**< EUSART0 trigger consumer. */
910 #endif
911 #if defined(EUSART1)
912 prsConsumerEUSART1_CLK = offsetof(PRS_TypeDef, CONSUMER_EUSART1_CLK), /**< EUSART1 clk consumer. */
913 prsConsumerEUSART1_RX = offsetof(PRS_TypeDef, CONSUMER_EUSART1_RX), /**< EUSART1 RX consumer. */
914 prsConsumerEUSART1_TRIGGER = offsetof(PRS_TypeDef, CONSUMER_EUSART1_TRIGGER), /**< EUSART1 trigger consumer. */
915 #endif
916 #if defined(EUSART2)
917 prsConsumerEUSART2_CLK = offsetof(PRS_TypeDef, CONSUMER_EUSART2_CLK), /**< EUSART1 clk consumer. */
918 prsConsumerEUSART2_RX = offsetof(PRS_TypeDef, CONSUMER_EUSART2_RX), /**< EUSART2 RX consumer. */
919 prsConsumerEUSART2_TRIGGER = offsetof(PRS_TypeDef, CONSUMER_EUSART2_TRIGGER), /**< EUSART2 trigger consumer. */
920 #endif
921 #if defined(EUSART3)
922 prsConsumerEUSART3_RX = offsetof(PRS_TypeDef, CONSUMER_EUSART3_RX), /**< EUSART3 RX consumer. */
923 prsConsumerEUSART3_TRIGGER = offsetof(PRS_TypeDef, CONSUMER_EUSART3_TRIGGER), /**< EUSART3 trigger consumer. */
924 #endif
925 #if defined(EUSART4)
926 prsConsumerEUSART4_RX = offsetof(PRS_TypeDef, CONSUMER_EUSART4_RX), /**< EUSART4 RX consumer. */
927 prsConsumerEUSART4_TRIGGER = offsetof(PRS_TypeDef, CONSUMER_EUSART4_TRIGGER), /**< EUSART4 trigger consumer. */
928 #endif
929 #if defined(EUART0)
930 prsConsumerEUART0_RX = offsetof(PRS_TypeDef, CONSUMER_EUART0_RX), /**< EUART0 RX consumer. */
931 prsConsumerEUART0_TRIGGER = offsetof(PRS_TypeDef, CONSUMER_EUART0_TRIGGER), /**< EUART0 TRIGGER Consumer. */
932 #endif
933 prsConsumerWDOG0_SRC0 = offsetof(PRS_TypeDef, CONSUMER_WDOG0_SRC0), /**< WDOG0 source 0 consumer. */
934 prsConsumerWDOG0_SRC1 = offsetof(PRS_TypeDef, CONSUMER_WDOG0_SRC1), /**< WDOG0 source 1 consumer. */
935 #if defined(WDOG1)
936 prsConsumerWDOG1_SRC0 = offsetof(PRS_TypeDef, CONSUMER_WDOG1_SRC0), /**< WDOG1 source 0 consumer. */
937 prsConsumerWDOG1_SRC1 = offsetof(PRS_TypeDef, CONSUMER_WDOG1_SRC1), /**< WDOG1 source 1 consumer. */
938 #endif
939 #if defined(PCNT0)
940 prsConsumerPCNT0_IN0 = offsetof(PRS_TypeDef, CONSUMER_PCNT0_S0IN), /**< PCNT0 input 0 consumer. */
941 prsConsumerPCNT0_IN1 = offsetof(PRS_TypeDef, CONSUMER_PCNT0_S1IN), /**< PCNT0 input 1 consumer. */
942 #endif
943 #if defined(_PRS_CONSUMER_RTCC_CC2_MASK)
944 prsConsumerRTCC_CC0 = offsetof(PRS_TypeDef, CONSUMER_RTCC_CC0), /**< RTCC capture/compare channel 0 consumer. */
945 prsConsumerRTCC_CC1 = offsetof(PRS_TypeDef, CONSUMER_RTCC_CC1), /**< RTCC capture/compare channel 1 consumer. */
946 prsConsumerRTCC_CC2 = offsetof(PRS_TypeDef, CONSUMER_RTCC_CC2), /**< RTCC capture/compare channel 2 consumer. */
947 #endif
948 #if defined(SYSRTC0)
949 prsConsumerSYSRTC0_SRC0 = offsetof(PRS_TypeDef, CONSUMER_SYSRTC0_IN0), /**< SYSRTC0 input 0 consumer. */
950 prsConsumerSYSRTC0_SRC1 = offsetof(PRS_TypeDef, CONSUMER_SYSRTC0_IN1), /**< SYSRTC0 input 1 consumer. */
951 #endif
952 #if defined(_PRS_CONSUMER_HFXO0_OSCREQ_MASK)
953 prsConsumerHFXO0_OSCREQ = offsetof(PRS_TypeDef, CONSUMER_HFXO0_OSCREQ), /**< OSCREQ consumer. */
954 prsConsumerHFXO0_TIMEOUT = offsetof(PRS_TypeDef, CONSUMER_HFXO0_TIMEOUT), /**< HFXO0_TIMEOUT consumer. */
955 #endif
956 #if defined(LESENSE)
957 prsConsumerLESENSE_START = offsetof(PRS_TypeDef, CONSUMER_LESENSE_START), /**< LESENSE_START consumer. */
958 #endif
959 #if defined(VDAC0)
960 prsConsumerVDAC0_ASYNCTRIGCH0 = offsetof(PRS_TypeDef, CONSUMER_VDAC0_ASYNCTRIGCH0), /**< VDAC0 ASYNC TRIGER CH0 consumer. */
961 prsConsumerVDAC0_ASYNCTRIGCH1 = offsetof(PRS_TypeDef, CONSUMER_VDAC0_ASYNCTRIGCH1), /**< VDAC0 ASYNC TRIGER CH1 consumer. */
962 prsConsumerVDAC0_SYNCTRIGCH0 = offsetof(PRS_TypeDef, CONSUMER_VDAC0_SYNCTRIGCH0), /**< VDAC0 SYNC TRIGER CH0 consumer. */
963 prsConsumerVDAC0_SYNCTRIGCH1 = offsetof(PRS_TypeDef, CONSUMER_VDAC0_SYNCTRIGCH1), /**< VDAC0 SYNC TRIGER CH1 consumer. */
964 #endif
965 #if defined(VDAC1)
966 prsConsumerVDAC1_ASYNCTRIGCH0 = offsetof(PRS_TypeDef, CONSUMER_VDAC1_ASYNCTRIGCH0), /**< VDAC1 ASYNC TRIGER CH0 consumer. */
967 prsConsumerVDAC1_ASYNCTRIGCH1 = offsetof(PRS_TypeDef, CONSUMER_VDAC1_ASYNCTRIGCH1), /**< VDAC1 ASYNC TRIGER CH1 consumer. */
968 prsConsumerVDAC1_SYNCTRIGCH0 = offsetof(PRS_TypeDef, CONSUMER_VDAC1_SYNCTRIGCH0), /**< VDAC1 SYNC TRIGER CH0 consumer. */
969 prsConsumerVDAC1_SYNCTRIGCH1 = offsetof(PRS_TypeDef, CONSUMER_VDAC1_SYNCTRIGCH1), /**< VDAC1 SYNC TRIGER CH1 consumer. */
970 #endif
971 } PRS_Consumer_t;
972 #endif
973
974 /*******************************************************************************
975 ***************************** PROTOTYPES **********************************
976 ******************************************************************************/
977
978 /***************************************************************************//**
979 * @brief
980 * Set level control bit for one or more channels.
981 *
982 * @details
983 * The level value for a channel is XORed with both the pulse possibly issued
984 * by PRS_PulseTrigger() and the PRS input signal selected for the channel(s).
985 *
986 * @cond DOXYDOC_S2_DEVICE
987 * @note
988 * Note that software level control is only available for asynchronous
989 * channels on Series 2 devices.
990 * @endcond
991 *
992 * @param[in] level
993 * Level to use for channels indicated by @p mask. Use logical OR combination
994 * of PRS_SWLEVEL_CHnLEVEL defines for channels to set high level, otherwise 0.
995 *
996 * @param[in] mask
997 * Mask indicating which channels to set level for. Use logical OR combination
998 * of PRS_SWLEVEL_CHnLEVEL defines.
999 ******************************************************************************/
PRS_LevelSet(uint32_t level,uint32_t mask)1000 __STATIC_INLINE void PRS_LevelSet(uint32_t level, uint32_t mask)
1001 {
1002 #if defined(_PRS_SWLEVEL_MASK)
1003 PRS->SWLEVEL = (PRS->SWLEVEL & ~mask) | (level & mask);
1004 #else
1005 PRS->ASYNC_SWLEVEL = (PRS->ASYNC_SWLEVEL & ~mask) | (level & mask);
1006 #endif
1007 }
1008
1009 /***************************************************************************//**
1010 * @brief
1011 * Get level control bit for all channels.
1012 *
1013 * @return
1014 * The current software level configuration.
1015 ******************************************************************************/
PRS_LevelGet(void)1016 __STATIC_INLINE uint32_t PRS_LevelGet(void)
1017 {
1018 #if defined(_PRS_SWLEVEL_MASK)
1019 return PRS->SWLEVEL;
1020 #else
1021 return PRS->ASYNC_SWLEVEL;
1022 #endif
1023 }
1024
1025 #if defined(_PRS_ASYNC_PEEK_MASK) || defined(_PRS_PEEK_MASK)
1026 /***************************************************************************//**
1027 * @brief
1028 * Get the PRS channel values for all channels.
1029 *
1030 * @param[in] type
1031 * PRS channel type. This can be either @ref prsTypeAsync or
1032 * @ref prsTypeSync.
1033 *
1034 * @return
1035 * The current PRS channel output values for all channels as a bitset.
1036 ******************************************************************************/
PRS_Values(PRS_ChType_t type)1037 __STATIC_INLINE uint32_t PRS_Values(PRS_ChType_t type)
1038 {
1039 #if defined(_PRS_ASYNC_PEEK_MASK)
1040 if (type == prsTypeAsync) {
1041 return PRS->ASYNC_PEEK;
1042 } else {
1043 return PRS->SYNC_PEEK;
1044 }
1045 #else
1046 (void) type;
1047 return PRS->PEEK;
1048 #endif
1049 }
1050
1051 /***************************************************************************//**
1052 * @brief
1053 * Get the PRS channel value for a single channel.
1054 *
1055 * @param[in] ch
1056 * PRS channel number.
1057 *
1058 * @param[in] type
1059 * PRS channel type. This can be either @ref prsTypeAsync or
1060 * @ref prsTypeSync.
1061 *
1062 * @return
1063 * The current PRS channel output value. This is either 0 or 1.
1064 ******************************************************************************/
PRS_ChannelValue(unsigned int ch,PRS_ChType_t type)1065 __STATIC_INLINE bool PRS_ChannelValue(unsigned int ch, PRS_ChType_t type)
1066 {
1067 return (PRS_Values(type) >> ch) & 0x1U;
1068 }
1069 #endif
1070
1071 /***************************************************************************//**
1072 * @brief
1073 * Trigger a high pulse (one HFPERCLK) for one or more channels.
1074 *
1075 * @details
1076 * Setting a bit for a channel causes the bit in the register to remain high
1077 * for one HFPERCLK cycle. Pulse is XORed with both the corresponding bit
1078 * in PRS SWLEVEL register and the PRS input signal selected for the
1079 * channel(s).
1080 *
1081 * @param[in] channels
1082 * Logical ORed combination of channels to trigger a pulse for. Use
1083 * PRS_SWPULSE_CHnPULSE defines.
1084 ******************************************************************************/
PRS_PulseTrigger(uint32_t channels)1085 __STATIC_INLINE void PRS_PulseTrigger(uint32_t channels)
1086 {
1087 #if defined(_PRS_SWPULSE_MASK)
1088 PRS->SWPULSE = channels & _PRS_SWPULSE_MASK;
1089 #else
1090 PRS->ASYNC_SWPULSE = channels & _PRS_ASYNC_SWPULSE_MASK;
1091 #endif
1092 }
1093
1094 /***************************************************************************//**
1095 * @brief
1096 * Set the PRS channel level for one asynchronous PRS channel.
1097 *
1098 * @param[in] ch
1099 * PRS channel number.
1100 *
1101 * @param[in] level
1102 * true to set the level high (1) and false to set the level low (0).
1103 ******************************************************************************/
PRS_ChannelLevelSet(unsigned int ch,bool level)1104 __STATIC_INLINE void PRS_ChannelLevelSet(unsigned int ch, bool level)
1105 {
1106 PRS_LevelSet((uint32_t) level << ch, 0x1UL << ch);
1107 }
1108
1109 /***************************************************************************//**
1110 * @brief
1111 * Trigger a pulse on one PRS channel.
1112 *
1113 * @param[in] ch
1114 * PRS channel number.
1115 ******************************************************************************/
PRS_ChannelPulse(unsigned int ch)1116 __STATIC_INLINE void PRS_ChannelPulse(unsigned int ch)
1117 {
1118 PRS_PulseTrigger(0x1UL << ch);
1119 }
1120
1121 void PRS_SourceSignalSet(unsigned int ch,
1122 uint32_t source,
1123 uint32_t signal,
1124 PRS_Edge_TypeDef edge);
1125
1126 #if defined(PRS_ASYNC_SUPPORTED)
1127 void PRS_SourceAsyncSignalSet(unsigned int ch,
1128 uint32_t source,
1129 uint32_t signal);
1130 #endif
1131 #if defined(_PRS_ROUTELOC0_MASK) || (_PRS_ROUTE_MASK)
1132 void PRS_GpioOutputLocation(unsigned int ch,
1133 unsigned int location);
1134 #endif
1135
1136 int PRS_GetFreeChannel(PRS_ChType_t type);
1137 void PRS_Reset(void);
1138 void PRS_ConnectSignal(unsigned int ch, PRS_ChType_t type, PRS_Signal_t signal);
1139 #if defined(_SILICON_LABS_32B_SERIES_2)
1140 uint32_t PRS_ConvertToSyncSource(uint32_t asyncSource);
1141 uint32_t PRS_ConvertToSyncSignal(uint32_t asyncSource, uint32_t asyncSignal);
1142 void PRS_ConnectConsumer(unsigned int ch, PRS_ChType_t type, PRS_Consumer_t consumer);
1143 void PRS_PinOutput(unsigned int ch, PRS_ChType_t type, GPIO_Port_TypeDef port, uint8_t pin);
1144 void PRS_Combine(unsigned int chA, unsigned int chB, PRS_Logic_t logic);
1145 #endif
1146
1147 /** @} (end addtogroup prs) */
1148
1149 #ifdef __cplusplus
1150 }
1151 #endif
1152
1153 #endif /* defined(PRS_COUNT) && (PRS_COUNT > 0) */
1154 #endif /* EM_PRS_H */
1155