/* TEMPDRV Interrupt Handler. 
This function handles the EMU_IF_TEMPHIGH, EMU_IF_TEMPLOW interrupt flags from the EMU internal temperature sensor.  */
void TEMPDRV_IRQHandler(void)
/* TEMPDRV Interrupt Handler. 
This function handles the EMU_IF_TEMPHIGH, EMU_IF_TEMPLOW interrupt flags from the EMU internal temperature sensor.  */
void TEMPDRV_IRQHandler(void)
{
  uint32_t flags = EMU_IntGetEnabled();
  TEMPDRV_Callback_t activeCallback;
  if (flags & EMU_IF_TEMPHIGH)
  {
    if (lowCallback->callback != NULL)
    {
      activeCallback = lowCallback->callback;
      memset(lowCallback, 0, sizeof(TEMPDRV_CallbackSet_t));
      activeCallback(TEMPDRV_GetTemp(), TEMPDRV_LIMIT_LOW);
    }
    EMU_IntClear(EMU_IFC_TEMPHIGH);
  }
  else if (flags & EMU_IF_TEMPLOW)
  {
    if (highCallback->callback != NULL)
    {
      activeCallback = highCallback->callback;
      memset(highCallback, 0, sizeof(TEMPDRV_CallbackSet_t));
      activeCallback(TEMPDRV_GetTemp(), TEMPDRV_LIMIT_HIGH);
    }
    EMU_IntClear(EMU_IFC_TEMPLOW);
  }
  updateInterrupts();
}