/* Get the number of active callbacks for a limit.  */
uint8_t TEMPDRV_GetActiveCallbacks(TEMPDRV_LimitType_t limit)
/* Get the number of active callbacks for a limit.  */
uint8_t TEMPDRV_GetActiveCallbacks(TEMPDRV_LimitType_t limit)
{
  TEMPDRV_CallbackSet_t *set;
  if (limit == TEMPDRV_LIMIT_HIGH)
  {
    set = tempdrvHighCallbacks;
  }
  else if (limit == TEMPDRV_LIMIT_LOW)
  {
    set = tempdrvLowCallbacks;
  }
  else
  {
    return 0;
  }
  uint8_t index, count=0;
  for (index = TEMPDRV_CUSTOM_CALLBACK_INDEX; index < TEMPDRV_CALLBACK_DEPTH; index++)
  {
    if (set[index].callback!=NULL)
    {
      count++;
    }
  }
  return count;
}