/* In order to clear the comparator, we need to read the conversion results. This function reads the last conversion results without changing the config value.  */
ads1015Error_t ads1015GetLastConversionResults(int16_t *value)
/* In order to clear the comparator, we need to read the conversion results. This function reads the last conversion results without changing the config value.  */
ads1015Error_t ads1015GetLastConversionResults(int16_t *value)
{
  ads1015Error_t error = ADS1015_ERROR_OK;
  if (!(_ads1015Initialised))
  {
    ads1015Init();
  }
  systickDelay(1);
  error = ina219Read16(ADS1015_REG_POINTER_CONVERT, value);
  if (error) return error;
  *value = *value >> 4;
  return error;
}