PIC24 Support Libraries
esos_pic24_irq.h
Go to the documentation of this file.
1 /*
2  * "Copyright (c) 2008 Robert B. Reese, Bryan A. Jones, J. W. Bruce ("AUTHORS")"
3  * All rights reserved.
4  * (R. Reese, reese_AT_ece.msstate.edu, Mississippi State University)
5  * (B. A. Jones, bjones_AT_ece.msstate.edu, Mississippi State University)
6  * (J. W. Bruce, jwbruce_AT_ece.msstate.edu, Mississippi State University)
7  *
8  * Permission to use, copy, modify, and distribute this software and its
9  * documentation for any purpose, without fee, and without written agreement is
10  * hereby granted, provided that the above copyright notice, the following
11  * two paragraphs and the authors appear in all copies of this software.
12  *
13  * IN NO EVENT SHALL THE "AUTHORS" BE LIABLE TO ANY PARTY FOR
14  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
15  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE "AUTHORS"
16  * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17  *
18  * THE "AUTHORS" SPECIFICALLY DISCLAIMS ANY WARRANTIES,
19  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
20  * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
21  * ON AN "AS IS" BASIS, AND THE "AUTHORS" HAS NO OBLIGATION TO
22  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
23  *
24  * Please maintain this header in its entirety when copying/modifying
25  * these files.
26  *
27  *
28  */
29 
30 /** \file
31  * \brief This file contains macros, prototypes, and definitions for
32  * Microchip PIC24 family specific interrupts on ESOS
33  */
34 
35 /************************************************************************
36  * esos_pic24_irq.h
37  ************************************************************************
38  * User-supplied include file which defines the IRQ which are supported
39  *
40  * NOTE: the file must be consistent with esos_pic24_irq.c which uses
41  * many of these constant to manipulate IRQ registers
42  */
43 
44 #ifndef ESOS_PIC24_IRQ_H
45 #define ESOS_PIC24_IRQ_H
46 
47 #include "esos.h"
48 #include "esos_irq.h"
49 #include "esos_pic24.h"
50 
51 
52 /**
53  * Declaration of an ESOS interrupt.
54  *
55  * This macro is used to declare an ESOS user inerrupt. All ESOS user
56  * interrupt tasks must be declared with this macro.
57  *
58  * \param desc Descriptor of the hardware interrupt
59  *
60  * \note ESOS user interrupts have no arguments passed in and cannot return values.
61  * \note Hardware interrupt descriptors are found in the file <b>esos_<i>hw</i>_irq.h</b>
62  * where <i>hw</i> is the name of the chip for the ESOS port has been written.
63  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
64  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
65  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
66  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
67  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
68  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
69  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
70  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
71  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
72  *
73  * \hideinitializer
74  */
75 #define ESOS_USER_INTERRUPT(desc) __xESOS_USER_ISR(desc)
76 #define __xESOS_USER_ISR(attrib, ivt, ifsr, ifsb, ipcr, ipcb) void _ISRFAST attrib (void)
77 
78 
79 
80 /*
81  * Define the ESOS user IRQ levels here
82  * ESOS-based IRQs will run at IRQ priority levels
83  * 7 and 5.
84  *
85  * NOTE: Any user IRQ with its IRQ priority level at 0 signifies
86  * that the IRQ is not registered with ESOS.
87  */
88 /**
89  * Highest priority user interrupt level on PIC24 Family
90  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
91  * \hideinitializer
92  */
93 #define ESOS_USER_IRQ_LEVEL1 6
94 /**
95  * Second-highest priority user interrupt level on PIC24 Family
96  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
97  * \hideinitializer
98  */
99 #define ESOS_USER_IRQ_LEVEL2 4
100 /**
101  * Third-highest priority user interrupt level on PIC24 Family
102  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
103  * \hideinitializer
104  */
105 #define ESOS_USER_IRQ_LEVEL3 3
106 /**
107  * Lowest priority user interrupt level on PIC24 Family
108  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
109  * \hideinitializer
110  */
111 #define ESOS_USER_IRQ_LEVEL4 2
112 
113 #define __ESOS_USER_IRQ_UNREGISTERED 0
114 // this #define is the IPL that will disabled all user IRQs at once
115 #define __ESOS_DISABLE_USER_IRQS_LEVEL ESOS_USER_IRQ_LEVEL2
116 // this #define is the IPL that will enabled all user IRQs at once
117 #define __ESOS_ENABLE_USER_IRQS_LEVEL __ESOS_USER_IRQ_UNREGISTERED
118 
119 /********************************************************
120 *** IRQ masks for the PIC24/dsPIC33 chips
121 ***
122 *** The old verion (<= rev 511) defined thes interrupt
123 *** based on the compiler target device. This rewrite
124 *** (6 SEPT 2014) will attempt to diagnose whether the
125 *** target devices possesses each interrupt by checking
126 *** for the existence of the appropriate interrupt flag
127 ***
128 *** TODO: make a thorough search through the datasheets
129 *** for all device families, models, etc to make
130 *** sure Microchip did NOT change the name of these
131 *** interrupt flags over the years. (They have
132 *** a nasty habit of doing that quietly when new
133 *** chips come out.)
134 ***
135 *** MNEMONIC C30 ISR ATTRIB, IVT addr, IFS register, IFS bit, IPC register, IPC bit
136 *** see Interrupt Vector Details table in FRM or datasheets
137 *********************************************************/
138 
139 /**********************************************************************
140 *** EXTERNAL ASYNCHRONOUS INTERRUPTS
141 **********************************************************************/
142 #if (defined(_INT0IF))
143 /**
144  * External INT0 Interrupt (User interrupt descriptor)
145  * \sa ESOS_USER_INTERRUPT
146  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
147  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
148  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
149  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
150  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
151  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
152  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
153  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
154  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
155  * \hideinitializer
156  */
157 #define ESOS_IRQ_PIC24_INT0 _INT0Interrupt, 0x0014, 0, 0, 0, 0 // external interrupt 0
158 #endif
159 
160 #if (defined(_INT1IF))
161 /**
162  * External INT1 Interrupt (User interrupt descriptor)
163  * \sa ESOS_USER_INTERRUPT
164  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
165  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
166  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
167  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
168  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
169  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
170  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
171  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
172  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
173  * \hideinitializer
174  */
175 #define ESOS_IRQ_PIC24_INT1 _INT1Interrupt, 0x003C, 1, 4, 5, 0 // external interrupt 1
176 #endif
177 
178 #if (defined(_INT2IF))
179 /**
180  * External INT2 Interrupt (User interrupt descriptor)
181  * \sa ESOS_USER_INTERRUPT
182  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
183  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
184  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
185  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
186  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
187  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
188  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
189  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
190  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
191  * \hideinitializer
192  */
193 #define ESOS_IRQ_PIC24_INT2 _INT2Interrupt, 0x004E, 1, 13, 7, 4 // external interrupt 2
194 #endif
195 
196 #if (defined(_INT3IF))
197 /**
198  * External INT3 Interrupt (User interrupt descriptor)
199  * \sa ESOS_USER_INTERRUPT
200  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
201  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
202  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
203  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
204  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
205  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
206  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
207  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
208  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
209  * \hideinitializer
210  */
211 #define ESOS_IRQ_PIC24_INT3 _INT3Interrupt, 0x007E, 3, 5, 13, 4 // external interrupt 3
212 #endif
213 
214 #if (defined(_INT4IF))
215 /**
216  * External INT4 Interrupt (User interrupt descriptor)
217  * \sa ESOS_USER_INTERRUPT
218  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
219  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
220  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
221  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
222  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
223  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
224  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
225  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
226  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
227  * \hideinitializer
228  */
229 #define ESOS_IRQ_PIC24_INT4 _INT4Interrupt, 0x0080, 3, 6, 13, 8 // external interrupt 4
230 #endif
231 
232 /**********************************************************************
233 *** INPUT CAPTURES
234 **********************************************************************/
235 #if (defined(_IC1IF))
236 /**
237  * Input Capture 1 Interrupt (User interrupt descriptor)
238  * \sa ESOS_USER_INTERRUPT
239  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
240  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
241  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
242  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
243  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
244  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
245  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
246  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
247  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
248  * \hideinitializer
249  */
250 #define ESOS_IRQ_PIC24_IC1 _IC1Interrupt, 0x0016, 0, 1, 0, 4 // Input capture channel 1
251 #endif
252 
253 #if (defined(_IC2IF))
254 /**
255  * Input Capture 2 Interrupt (User interrupt descriptor)
256  * \sa ESOS_USER_INTERRUPT
257  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
258  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
259  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
260  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
261  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
262  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
263  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
264  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
265  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
266  * \hideinitializer
267  */
268 #define ESOS_IRQ_PIC24_IC2 _IC2Interrupt, 0x001E, 0, 5, 1, 4 // Input capture channel 2
269 #endif
270 
271 
272 #if (defined(_IC3IF))
273 /**
274  * Input Capture 3 Interrupt (User interrupt descriptor)
275  * \sa ESOS_USER_INTERRUPT
276  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
277  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
278  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
279  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
280  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
281  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
282  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
283  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
284  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
285  * \hideinitializer
286  */
287 #define ESOS_IRQ_PIC24_IC3 _IC3Interrupt, 0x005E, 2, 5, 9, 4 // Input Capture 3
288 #endif
289 
290 #if (defined(_IC4IF))
291 /**
292  * Input Capture 4 Interrupt (User interrupt descriptor)
293  * \sa ESOS_USER_INTERRUPT
294  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
295  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
296  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
297  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
298  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
299  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
300  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
301  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
302  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
303  * \hideinitializer
304  */
305 #define ESOS_IRQ_PIC24_IC4 _IC4Interrupt, 0x0060, 2, 6, 9, 8 // Input Capture 4
306 #endif
307 
308 #if (defined(_IC5IF))
309 /**
310  * Input Capture 5 Interrupt (User interrupt descriptor)
311  * \sa ESOS_USER_INTERRUPT
312  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
313  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
314  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
315  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
316  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
317  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
318  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
319  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
320  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
321  * \hideinitializer
322  */
323 #define ESOS_IRQ_PIC24_IC5 _IC5Interrupt, 0x0062, 2, 7, 9, 12 // Input capture channel 5
324 #endif
325 
326 #if (defined(_IC6IF))
327 /**
328  * Input Capture 6 Interrupt (User interrupt descriptor)
329  * \sa ESOS_USER_INTERRUPT
330  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
331  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
332  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
333  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
334  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
335  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
336  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
337  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
338  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
339  * \hideinitializer
340  */
341 #define ESOS_IRQ_PIC24_IC6 _IC6Interrupt, 0x0064, 2, 8, 10, 0 // Input capture channel 6
342 #endif
343 
344 #if (defined(_IC7IF))
345 /**
346  * Input Capture 7 Interrupt (User interrupt descriptor)
347  * \sa ESOS_USER_INTERRUPT
348  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
349  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
350  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
351  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
352  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
353  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
354  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
355  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
356  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
357  * \hideinitializer
358  */
359 #define ESOS_IRQ_PIC24_IC7 _IC7Interrupt, 0x0040, 1, 6, 5, 8 // Input capture channel 7
360 #endif
361 
362 #if (defined(_IC8IF))
363 /**
364  * Input Capture 8 Interrupt (User interrupt descriptor)
365  * \sa ESOS_USER_INTERRUPT
366  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
367  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
368  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
369  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
370  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
371  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
372  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
373  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
374  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
375  * \hideinitializer
376  */
377 #define ESOS_IRQ_PIC24_IC8 _IC8Interrupt, 0x0042, 1, 7, 5, 12 // Input capture channel 8
378 #endif
379 
380 #if (defined(_IC9IF))
381 /**
382  * Input Capture 9 Interrupt (User interrupt descriptor)
383  * \sa ESOS_USER_INTERRUPT
384  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
385  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
386  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
387  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
388  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
389  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
390  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
391  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
392  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
393  * \hideinitializer
394  */
395 #define ESOS_IRQ_PIC24_IC9 _IC9Interrupt, 0x00CE, 5, 13, 23, 4 // Input capture channel 9
396 #endif
397 
398 #if (defined(_IC10IF))
399 /**
400  * Input Capture 10 Interrupt (User interrupt descriptor)
401  * \sa ESOS_USER_INTERRUPT
402  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
403  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
404  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
405  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
406  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
407  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
408  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
409  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
410  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
411  * \hideinitializer
412  */
413 #define ESOS_IRQ_PIC24_IC10 _IC10Interrupt, 0x0010E, 7, 13, 31, 4 // Input capture channel 10
414 #endif
415 
416 #if (defined(_IC11IF))
417 /**
418  * Input Capture 11 Interrupt (User interrupt descriptor)
419  * \sa ESOS_USER_INTERRUPT
420  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
421  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
422  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
423  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
424  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
425  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
426  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
427  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
428  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
429  * \hideinitializer
430  */
431 #define ESOS_IRQ_PIC24_IC11 _IC11Interrupt, 0x0112, 7, 15, 31, 12 // Input capture channel 11
432 #endif
433 
434 #if (defined(_IC12IF))
435 /**
436  * Input Capture 12 Interrupt (User interrupt descriptor)
437  * \sa ESOS_USER_INTERRUPT
438  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
439  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
440  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
441  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
442  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
443  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
444  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
445  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
446  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
447  * \hideinitializer
448  */
449 #define ESOS_IRQ_PIC24_IC12 _IC12Interrupt, 0x0116, 8, 1, 32, 4 // Input capture channel 12
450 #endif
451 
452 #if (defined(_IC13IF))
453 /**
454  * Input Capture 13 Interrupt (User interrupt descriptor)
455  * \sa ESOS_USER_INTERRUPT
456  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
457  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
458  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
459  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
460  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
461  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
462  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
463  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
464  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
465  * \hideinitializer
466  */
467 #define ESOS_IRQ_PIC24_IC13 _IC13Interrupt, 0x0122, 8, 7, 33, 12 // Input capture channel 13
468 #endif
469 
470 #if (defined(_IC14IF))
471 /**
472  * Input Capture 14 Interrupt (User interrupt descriptor)
473  * \sa ESOS_USER_INTERRUPT
474  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
475  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
476  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
477  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
478  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
479  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
480  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
481  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
482  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
483  * \hideinitializer
484  */
485 #define ESOS_IRQ_PIC24_IC14 _IC14Interrupt, 0x0126, 8, 9, 34, 4 // Input capture channel 14
486 #endif
487 
488 #if (defined(_IC15IF))
489 /**
490  * Input Capture 15 Interrupt (User interrupt descriptor)
491  * \sa ESOS_USER_INTERRUPT
492  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
493  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
494  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
495  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
496  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
497  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
498  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
499  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
500  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
501  * \hideinitializer
502  */
503 #define ESOS_IRQ_PIC24_IC15 _IC15Interrupt, 0x012A, 8, 11, 34, 12 // Input capture channel 15
504 #endif
505 
506 #if (defined(_IC16IF))
507 /**
508  * Input Capture 16 Interrupt (User interrupt descriptor)
509  * \sa ESOS_USER_INTERRUPT
510  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
511  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
512  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
513  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
514  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
515  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
516  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
517  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
518  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
519  * \hideinitializer
520  */
521 #define ESOS_IRQ_PIC24_IC16 _IC16Interrupt, 0x012E, 8, 13, 35, 4 // Input capture channel 16
522 #endif
523 
524 /**********************************************************************
525 *** OUTPUT COMPARES
526 **********************************************************************/
527 #if (defined(_OC1IF))
528 /**
529  * Output Compare 1 Interrupt (User interrupt descriptor)
530  * \sa ESOS_USER_INTERRUPT
531  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
532  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
533  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
534  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
535  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
536  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
537  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
538  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
539  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
540  * \hideinitializer
541  */
542 #define ESOS_IRQ_PIC24_OC1 _OC1Interrupt, 0x0018, 0, 2, 0, 8 // Output compare channel 1
543 #endif
544 
545 #if (defined(_OC2IF))
546 /**
547  * Output Compare 2 Interrupt (User interrupt descriptor)
548  * \sa ESOS_USER_INTERRUPT
549  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
550  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
551  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
552  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
553  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
554  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
555  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
556  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
557  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
558  * \hideinitializer
559  */
560 #define ESOS_IRQ_PIC24_OC2 _OC2Interrupt, 0x0020, 0, 6, 1, 8 // Output compare channel 2
561 #endif
562 
563 #if (defined(_OC3IF))
564 /**
565  * Output Compare 3 Interrupt (User interrupt descriptor)
566  * \sa ESOS_USER_INTERRUPT
567  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
568  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
569  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
570  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
571  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
572  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
573  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
574  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
575  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
576  * \hideinitializer
577  */
578 #define ESOS_IRQ_PIC24_OC3 _OC3Interrupt, 0x0046, 1, 9, 6, 4 // Output Compare 3
579 #endif
580 
581 #if (defined(_OC4IF))
582 /**
583  * Output Compare 4 Interrupt (User interrupt descriptor)
584  * \sa ESOS_USER_INTERRUPT
585  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
586  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
587  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
588  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
589  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
590  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
591  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
592  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
593  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
594  * \hideinitializer
595  */
596 #define ESOS_IRQ_PIC24_OC4 _OC4Interrupt, 0x0048, 1, 10, 6, 8 // Output Compare 4
597 #endif
598 
599 #if (defined(_OC5IF))
600 /**
601  * Output Compare 5 Interrupt (User interrupt descriptor)
602  * \sa ESOS_USER_INTERRUPT
603  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
604  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
605  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
606  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
607  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
608  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
609  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
610  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
611  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
612  * \hideinitializer
613  */
614 #define ESOS_IRQ_PIC24_OC5 _OC5Interrupt, 0x0066, 2, 9, 10, 4 // Output compare channel 5
615 #endif
616 
617 #if (defined(_OC6IF))
618 /**
619  * Output Compare 6 Interrupt (User interrupt descriptor)
620  * \sa ESOS_USER_INTERRUPT
621  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
622  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
623  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
624  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
625  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
626  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
627  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
628  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
629  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
630  * \hideinitializer
631  */
632 #define ESOS_IRQ_PIC24_OC6 _OC6Interrupt, 0x0068, 2, 10, 10, 8 // Output compare channel 6
633 #endif
634 
635 #if (defined(_OC7IF))
636 /**
637  * Output Compare 7 Interrupt (User interrupt descriptor)
638  * \sa ESOS_USER_INTERRUPT
639  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
640  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
641  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
642  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
643  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
644  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
645  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
646  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
647  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
648  * \hideinitializer
649  */
650 #define ESOS_IRQ_PIC24_OC7 _OC7Interrupt, 0x006A, 2, 11, 10, 12 // Output compare channel 7
651 #endif
652 
653 #if (defined(_OC8IF))
654 /**
655  * Output Compare 8 Interrupt (User interrupt descriptor)
656  * \sa ESOS_USER_INTERRUPT
657  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
658  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
659  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
660  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
661  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
662  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
663  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
664  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
665  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
666  * \hideinitializer
667  */
668 #define ESOS_IRQ_PIC24_OC8 _OC8Interrupt, 0x006C, 2, 12, 11, 0 // Output compare channel 8
669 #endif
670 
671 #if (defined(_OC9IF))
672 /**
673  * Output Compare 9 Interrupt (User interrupt descriptor)
674  * \sa ESOS_USER_INTERRUPT
675  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
676  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
677  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
678  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
679  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
680  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
681  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
682  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
683  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
684  * \hideinitializer
685  */
686 #define ESOS_IRQ_PIC24_OC9 _OC9Interrupt, 0x00CC, 5, 12, 23, 0 // Output compare channel 9
687 #endif
688 
689 #if (defined(_OC10IF))
690 /**
691  * Output Compare 10 Interrupt (User interrupt descriptor)
692  * \sa ESOS_USER_INTERRUPT
693  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
694  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
695  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
696  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
697  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
698  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
699  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
700  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
701  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
702  * \hideinitializer
703  */
704 #define ESOS_IRQ_PIC24_OC10 _OC10Interrupt, 0x010C, 7, 12, 31, 0 // Output compare channel 10
705 #endif
706 
707 #if (defined(_OC11IF))
708 /**
709  * Output Compare 11 Interrupt (User interrupt descriptor)
710  * \sa ESOS_USER_INTERRUPT
711  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
712  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
713  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
714  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
715  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
716  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
717  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
718  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
719  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
720  * \hideinitializer
721  */
722 #define ESOS_IRQ_PIC24_OC11 _OC11Interrupt, 0x0110, 7, 14, 31, 8 // Output compare channel 11
723 #endif
724 
725 #if (defined(_OC12IF))
726 /**
727  * Output Compare 12 Interrupt (User interrupt descriptor)
728  * \sa ESOS_USER_INTERRUPT
729  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
730  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
731  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
732  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
733  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
734  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
735  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
736  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
737  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
738  * \hideinitializer
739  */
740 #define ESOS_IRQ_PIC24_OC12 _OC12Interrupt, 0x0114, 8, 0, 32, 0 // Output compare channel 12
741 #endif
742 
743 #if (defined(_OC13IF))
744 /**
745  * Output Compare 13 Interrupt (User interrupt descriptor)
746  * \sa ESOS_USER_INTERRUPT
747  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
748  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
749  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
750  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
751  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
752  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
753  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
754  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
755  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
756  * \hideinitializer
757  */
758 #define ESOS_IRQ_PIC24_OC13 _OC13Interrupt, 0x0120, 8, 6, 33, 8 // Output compare channel 13
759 #endif
760 
761 #if (defined(_OC14IF))
762 /**
763  * Output Compare 14 Interrupt (User interrupt descriptor)
764  * \sa ESOS_USER_INTERRUPT
765  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
766  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
767  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
768  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
769  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
770  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
771  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
772  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
773  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
774  * \hideinitializer
775  */
776 #define ESOS_IRQ_PIC24_OC14 _OC14Interrupt, 0x0124, 8, 8, 34, 0 // Output compare channel 14
777 #endif
778 
779 #if (defined(_OC15IF))
780 /**
781  * Output Compare 15 Interrupt (User interrupt descriptor)
782  * \sa ESOS_USER_INTERRUPT
783  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
784  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
785  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
786  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
787  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
788  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
789  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
790  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
791  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
792  * \hideinitializer
793  */
794 #define ESOS_IRQ_PIC24_OC15 _OC15Interrupt, 0x0128, 8, 10, 34, 8 // Output compare channel 15
795 #endif
796 
797 #if (defined(_OC16IF))
798 /**
799  * Output Compare 16 Interrupt (User interrupt descriptor)
800  * \sa ESOS_USER_INTERRUPT
801  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
802  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
803  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
804  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
805  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
806  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
807  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
808  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
809  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
810  * \hideinitializer
811  */
812 #define ESOS_IRQ_PIC24_OC16 _OC16Interrupt, 0x012C, 8, 12, 35, 0 // Output compare channel 16
813 #endif
814 
815 /**********************************************************************
816 *** TIMERS
817 **********************************************************************/
818 // NOTE: TIMER 1 interrupt descriptor is NOT defined as ESOS
819 // uses this timer for the system tick!
820 
821 #if (defined(_T2IF))
822 /**
823  * Timer 2 Expiration Interrupt (User interrupt descriptor)
824  * \sa ESOS_USER_INTERRUPT
825  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
826  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
827  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
828  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
829  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
830  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
831  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
832  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
833  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
834  * \hideinitializer
835  */
836 #define ESOS_IRQ_PIC24_T2 _T2Interrupt, 0x0022, 0, 7, 1, 12 // Timer 2
837 #endif
838 
839 #if (defined(_T3IF))
840 /**
841  * Timer 3 Expiration Interrupt (User interrupt descriptor)
842  * \sa ESOS_USER_INTERRUPT
843  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
844  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
845  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
846  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
847  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
848  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
849  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
850  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
851  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
852  * \hideinitializer
853  */
854 #define ESOS_IRQ_PIC24_T3 _T3Interrupt, 0x0024, 0, 8, 2, 0 // Timer 3
855 #endif
856 
857 #if (defined(_T4IF))
858 /**
859  * Timer 4 Expiration Interrupt (User interrupt descriptor)
860  * \sa ESOS_USER_INTERRUPT
861  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
862  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
863  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
864  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
865  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
866  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
867  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
868  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
869  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
870  * \hideinitializer
871  */
872 #define ESOS_IRQ_PIC24_T4 _T4Interrupt, 0x004A, 1, 11, 6, 12 // Timer4
873 #endif
874 
875 #if (defined(_T5IF))
876 /**
877  * Timer 5 Expiration Interrupt (User interrupt descriptor)
878  * \sa ESOS_USER_INTERRUPT
879  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
880  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
881  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
882  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
883  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
884  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
885  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
886  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
887  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
888  * \hideinitializer
889  */
890 #define ESOS_IRQ_PIC24_T5 _T5Interrupt, 0x004C, 1, 12, 7, 0 // Timer5
891 #endif
892 
893 #if (defined(_T6IF))
894 /**
895  * Timer 6 Expiration Interrupt (User interrupt descriptor)
896  * \sa ESOS_USER_INTERRUPT
897  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
898  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
899  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
900  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
901  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
902  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
903  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
904  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
905  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
906  * \hideinitializer
907  */
908 #define ESOS_IRQ_PIC24_T6 _T6Interrupt, 0x0072, 2, 15, 11, 12 // Timer 6
909 #endif
910 
911 #if (defined(_T7IF))
912 /**
913  * Timer 7 Expiration Interrupt (User interrupt descriptor)
914  * \sa ESOS_USER_INTERRUPT
915  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
916  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
917  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
918  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
919  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
920  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
921  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
922  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
923  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
924  * \hideinitializer
925  */
926 #define ESOS_IRQ_PIC24_T7 _T7Interrupt, 0x0074, 3, 0, 12, 0 // Timer 7
927 #endif
928 
929 #if (defined(_T8IF))
930 /**
931  * Timer 8 Expiration Interrupt (User interrupt descriptor)
932  * \sa ESOS_USER_INTERRUPT
933  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
934  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
935  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
936  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
937  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
938  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
939  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
940  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
941  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
942  * \hideinitializer
943  */
944 #define ESOS_IRQ_PIC24_T8 _T8Interrupt, 0x007A, 3, 3, 12, 12 // Timer 8
945 #endif
946 
947 #if (defined(_T9IF))
948 /**
949  * Timer 9 Expiration Interrupt (User interrupt descriptor)
950  * \sa ESOS_USER_INTERRUPT
951  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
952  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
953  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
954  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
955  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
956  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
957  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
958  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
959  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
960  * \hideinitializer
961  */
962 #define ESOS_IRQ_PIC24_T9 _T9Interrupt, 0x007C, 3, 4, 13, 0 // Timer 9
963 #endif
964 
965 /**********************************************************************
966 *** DMA CHANNELS
967 **********************************************************************/
968 #if (defined(_DMA0IF))
969 /**
970  * Direct Memory Access (DMA) 0 Interrupt (User interrupt descriptor)
971  * \sa ESOS_USER_INTERRUPT
972  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
973  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
974  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
975  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
976  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
977  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
978  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
979  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
980  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
981  * \hideinitializer
982  */
983 #define ESOS_IRQ_PIC24_DMA0 _DMA0Interrupt, 0x001A, 0, 4, 1, 0 // DMA Channel 0
984 #endif
985 
986 #if (defined(_DMA1IF))
987 /**
988  * Direct Memory Access (DMA) 1 Interrupt (User interrupt descriptor)
989  * \sa ESOS_USER_INTERRUPT
990  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
991  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
992  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
993  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
994  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
995  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
996  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
997  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
998  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
999  * \hideinitializer
1000  */
1001 #define ESOS_IRQ_PIC24_DMA1 _DMA1Interrupt, 0x0030, 0, 14, 3, 8 // DMA Channel 1
1002 #endif
1003 
1004 #if (defined(_DMA2IF))
1005 /**
1006  * Direct Memory Access (DMA) 2 Interrupt (User interrupt descriptor)
1007  * \sa ESOS_USER_INTERRUPT
1008  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1009  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1010  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1011  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1012  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1013  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1014  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1015  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1016  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1017  * \hideinitializer
1018  */
1019 #define ESOS_IRQ_PIC24_DMA2 _DMA2Interrupt, 0x0044, 1, 8, 6, 0 // DMA Channel 2
1020 #endif
1021 
1022 #if (defined(_DMA3IF))
1023 /**
1024  * Direct Memory Access (DMA) 3 Interrupt (User interrupt descriptor)
1025  * \sa ESOS_USER_INTERRUPT
1026  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1027  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1028  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1029  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1030  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1031  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1032  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1033  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1034  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1035  * \hideinitializer
1036  */
1037 #define ESOS_IRQ_PIC24_DMA3 _DMA3Interrupt, 0x005C, 2, 4, 9, 0 // DMA Channel 3
1038 #endif
1039 
1040 #if (defined(_DMA4IF))
1041 /**
1042  * Direct Memory Access (DMA) 4 Interrupt (User interrupt descriptor)
1043  * \sa ESOS_USER_INTERRUPT
1044  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1045  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1046  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1047  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1048  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1049  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1050  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1051  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1052  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1053  * \hideinitializer
1054  */
1055 #define ESOS_IRQ_PIC24_DMA4 _DMA4Interrupt, 0x0070, 2, 14, 11, 8 // DMA Channel 4
1056 #endif
1057 
1058 #if (defined(_DMA5IF))
1059 /**
1060  * Direct Memory Access (DMA) 5 Interrupt (User interrupt descriptor)
1061  * \sa ESOS_USER_INTERRUPT
1062  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1063  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1064  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1065  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1066  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1067  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1068  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1069  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1070  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1071  * \hideinitializer
1072  */
1073 #define ESOS_IRQ_PIC24_DMA5 _DMA5Interrupt, 0x008E, 3, 13, 15, 4 // DMA Channel 5
1074 #endif
1075 
1076 #if (defined(_DMA6IF))
1077 /**
1078  * Direct Memory Access (DMA) 6 Interrupt (User interrupt descriptor)
1079  * \sa ESOS_USER_INTERRUPT
1080  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1081  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1082  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1083  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1084  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1085  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1086  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1087  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1088  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1089  * \hideinitializer
1090  */
1091 #define ESOS_IRQ_PIC24_DMA6 _DMA6Interrupt, 0x009C, 4, 4, 17, 0 // DMA Channel 6
1092 #endif
1093 
1094 #if (defined(_DMA7IF))
1095 /**
1096  * Direct Memory Access (DMA) 7 Interrupt (User interrupt descriptor)
1097  * \sa ESOS_USER_INTERRUPT
1098  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1099  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1100  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1101  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1102  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1103  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1104  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1105  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1106  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1107  * \hideinitializer
1108  */
1109 #define ESOS_IRQ_PIC24_DMA7 _DMA7Interrupt, 0x009E, 4, 5, 17, 4 // DMA Channel 7
1110 #endif
1111 
1112 #if (defined(_DMA8IF))
1113 /**
1114  * Direct Memory Access (DMA) 8 Interrupt (User interrupt descriptor)
1115  * \sa ESOS_USER_INTERRUPT
1116  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1117  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1118  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1119  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1120  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1121  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1122  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1123  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1124  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1125  * \hideinitializer
1126  */
1127 #define ESOS_IRQ_PIC24_DMA8 _DMA8Interrupt, 0x0100, 7, 6, 29, 8 // DMA Channel 8
1128 #endif
1129 
1130 #if (defined(_DMA9IF))
1131 /**
1132  * Direct Memory Access (DMA) 9 Interrupt (User interrupt descriptor)
1133  * \sa ESOS_USER_INTERRUPT
1134  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1135  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1136  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1137  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1138  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1139  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1140  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1141  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1142  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1143  * \hideinitializer
1144  */
1145 #define ESOS_IRQ_PIC24_DMA9 _DMA9Interrupt, 0x0102, 7, 7, 29, 12 // DMA Channel 9
1146 #endif
1147 
1148 #if (defined(_DMA10IF))
1149 /**
1150  * Direct Memory Access (DMA) 10 Interrupt (User interrupt descriptor)
1151  * \sa ESOS_USER_INTERRUPT
1152  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1153  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1154  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1155  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1156  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1157  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1158  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1159  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1160  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1161  * \hideinitializer
1162  */
1163 #define ESOS_IRQ_PIC24_DMA10 _DMA10Interrupt, 0x0104, 7, 8, 30, 0 // DMA Channel 10
1164 #endif
1165 
1166 #if (defined(_DMA11IF))
1167 /**
1168  * Direct Memory Access (DMA) 11 Interrupt (User interrupt descriptor)
1169  * \sa ESOS_USER_INTERRUPT
1170  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1171  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1172  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1173  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1174  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1175  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1176  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1177  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1178  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1179  * \hideinitializer
1180  */
1181 #define ESOS_IRQ_PIC24_DMA11 _DMA11Interrupt, 0x0106, 7, 9, 30, 4 // DMA Channel 11
1182 #endif
1183 
1184 #if (defined(_DMA12IF))
1185 /**
1186  * Direct Memory Access (DMA) 12 Interrupt (User interrupt descriptor)
1187  * \sa ESOS_USER_INTERRUPT
1188  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1189  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1190  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1191  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1192  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1193  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1194  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1195  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1196  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1197  * \hideinitializer
1198  */
1199 #define ESOS_IRQ_PIC24_DMA12 _DMA12Interrupt, 0x0118, 8, 2, 32, 8 // DMA Channel 12
1200 #endif
1201 
1202 #if (defined(_DMA13IF))
1203 /**
1204  * Direct Memory Access (DMA) 13 Interrupt (User interrupt descriptor)
1205  * \sa ESOS_USER_INTERRUPT
1206  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1207  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1208  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1209  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1210  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1211  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1212  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1213  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1214  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1215  * \hideinitializer
1216  */
1217 #define ESOS_IRQ_PIC24_DMA13 _DMA13Interrupt, 0x011A, 8, 3, 32, 12 // DMA Channel 13
1218 #endif
1219 
1220 #if (defined(_DMA14IF))
1221 /**
1222  * Direct Memory Access (DMA) 14 Interrupt (User interrupt descriptor)
1223  * \sa ESOS_USER_INTERRUPT
1224  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1225  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1226  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1227  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1228  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1229  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1230  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1231  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1232  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1233  * \hideinitializer
1234  */
1235 #define ESOS_IRQ_PIC24_DMA14 _DMA14Interrupt, 0x011C, 8, 4, 33, 0 // DMA Channel 14
1236 #endif
1237 
1238 /**********************************************************************
1239 *** SERIAL PERIPHERAL INTERFACE (SPI)
1240 **********************************************************************/
1241 #if (defined(_SPI1IF))
1242 /**
1243  * Serial Peripheral Interface 1 Transfer Done Interrupt (User interrupt descriptor)
1244  * \sa ESOS_USER_INTERRUPT
1245  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1246  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1247  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1248  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1249  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1250  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1251  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1252  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1253  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1254  * \hideinitializer
1255  */
1256 #define ESOS_IRQ_PIC24_SPI1 _SPI1Interrupt, 0x0028, 0, 10, 2, 8 // SPI1 event
1257 
1258 /**
1259  * Serial Peripheral Interface 1 Error Interrupt (User interrupt descriptor)
1260  * \sa ESOS_USER_INTERRUPT
1261  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1262  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1263  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1264  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1265  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1266  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1267  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1268  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1269  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1270  * \hideinitializer
1271  */
1272 #define ESOS_IRQ_PIC24_SPI1E _SPI1ErrInterrupt, 0x0026, 0, 9, 2, 4 // SPI1 (exception) fault event
1273 #endif
1274 
1275 #if (defined(_SPI2F))
1276 /**
1277  * Serial Peripheral Interface 2 Transfer Done Interrupt (User interrupt descriptor)
1278  * \sa ESOS_USER_INTERRUPT
1279  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1280  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1281  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1282  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1283  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1284  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1285  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1286  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1287  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1288  * \hideinitializer
1289  */
1290 #define ESOS_IRQ_PIC24_SPI2 _SPI2Interrupt, 0x0056, 2, 1, 8, 4 // SPI2 Transfer Done
1291 /**
1292  * Serial Peripheral Interface 2 Error Interrupt (User interrupt descriptor)
1293  * \sa ESOS_USER_INTERRUPT
1294  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1295  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1296  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1297  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1298  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1299  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1300  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1301  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1302  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1303  * \hideinitializer
1304  */
1305 #define ESOS_IRQ_PIC24_SPI2E _SPI2ErrInterrupt, 0x0054, 2, 0, 8, 0 // SPI2 Error
1306 #endif
1307 
1308 #if (defined(_SPI3F))
1309 /**
1310  * Serial Peripheral Interface 3 Transfer Done Interrupt (User interrupt descriptor)
1311  * \sa ESOS_USER_INTERRUPT
1312  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1313  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1314  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1315  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1316  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1317  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1318  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1319  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1320  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1321  * \hideinitializer
1322  */
1323 #define ESOS_IRQ_PIC24_SPI3 _SPI3Interrupt, 0x00CA, 5, 11, 22, 12 // SPI3 Transfer Done
1324 /**
1325  * Serial Peripheral Interface 3 Error Interrupt (User interrupt descriptor)
1326  * \sa ESOS_USER_INTERRUPT
1327  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1328  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1329  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1330  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1331  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1332  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1333  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1334  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1335  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1336  * \hideinitializer
1337  */
1338 #define ESOS_IRQ_PIC24_SPI3E _SPI3ErrInterrupt, 0x00C8, 5, 10, 22, 8 // SPI3 Error
1339 #endif
1340 
1341 #if (defined(_SPI4F))
1342 /**
1343  * Serial Peripheral Interface 4 Transfer Done Interrupt (User interrupt descriptor)
1344  * \sa ESOS_USER_INTERRUPT
1345  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1346  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1347  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1348  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1349  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1350  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1351  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1352  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1353  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1354  * \hideinitializer
1355  */
1356 #define ESOS_IRQ_PIC24_SPI4 _SPI4Interrupt, 0x010A, 7, 11, 30, 12 // SPI4 Transfer Done
1357 /**
1358  * Serial Peripheral Interface 4 Error Interrupt (User interrupt descriptor)
1359  * \sa ESOS_USER_INTERRUPT
1360  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1361  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1362  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1363  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1364  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1365  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1366  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1367  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1368  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1369  * \hideinitializer
1370  */
1371 #define ESOS_IRQ_PIC24_SPI24 _SPI4ErrInterrupt, 0x0108, 7, 10, 30, 8 // SPI4 Error
1372 #endif
1373 
1374 /**********************************************************************
1375 *** UNIVERSAL ASYNCHRONOUS RECEIVER TRANSMITTER (UART)
1376 **********************************************************************/
1377 // if the user is __NOT__ using the built-in ESOS comm system
1378 // but __IS__ using user IRQs, then we should define the UART
1379 // IRQs for their use
1380 #if !defined(_ESOS_PIC24_RS232_H) || defined(__DOXYGEN__)
1381 /**
1382  * UART1 TX Event Interrupt (User interrupt descriptor)
1383  * \note Only defined if ESOS is built <em>without</em> the communications subsystem.
1384  * \sa ESOS_USER_INTERRUPT
1385  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1386  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1387  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1388  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1389  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1390  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1391  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1392  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1393  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1394  * \hideinitializer
1395  */
1396 #define ESOS_IRQ_PIC24_U1TX _U1TXInterrupt, 0x002C, 0, 12, 3, 0 // UART1 TX event
1397 /**
1398  * UART1 RX Event Interrupt (User interrupt descriptor)
1399  * \sa ESOS_USER_INTERRUPT
1400  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1401  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1402  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1403  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1404  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1405  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1406  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1407  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1408  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1409  * \note Only defined if ESOS is built <em>without</em> the communications subsystem.
1410  * \hideinitializer
1411  */
1412 #define ESOS_IRQ_PIC24_U1RX _U1RXInterrupt, 0x002A, 0, 11, 2, 12 // UART1 RX event
1413 
1414 /**
1415  * UART1 Error Event Interrupt (User interrupt descriptor)
1416  * \sa ESOS_USER_INTERRUPT
1417  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1418  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1419  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1420  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1421  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1422  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1423  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1424  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1425  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1426  * \note Only defined if ESOS is built <em>without</em> the communications subsystem.
1427  * \hideinitializer
1428  */
1429 #define ESOS_IRQ_PIC24_U1E _U1ErrInterrupt, 0x0096, 4, 1, 16, 4 // UART1 Error event
1430 #endif // end of UART1 constants
1431 
1432 #if (defined(_U2TXIF))
1433 /**
1434  * UART 2 Transmit Done Interrupt (User interrupt descriptor)
1435  * \sa ESOS_USER_INTERRUPT
1436  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1437  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1438  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1439  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1440  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1441  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1442  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1443  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1444  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1445  * \hideinitializer
1446  */
1447 #define ESOS_IRQ_PIC24_U2TX _U2TXInterrupt, 0x0052, 1, 15, 7, 12 // UART2 Transmitter
1448 /**
1449  * UART 2 Receive Interrupt (User interrupt descriptor)
1450  * \sa ESOS_USER_INTERRUPT
1451  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1452  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1453  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1454  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1455  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1456  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1457  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1458  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1459  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1460  * \hideinitializer
1461  */
1462 #define ESOS_IRQ_PIC24_U2RX _U2RXInterrupt, 0x0050, 1, 14, 7, 8 // UART2 Receiver
1463 /**
1464  * UART 2 Error Interrupt (User interrupt descriptor)
1465  * \sa ESOS_USER_INTERRUPT
1466  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1467  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1468  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1469  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1470  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1471  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1472  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1473  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1474  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1475  * \hideinitializer
1476  */
1477 #define ESOS_IRQ_PIC24_U2E _U2ErrInterrupt, 0x0098, 4, 2, 16, 8 // UART2 Error Interrupt
1478 #endif
1479 
1480 #if (defined(_U3TXIF))
1481 /**
1482  * UART 3 Transmit Done Interrupt (User interrupt descriptor)
1483  * \sa ESOS_USER_INTERRUPT
1484  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1485  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1486  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1487  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1488  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1489  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1490  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1491  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1492  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1493  * \hideinitializer
1494  */
1495 #define ESOS_IRQ_PIC24_U3TX _U3TXInterrupt, 0x00BA, 5, 3, 20, 12 // UART3 Transmitter
1496 /**
1497  * UART 3 Receive Interrupt (User interrupt descriptor)
1498  * \sa ESOS_USER_INTERRUPT
1499  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1500  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1501  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1502  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1503  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1504  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1505  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1506  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1507  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1508  * \hideinitializer
1509  */
1510 #define ESOS_IRQ_PIC24_U3RX _U3RXInterrupt, 0x00B8, 5, 2, 20, 8 // UART3 Receiver
1511 /**
1512  * UART 3 Error Interrupt (User interrupt descriptor)
1513  * \sa ESOS_USER_INTERRUPT
1514  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1515  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1516  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1517  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1518  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1519  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1520  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1521  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1522  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1523  * \hideinitializer
1524  */
1525 #define ESOS_IRQ_PIC24_U3E _U3ErrInterrupt, 0x00B6, 5, 1, 20, 4 // UART3 Error Interrupt
1526 #endif
1527 
1528 #if (defined(_U4TXIF))
1529 /**
1530  * UART 4 Transmit Done Interrupt (User interrupt descriptor)
1531  * \sa ESOS_USER_INTERRUPT
1532  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1533  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1534  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1535  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1536  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1537  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1538  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1539  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1540  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1541  * \hideinitializer
1542  */
1543 #define ESOS_IRQ_PIC24_U4TX _U4TXInterrupt, 0x00C6, 5, 9, 22, 4 // UART4 Transmitter
1544 /**
1545  * UART 4 Receive Interrupt (User interrupt descriptor)
1546  * \sa ESOS_USER_INTERRUPT
1547  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1548  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1549  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1550  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1551  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1552  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1553  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1554  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1555  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1556  * \hideinitializer
1557  */
1558 #define ESOS_IRQ_PIC24_U4RX _U4RXInterrupt, 0x00C4, 5, 8, 22, 0 // UART4 Receiver
1559 /**
1560  * UART 4 Error Interrupt (User interrupt descriptor)
1561  * \sa ESOS_USER_INTERRUPT
1562  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1563  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1564  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1565  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1566  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1567  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1568  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1569  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1570  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1571  * \hideinitializer
1572  */
1573 #define ESOS_IRQ_PIC24_U4E _U4ErrInterrupt, 0x00C2, 5, 7, 21, 12 // UART4 Error Interrupt
1574 #endif
1575 
1576 /**********************************************************************
1577 *** ANALOG-TO-DIGITAL CONVERTER (A/D)
1578 **********************************************************************/
1579 #if (defined(_AD1IF))
1580 /**
1581  * A/D 1 Conversion Complete Interrupt (User interrupt descriptor)
1582  * \sa ESOS_USER_INTERRUPT
1583  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1584  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1585  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1586  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1587  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1588  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1589  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1590  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1591  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1592  * \hideinitializer
1593  */
1594 #define ESOS_IRQ_PIC24_AD1 _ADC1Interrupt, 0x002E, 0, 13, 3, 4 // AD1 Conversion complete
1595 #endif
1596 #if (defined(_AD2IF))
1597 /**
1598  * A/D 2 Conversion Complete Interrupt (User interrupt descriptor)
1599  * \sa ESOS_USER_INTERRUPT
1600  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1601  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1602  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1603  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1604  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1605  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1606  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1607  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1608  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1609  * \hideinitializer
1610  */
1611 #define ESOS_IRQ_PIC24_AD2 _ADC2Interrupt, 0x003E, 1, 5, 5, 4 // AD2 Conversion complete
1612 #endif
1613 
1614 /**********************************************************************
1615 *** NON-VOLATILE MEMORY (NVM) WRITE COMPLETE
1616 **********************************************************************/
1617 // TODO: create this user interrupt descriptor
1618 
1619 /**********************************************************************
1620 *** INTER-INTEGRATED CIRCUIT (I2C)
1621 **********************************************************************/
1622 #if (defined(_I2C1IF))
1623 /**
1624  * I2C1 Master Event Interrupt (User interrupt descriptor)
1625  * \sa ESOS_USER_INTERRUPT
1626  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1627  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1628  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1629  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1630  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1631  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1632  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1633  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1634  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1635  * \hideinitializer
1636  */
1637 #define ESOS_IRQ_PIC24_MI2C1 _MI2C1Interrupt, 0x0036, 1, 1, 4, 4 // I2C1 Master event
1638 /**
1639  * I2C1 Slave Event Interrupt (User interrupt descriptor)
1640  * \sa ESOS_USER_INTERRUPT
1641  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1642  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1643  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1644  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1645  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1646  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1647  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1648  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1649  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1650  * \hideinitializer
1651  */
1652 #define ESOS_IRQ_PIC24_SI2C1 _SI2C1Interrupt, 0x0034, 1, 0, 4, 0 // I2C1 slave event
1653 #endif
1654 
1655 #if (defined(_I2C2IF))
1656 /**
1657  * I2C2 Master Event Interrupt (User interrupt descriptor)
1658  * \sa ESOS_USER_INTERRUPT
1659  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1660  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1661  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1662  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1663  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1664  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1665  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1666  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1667  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1668  * \hideinitializer
1669  */
1670 #define ESOS_IRQ_PIC24_MI2C2 _MI2C2Interrupt, 0x0078, 3, 2, 12, 8 // I2C2 Master event
1671 /**
1672  * I2C2 Slave Event Interrupt (User interrupt descriptor)
1673  * \sa ESOS_USER_INTERRUPT
1674  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1675  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1676  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1677  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1678  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1679  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1680  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1681  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1682  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1683  * \hideinitializer
1684  */
1685 #define ESOS_IRQ_PIC24_SI2C2 _SI2C2Interrupt, 0x0076, 3, 1, 12, 4 // I2C2 slave event
1686 #endif
1687 
1688 /**********************************************************************
1689 *** COMPARATOR
1690 **********************************************************************/
1691 #if (defined(_CMIF))
1692 /**
1693  * Analog comparator Event Interrupt (User interrupt descriptor)
1694  * \sa ESOS_USER_INTERRUPT
1695  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1696  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1697  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1698  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1699  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1700  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1701  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1702  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1703  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1704  * \hideinitializer
1705  */
1706 #define ESOS_IRQ_PIC24_CM _CMInterrupt, 0x0038, 1, 2, 4, 8 // Comparator Combined Event
1707 #endif
1708 
1709 /**********************************************************************
1710 *** CHANGE NOTIFICATION
1711 **********************************************************************/
1712 #if (defined(_CNIF))
1713 /**
1714  * Change Notification Event Interrupt (User interrupt descriptor)
1715  * \sa ESOS_USER_INTERRUPT
1716  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1717  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1718  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1719  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1720  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1721  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1722  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1723  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1724  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1725  * \hideinitializer
1726  */
1727 #define ESOS_IRQ_PIC24_CN _CNInterrupt, 0x003A, 1, 3, 4, 12 // Input Change Interrupt
1728 #endif
1729 
1730 /**********************************************************************
1731 *** ENHANCED CONTROLLER AREA NETWORK (ECAN)
1732 **********************************************************************/
1733 #if (defined(_C1IF))
1734 /**
1735  * ECAN 1 Event Interrupt (User interrupt descriptor)
1736  * \sa ESOS_USER_INTERRUPT
1737  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1738  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1739  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1740  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1741  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1742  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1743  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1744  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1745  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1746  * \hideinitializer
1747  */
1748 #define ESOS_IRQ_PIC24_C1 _C1Interrupt, 0x005A, 2, 3, 8, 12 // CAN1 Event
1749 /**
1750  * ECAN 1 Transmit Date Request Interrupt (User interrupt descriptor)
1751  * \sa ESOS_USER_INTERRUPT
1752  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1753  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1754  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1755  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1756  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1757  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1758  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1759  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1760  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1761  * \hideinitializer
1762  */
1763 #define ESOS_IRQ_PIC24_C1TX _C1TXInterrupt, 0x00A0, 4, 6, 17, 8 // CAN1 TX Data Request
1764 /**
1765  * ECAN 1 Receive Data Ready Event Interrupt (User interrupt descriptor)
1766  * \sa ESOS_USER_INTERRUPT
1767  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1768  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1769  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1770  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1771  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1772  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1773  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1774  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1775  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1776  * \hideinitializer
1777  */
1778 #define ESOS_IRQ_PIC24_C1RX _C1RXInterrupt, 0x0058, 2, 2, 8, 8 // CAN1 RX Data Ready
1779 #endif
1780 
1781 #if (defined(_C2IF))
1782 /**
1783  * ECAN 2 Event Interrupt (User interrupt descriptor)
1784  * \sa ESOS_USER_INTERRUPT
1785  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1786  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1787  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1788  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1789  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1790  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1791  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1792  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1793  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1794  * \hideinitializer
1795  */
1796 #define ESOS_IRQ_PIC24_C2 _C2Interrupt, 0x0084, 3, 8, 14, 0 // CAN2 Event
1797 /**
1798  * ECAN 2 Transmit Date Request Interrupt (User interrupt descriptor)
1799  * \sa ESOS_USER_INTERRUPT
1800  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1801  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1802  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1803  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1804  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1805  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1806  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1807  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1808  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1809  * \hideinitializer
1810  */
1811 #define ESOS_IRQ_PIC24_C2TX _C2TXInterrupt, 0x00A2, 4, 7, 17, 12 // CAN2 TX Data Request
1812 /**
1813  * ECAN 2 Receive Data Ready Event Interrupt (User interrupt descriptor)
1814  * \sa ESOS_USER_INTERRUPT
1815  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1816  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1817  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1818  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1819  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1820  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1821  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1822  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1823  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1824  * \hideinitializer
1825  */
1826 #define ESOS_IRQ_PIC24_C2RX _C2RXInterrupt, 0x0082, 3, 7, 13, 12 // CAN2 RX Data Ready
1827 #endif
1828 
1829 /**********************************************************************
1830 *** PARALLEL MASTER PORT (PMP)
1831 **********************************************************************/
1832 // TODO: add this user interrupt descriptor
1833 
1834 
1835 /**********************************************************************
1836 *** PULSE-WIDTH MODULATION (PWM)
1837 **********************************************************************/
1838 #if (defined(_PSEMIF))
1839 /**
1840  * Pulse-width modulation (PWM) special event Interrupt (User interrupt descriptor)
1841  * \sa ESOS_USER_INTERRUPT
1842  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1843  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1844  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1845  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1846  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1847  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1848  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1849  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1850  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1851  * \hideinitializer
1852  */
1853 #define ESOS_IRQ_PIC24_PSEM _PSEMInterrupt, 0x0086, 3, 9, 14, 4 // PWM Special Event Match
1854 #endif
1855 
1856 // TODO: write PSESM (PWM Secondary Special Event) interrupt descriptor
1857 
1858 #if (defined(_PWM1IF))
1859 /**
1860  * Pulse-width modulation (PWM) Generator 1 Interrupt (User interrupt descriptor)
1861  * \sa ESOS_USER_INTERRUPT
1862  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1863  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1864  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1865  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1866  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1867  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1868  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1869  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1870  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1871  * \hideinitializer
1872  */
1873 #define ESOS_IRQ_PIC24_PWM1 _PWM1Interrupt, 0x00D0, 5, 14, 23, 8
1874 #endif
1875 
1876 #if (defined(_PWM2IF))
1877 /**
1878  * Pulse-width modulation (PWM) Generator 2 Interrupt (User interrupt descriptor)
1879  * \sa ESOS_USER_INTERRUPT
1880  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1881  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1882  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1883  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1884  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1885  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1886  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1887  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1888  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1889  * \hideinitializer
1890  */
1891 #define ESOS_IRQ_PIC24_PWM2 _PWM2Interrupt, 0x00D2, 5, 15, 23, 12
1892 #endif
1893 
1894 #if (defined(_PWM3IF))
1895 /**
1896  * Pulse-width modulation (PWM) Generator 3 Interrupt (User interrupt descriptor)
1897  * \sa ESOS_USER_INTERRUPT
1898  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1899  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1900  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1901  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1902  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1903  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1904  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1905  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1906  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1907  * \hideinitializer
1908  */
1909 #define ESOS_IRQ_PIC24_PWM3 _PWM3Interrupt, 0x00D4, 6, 0, 24, 0
1910 #endif
1911 
1912 #if (defined(_PWM4IF))
1913 /**
1914  * Pulse-width modulation (PWM) Generator 4 Interrupt (User interrupt descriptor)
1915  * \sa ESOS_USER_INTERRUPT
1916  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1917  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1918  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1919  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1920  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1921  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1922  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1923  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1924  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1925  * \hideinitializer
1926  */
1927 #define ESOS_IRQ_PIC24_PWM4 _PWM4Interrupt, 0x00D6, 6, 1, 24, 4
1928 #endif
1929 
1930 #if (defined(_PWM5IF))
1931 /**
1932  * Pulse-width modulation (PWM) Generator 5 Interrupt (User interrupt descriptor)
1933  * \sa ESOS_USER_INTERRUPT
1934  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1935  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1936  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1937  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1938  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1939  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1940  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1941  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1942  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1943  * \hideinitializer
1944  */
1945 #define ESOS_IRQ_PIC24_PWM5 _PWM5Interrupt, 0x00D8, 6, 2, 24, 8
1946 #endif
1947 
1948 #if (defined(_PWM6IF))
1949 /**
1950  * Pulse-width modulation (PWM) Generator 6 Interrupt (User interrupt descriptor)
1951  * \sa ESOS_USER_INTERRUPT
1952  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1953  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1954  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1955  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1956  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1957  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1958  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1959  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1960  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1961  * \hideinitializer
1962  */
1963 #define ESOS_IRQ_PIC24_PWM6 _PWM6Interrupt, 0x00DA, 6, 3, 24, 12
1964 #endif
1965 
1966 #if (defined(_PWM7IF))
1967 /**
1968  * Pulse-width modulation (PWM) Generator 7 Interrupt (User interrupt descriptor)
1969  * \sa ESOS_USER_INTERRUPT
1970  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1971  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1972  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1973  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1974  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1975  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1976  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1977  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1978  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
1979  * \hideinitializer
1980  */
1981 #define ESOS_IRQ_PIC24_PWM7 _PWM7Interrupt, 0x00DC, 6, 4, 25, 0
1982 #endif
1983 
1984 /**********************************************************************
1985 *** QUADRATURE ENCODER INTERFACE (QEI)
1986 **********************************************************************/
1987 #if (defined(_QEI1IF))
1988 /**
1989  * Quadrature encoder interface module counter compare event Interrupt (User interrupt descriptor)
1990  * \sa ESOS_USER_INTERRUPT
1991  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
1992  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
1993  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
1994  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
1995  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
1996  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
1997  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
1998  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
1999  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
2000  * \hideinitializer
2001  */
2002 #define ESOS_IRQ_PIC24_QEI1 _QEI1Interrupt, 0x0088, 3, 10, 14, 8
2003 #endif
2004 
2005 #if (defined(_QEI2IF))
2006 /**
2007  * Quadrature encoder interface module counter compare event Interrupt (User interrupt descriptor)
2008  * \sa ESOS_USER_INTERRUPT
2009  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
2010  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
2011  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
2012  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
2013  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
2014  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
2015  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
2016  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
2017  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
2018  * \hideinitializer
2019  */
2020 #define ESOS_IRQ_PIC24_QEI2 _QEI2Interrupt, 0x00AA, 4, 11, 18, 12
2021 #endif
2022 
2023 /**********************************************************************
2024 *** UNIVERSAL SERIAL BUS (USB) ON-THE-GO (OTG)
2025 **********************************************************************/
2026 // TODO: add this user interrupt descriptor
2027 #if (defined(_USB1IF))
2028 #endif
2029 
2030 /**********************************************************************
2031 *** REAL-TIME CLOCK CALENDAR
2032 **********************************************************************/
2033 #if (defined(_RTCIF))
2034 /**
2035  * Cyclic redundancy check generator Interrupt (User interrupt descriptor)
2036  * \sa ESOS_USER_INTERRUPT
2037  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
2038  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
2039  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
2040  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
2041  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
2042  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
2043  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
2044  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
2045  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
2046  * \hideinitializer
2047  */
2048 #define ESOS_IRQ_PIC24_RTC _RTCInterrupt, 0x0090, 3, 14, 15, 8 // RTCC Interrupt
2049 #endif
2050 
2051 
2052 /**********************************************************************
2053 *** CYCLIC REDUNDANCY CHECKER (CRC)
2054 **********************************************************************/
2055 #if (defined(_CRCIF))
2056 /**
2057  * Cyclic redundancy check generator Interrupt (User interrupt descriptor)
2058  * \sa ESOS_USER_INTERRUPT
2059  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
2060  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
2061  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
2062  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
2063  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
2064  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
2065  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
2066  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
2067  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
2068  * \hideinitializer
2069  */
2070 #define ESOS_IRQ_PIC24_CRC _CRCInterrupt, 0x009A, 4, 3, 16, 12 // CRC Generator Interrupt
2071 #endif
2072 
2073 #if 0
2074 // some missing interrupts
2075 DCIE
2076 DCI
2077 
2078 // some leftover interrupt descriptors from the change (JWB -- 6 SEPT 2014)
2079 #define ESOS_IRQ_PIC24_CRC _CRCInterrupt, 0x009A, 4, 3, 16, 12 // CRC Generator Interrupt
2080 #define ESOS_IRQ_PIC24_CTMU _CTMUInterrupt, 0x00AE, 4, 13, 19, 4 // CTMU Interrupt
2081 #define ESOS_IRQ_PIC24_ICD _ICDInterrupt, 0x0142, 8, 14, 35, 8 // ICD Application
2082 #define ESOS_IRQ_PIC24_JTAG _JTAGInterrupt, 0x0130, 8, 15, 35, 12 // JTAG Programming
2083 #define ESOS_IRQ_PIC24_PTGSTEP _PTGSTEPInterrupt, 0x0136, 9, 1, 36, 4 // PTG Step
2084 #define ESOS_IRQ_PIC24_PTGWDT _PTGWDTInterrupt, 0x0138, 9, 2, 36, 8 // PTG Watchdog Time-out
2085 #define ESOS_IRQ_PIC24_PTG0 _PTG0Interrupt, 0x013A, 9, 3, 36, 12 // PTG Interupt 0
2086 #define ESOS_IRQ_PIC24_PTG1 _PTG1Interrupt, 0x013C, 9, 4, 37, 0 // PTG Interrupt 1
2087 #define ESOS_IRQ_PIC24_PTG2 _PTG2Interrupt, 0x013E, 9, 5, 37, 4 // PTG Interrupt 2
2088 #define ESOS_IRQ_PIC24_PTG3 _PTG3Interrupt, 0x0140, 9, 6, 37, 8 // PTG Interrupt 3
2089 #endif
2090 
2091 /*
2092  * MACROs COMMON TO ALL PIC24 PROCESSORS
2093  */
2094 
2095 #define __GET_IRQ_ATTRIB(Q) __xGET_IRQ_ATTRIB(Q)
2096 #define __GET_IVTQ(Q) __xGET_IVT(Q)
2097 #define __GET_IFS_NUM(Q) __xGET_IFS_NUM(Q)
2098 #define __GET_IFS_BITNUM(Q) __xGET_IFS_BITNUM(Q)
2099 #define __GET_IEC_NUM(Q) __xGET_IFS_NUM(Q)
2100 #define __GET_IEC_BITNUM(Q) __xGET_IFS_BITNUM(Q)
2101 #define __GET_IPC_NUM(Q) __xGET_IPC_NUM(Q)
2102 #define __GET_IPC_BITNUM(Q) __xGET_IPC_BITNUM(Q)
2103 
2104 #define __xGET_IRQ_ATTRIB(attrib, ivt, ifsr, ifsb, ipcr, ipcb) attrib
2105 #define __xGET_IVT(attrib, ivt, ifsr, ifsb, ipcr, ipcb) ivt
2106 #define __xGET_IFS_NUM(attrib, ivt, ifsr, ifsb, ipcr, ipcb) ifsr
2107 #define __xGET_IFS_BITNUM(attrib, ivt, ifsr, ifsb, ipcr, ipcb) ifsb
2108 #define __xGET_IEC_NUM(attrib, ivt, ifsr, ifsb, ipcr, ipcb) ifsr
2109 #define __xGET_IEC_BITNUM(attrib, ivt, ifsr, ifsb, ipcr, ipcb) ifsb
2110 #define __xGET_IPC_NUM(attrib, ivt, ifsr, ifsb, ipcr, ipcb) ipcr
2111 #define __xGET_IPC_BITNUM(attrib, ivt, ifsr, ifsb, ipcr, ipcb) ipcb
2112 
2113 
2114 // this macro gets the IRQ's IPL number from its corresponding IPC register
2115 #define __GET_IPL_FROM_IPCX(Q) ((*(&IPC0+(__xGET_IPC_NUM(Q))) >> __xGET_IPC_BITNUM(Q))&0x7)
2116 
2117 // this macro tests the IRQ's IPL number from its corresponding IPC register
2118 // against a value
2119 #define __IS_IPL_FROM_IPCX(Q, val) ((__GET_IPL_FROM_IPCX(Q))==(val))
2120 
2121 // this macro sets the IRQ's IPL number in its corresponding IPC register
2122 #define __PUT_IPL_INTO_IPCX(ipc,ipcb,ipl) \
2123  do { \
2124  BIT_CLEAR_MASK( (*((&IPC0)+(ipc))), ((0x07<<ipcb) + (ipl<<ipcb))); \
2125  (*((&IPC0)+ipc)) += (ipl<<ipcb); \
2126  }while(0)
2127 
2128 /**
2129 * Unregisters the user interrupt denoted by the interrupt descriptor
2130 * \param desc Descriptor of the hardware interrupt
2131 * \note Hardware interrupt descriptors are found in the file <b>esos_<i>hw</i>_irq.h</b>
2132 * where <i>hw</i> is the name of the chip for the ESOS port has been written.
2133 * \hideinitializer
2134  * \sa ESOS_USER_INTERRUPT
2135  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
2136  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
2137  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
2138  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
2139  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
2140  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
2141  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
2142  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
2143  */
2144 #define ESOS_UNREGISTER_PIC24_USER_INTERRUPT(desc) __xUNREGISTER_PIC24_USER_INTERRUPT(desc)
2145 #define __xUNREGISTER_PIC24_USER_INTERRUPT(attrib, ivt, ifsr, ifsb, ipcr, ipcb) \
2146  do{ \
2147  __xDISABLE_PIC24_USER_INTERRUPT(attrib, ivt, ifsr, ifsb, ipcr, ipcb); \
2148  __PUT_IPL_INTO_IPCX(ipcr,ipcb, __ESOS_USER_IRQ_UNREGISTERED); \
2149  }while(0)
2150 
2151 
2152 /**
2153 * Registers the user interrupt denoted by the interrupt descriptor
2154 * \param desc Descriptor of the hardware interrupt
2155 * \param ipl Interrupt Priority Level (IPL) for the interrupt being registered
2156 * \param p2f Pointer to function to serve as the ISR. Function must have <em>void</em>
2157 * arguments and return <em>void</em>
2158 * \note Hardware interrupt descriptors are found in the file <b>esos_<i>hw</i>_irq.h</b>
2159 * where <i>hw</i> is the name of the chip for the ESOS port has been written.
2160 * \hideinitializer
2161  * \sa ESOS_USER_INTERRUPT
2162  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
2163  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
2164  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
2165  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
2166  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
2167  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
2168  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
2169  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
2170  */
2171 #define ESOS_REGISTER_PIC24_USER_INTERRUPT(desc, ipl, p2f) __xREGISTER_PIC24_USER_INTERRUPT(desc, ipl, p2f)
2172 #define __xREGISTER_PIC24_USER_INTERRUPT(attrib, ivt, ifsr, ifsb, ipcr, ipcb, ipl, p2f) \
2173  do { \
2174  __xDISABLE_PIC24_USER_INTERRUPT(attrib, ivt, ifsr, ifsb, ipcr, ipcb); \
2175  __PUT_IPL_INTO_IPCX(ipcr, ipcb, ipl); \
2176  }while(0)
2177 
2178 /**
2179 * Disables all registered user interrupts.
2180 * \note This function does <em>NOT</em> disable all interrupts. Interrupts used by
2181 * ESOS will continue to function.
2182  * \sa ESOS_USER_INTERRUPT
2183  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
2184  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
2185  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
2186  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
2187  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
2188  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
2189  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
2190  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
2191 * \hideinitializer
2192 */
2193 #define ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS() SET_CPU_IPL(__ESOS_DISABLE_USER_IRQS_LEVEL)
2194 
2195 /**
2196 * Enables all registered user interrupts.
2197 * \note Does not affect interrupts used by ESOS
2198  * \sa ESOS_USER_INTERRUPT
2199  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
2200  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
2201  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
2202  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
2203  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
2204  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
2205  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
2206  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
2207 * \hideinitializer
2208 */
2209 #define ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS() SET_CPU_IPL(__ESOS_ENABLE_USER_IRQS_LEVEL)
2210 
2211 /**
2212 * Queries the enabled state of user interrupt denoted by the interrupt descriptor
2213 * \param desc Descriptor of the hardware interrupt
2214 * \retval TRUE If the user interrupt is currently enabled
2215 * \retval FALSE If the user interrupt is currently disabled
2216 * \note Hardware interrupt descriptors are found in the file <b>esos_<i>hw</i>_irq.h</b>
2217 * where <i>hw</i> is the name of the chip for the ESOS port has been written.
2218 * \hideinitializer
2219  * \sa ESOS_USER_INTERRUPT
2220  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
2221  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
2222  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
2223  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
2224  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
2225  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
2226  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
2227  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
2228  */
2229 #define ESOS_IS_PIC24_USER_INTERRUPT_ENABLED(desc) __xIS_PIC24_USER_INTERRUPT_ENABLED(desc)
2230 #define __xIS_PIC24_USER_INTERRUPT_ENABLED(attrib, ivt, ifsr, ifsb, ipcr, ipcb) IS_BIT_SET(*(&IEC0+ifsr),ifsb)
2231 
2232 /**
2233 * Queries the "flag" state of user interrupt denoted by the interrupt descriptor
2234 * \param desc Descriptor of the hardware interrupt
2235 * \retval TRUE If the user interrupt is needs to be serviced
2236 * \retval FALSE Otherwise
2237 * \note Hardware interrupt descriptors are found in the file <b>esos_<i>hw</i>_irq.h</b>
2238 * where <i>hw</i> is the name of the chip for the ESOS port has been written.
2239 * \hideinitializer
2240  * \sa ESOS_USER_INTERRUPT
2241  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
2242  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
2243  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
2244  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
2245  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
2246  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
2247  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
2248  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
2249 */
2250 #define ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING(desc) __xDOES_PIC24_USER_INTERRUPT_NEED_SERVICING(desc)
2251 #define __xDOES_PIC24_USER_INTERRUPT_NEED_SERVICING(attrib, ivt, ifsr, ifsb, ipcr, ipcb) IS_BIT_SET(*(&IFS0+ifsr), ifsb)
2252 
2253 /**
2254 * Tells ESOS to mark the user interrupt denoted by the interrupt descriptor as being serviced
2255 * \param desc Descriptor of the hardware interrupt
2256 * \note Hardware interrupt descriptors are found in the file <b>esos_<i>hw</i>_irq.h</b>
2257 * where <i>hw</i> is the name of the chip for the ESOS port has been written.
2258 * \hideinitializer
2259  * \sa ESOS_USER_INTERRUPT
2260  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
2261  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
2262  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
2263  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
2264  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
2265  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
2266  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
2267  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
2268 */
2269 #define ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED(desc) __xMARK_PIC24_USER_INTERRUPT_SERVICED(desc)
2270 #define __xMARK_PIC24_USER_INTERRUPT_SERVICED(attrib, ivt, ifsr, ifsb, ipcr, ipcb) BIT_CLEAR(*(&IFS0+ifsr),ifsb)
2271 
2272 /**
2273 * Enables the user interrupt denoted by the interrupt descriptor
2274 * \param desc Descriptor of the hardware interrupt
2275 * \note Hardware interrupt descriptors are found in the file <b>esos_<i>hw</i>_irq.h</b>
2276 * where <i>hw</i> is the name of the chip for the ESOS port has been written.
2277 * \hideinitializer
2278  * \sa ESOS_USER_INTERRUPT
2279  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
2280  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
2281  * \sa ESOS_DISABLE_PIC24_USER_INTERRUPT
2282  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
2283  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
2284  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
2285  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
2286  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
2287  */
2288 #define ESOS_ENABLE_PIC24_USER_INTERRUPT(desc) __xENABLE_PIC24_USER_INTERRUPT(desc)
2289 #define __xENABLE_PIC24_USER_INTERRUPT(attrib, ivt, ifsr, ifsb, ipcr, ipcb) BIT_SET(*(&IEC0+ifsr), ifsb)
2290 
2291 /**
2292 * Disables the user interrupt denoted by the interrupt descriptor
2293 * \param desc Descriptor of the hardware interrupt
2294 * \note Hardware interrupt descriptors are found in the file <b>esos_<i>hw</i>_irq.h</b>
2295 * where <i>hw</i> is the name of the chip for the ESOS port has been written.
2296 * \hideinitializer
2297  * \sa ESOS_USER_INTERRUPT
2298  * \sa ESOS_REGISTER_PIC24_USER_INTERRUPT
2299  * \sa ESOS_UNREGISTER_PIC24_USER_INTERRUPT
2300  * \sa ESOS_ENABLE_PIC24_USER_INTERRUPT
2301  * \sa ESOS_ENABLE_ALL_PIC24_USER_INTERRUPTS
2302  * \sa ESOS_DISABLE_ALL_PIC24_USER_INTERRUPTS
2303  * \sa ESOS_IS_PIC24_USER_INTERRUPT_ENABLED
2304  * \sa ESOS_DOES_PIC24_USER_INTERRUPT_NEED_SERVICING
2305  * \sa ESOS_MARK_PIC24_USER_INTERRUPT_SERVICED
2306  */
2307 #define ESOS_DISABLE_PIC24_USER_INTERRUPT(desc) __xDISABLE_PIC24_USER_INTERRUPT(desc)
2308 #define __xDISABLE_PIC24_USER_INTERRUPT(attrib, ivt, ifsr, ifsb, ipcr, ipcb) BIT_CLEAR(*((&IEC0)+ifsr), ifsb)
2309 
2310 #endif // ESOS_PIC24_IRQ_H
2311 
2312 
This is the master include file for implementing ESOS on Microchip PIC24 MCUs.