/* Interrupt handler for the over-temperature alarm. 
This interrupt handler gets the current die temperature and calls the alarm callback function that was previously installed with tempmon_set_alarm(). If for some reason there is no alarm callback set, this routine does nothing except clear the IRQ.  */
static void tempmon_alarm_isr(void)
/* Interrupt handler for the over-temperature alarm. 
This interrupt handler gets the current die temperature and calls the alarm callback function that was previously installed with tempmon_set_alarm(). If for some reason there is no alarm callback set, this routine does nothing except clear the IRQ.  */
static void tempmon_alarm_isr(void)
{
    if (s_tempmon.alarmCallback)
    {
        float currentTemp = tempmon_get_temp();
        s_tempmon.alarmCallback(currentTemp);
    }
    BF_SET(PMU_MISC1, IRQ_TEMPSENSE);
}