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 26 LOG_UPDATE_INTERVAL(
this);
35 raw = (raw + (this->sample_count_ >> 1)) / this->
sample_count_;
41 raw = (raw + (this->sample_count_ >> 1)) / this->
sample_count_;
48 #endif // USE_LIBRETINY
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