9 static const char *
const TAG =
"adc.libretiny";
12 ESP_LOGCONFIG(TAG,
"Setting up ADC '%s'...", this->
get_name().c_str());
13 #ifndef USE_ADC_SENSOR_VCC 15 #endif // !USE_ADC_SENSOR_VCC 19 LOG_SENSOR(
"",
"ADC Sensor",
this);
20 #ifdef USE_ADC_SENSOR_VCC 21 ESP_LOGCONFIG(TAG,
" Pin: VCC");
22 #else // USE_ADC_SENSOR_VCC 23 LOG_PIN(
" Pin: ", this->
pin_);
24 #endif // USE_ADC_SENSOR_VCC 27 LOG_UPDATE_INTERVAL(
this);
39 return aggr.aggregate();
47 return aggr.aggregate() / 1000.0f;
53 #endif // USE_LIBRETINY
const LogString * sampling_mode_to_str(SamplingMode mode)
SamplingMode sampling_mode_
void setup() override
Setup ADC.
virtual uint8_t get_pin() const =0
Implementation of SPI Controller mode.
void dump_config() override
const StringRef & get_name() const