Aligned GIC examples in documentation
@@ -636,8 +636,12 @@ For ARM GIC the default implementation looks like the following example:
int32_t IRQ_SetPriorityGroupBits (uint32_t bits) {
int32_t status;
+ if (bits == IRQ_PRIORITY_Msk) {
+ bits = 7U;
+ }
+
if (bits < 8U) {
- GIC_SetBinaryPoint (bits);
+ GIC_SetBinaryPoint (7U - bits);
status = 0;
} else {
status = -1;
@@ -660,7 +664,11 @@ For ARM GIC the default implementation looks like the following example:
\code
uint32_t IRQ_GetPriorityGroupBits (void) {
- return (GIC_GetBinaryPoint() & 0x07U);
+ uint32_t bp;
+
+ bp = GIC_GetBinaryPoint() & 0x07U;
+
+ return (7U - bp);
}
\endcode
*/
