looking at the function "F2837xD_SWPrioritizedIsrLevels.h" ; i have couple questions about the below code:
#if (INT1PL == 0)
#define MINT1_1PL ~(1 << 0); // MZ: a<<b for integers means "shift left". The bitwise representation of a is shifted left b bits. This is the same as multiplying by (2 to the power of b), // MINT1_1PL=1*2^0=1.
#else
#define MINT1_1PL 0xFFFF
#endif
#if (INT2PL >= INT1PL) || (INT2PL == 0) //MZ: if the global interrupt2 priority is greater or equal to global interrupt1 priority or it is equal zero.
#define MINT1_2PL ~(1 << 1) //MZ: the mask of global interrupt #1 its group number 2 interrupt priority level is equal to 2^1; MINT1_2PL = 2
#else
#define MINT1_2PL 0xFFFF
#endif
#if (INT3PL >= INT1PL) || (INT3PL == 0)
#define MINT1_3PL ~(1 << 2) //MZ: the mask of global interrupt #1 its group number 3 interrupt priority level is equal to 2^2; MINT1_3PL = 4
#else
#define MINT1_3PL 0xFFFF
Questions:
1) what is the purpose of the above code?
2) is all what we doing in the above code is we are assigning a priority level to an interrupt? in this case we should not list MINTx PL but we should list INTxPL instead.
3) if the goal is to create a mask values that can be used by the CPU within an ISR to allow CPU to interrupt current ISR and service the new higher priority ISR, then why all have the same values; 0xFFFF
Thankyou