/* Check if another callback has registered the same temperature.  */
static bool checkForDuplicates(TEMPDRV_CallbackSet_t *set, int8_t temp)
/* Check if another callback has registered the same temperature.  */
static bool checkForDuplicates(TEMPDRV_CallbackSet_t *set, int8_t temp)
{
  uint8_t index;
  uint8_t emu = convertToEmu(temp);
  for (index = TEMPDRV_CUSTOM_CALLBACK_INDEX; index < TEMPDRV_CALLBACK_DEPTH; index++)
  {
    if (set[index].callback!=NULL)
    {
      if (set[index].temp == emu)
      {
        return true;
      }
    }
  }
  return false;
}