Ivthandleinterrupt 【Must See】
NVIC->ICPR[0] = (1 << irq_num); // clear pending
This function was the traffic cop. It took the interrupt number—the vector —and decided which driver function to call. It was beautiful in its simplicity, a massive switch statement that held the system together. ivthandleinterrupt
But a more robust ivthandleinterrupt would query the hardware: NVIC->ICPR[0] = (1 << irq_num); // clear pending
This is incredibly useful to see: