running setup

This commit is contained in:
J. Nick Koston 2025-07-24 16:27:59 -10:00
parent 06eba96fdc
commit 25cd16409b
No known key found for this signature in database
248 changed files with 75 additions and 463 deletions

View File

@ -7,7 +7,6 @@ namespace a4988 {
static const char *const TAG = "a4988.stepper"; static const char *const TAG = "a4988.stepper";
void A4988::setup() { void A4988::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
if (this->sleep_pin_ != nullptr) { if (this->sleep_pin_ != nullptr) {
this->sleep_pin_->setup(); this->sleep_pin_->setup();
this->sleep_pin_->digital_write(false); this->sleep_pin_->digital_write(false);

View File

@ -7,8 +7,6 @@ namespace absolute_humidity {
static const char *const TAG = "absolute_humidity.sensor"; static const char *const TAG = "absolute_humidity.sensor";
void AbsoluteHumidityComponent::setup() { void AbsoluteHumidityComponent::setup() {
ESP_LOGCONFIG(TAG, "Running setup for '%s'", this->get_name().c_str());
ESP_LOGD(TAG, " Added callback for temperature '%s'", this->temperature_sensor_->get_name().c_str()); ESP_LOGD(TAG, " Added callback for temperature '%s'", this->temperature_sensor_->get_name().c_str());
this->temperature_sensor_->add_on_state_callback([this](float state) { this->temperature_callback_(state); }); this->temperature_sensor_->add_on_state_callback([this](float state) { this->temperature_callback_(state); });
if (this->temperature_sensor_->has_state()) { if (this->temperature_sensor_->has_state()) {

View File

@ -36,9 +36,7 @@ const LogString *adc_unit_to_str(adc_unit_t unit) {
} }
} }
void ADCSensor::setup() { void ADCSensor::setup() { // Check if another sensor already initialized this ADC unit
ESP_LOGCONFIG(TAG, "Running setup for '%s'", this->get_name().c_str());
// Check if another sensor already initialized this ADC unit
if (ADCSensor::shared_adc_handles[this->adc_unit_] == nullptr) { if (ADCSensor::shared_adc_handles[this->adc_unit_] == nullptr) {
adc_oneshot_unit_init_cfg_t init_config = {}; // Zero initialize adc_oneshot_unit_init_cfg_t init_config = {}; // Zero initialize
init_config.unit_id = this->adc_unit_; init_config.unit_id = this->adc_unit_;

View File

@ -17,9 +17,7 @@ namespace adc {
static const char *const TAG = "adc.esp8266"; static const char *const TAG = "adc.esp8266";
void ADCSensor::setup() { void ADCSensor::setup() {
ESP_LOGCONFIG(TAG, "Running setup for '%s'", this->get_name().c_str()); #ifndef USE_ADC_SENSOR_VCC this->pin_->setup();
#ifndef USE_ADC_SENSOR_VCC
this->pin_->setup();
#endif #endif
} }

View File

@ -9,9 +9,7 @@ namespace adc {
static const char *const TAG = "adc.libretiny"; static const char *const TAG = "adc.libretiny";
void ADCSensor::setup() { void ADCSensor::setup() {
ESP_LOGCONFIG(TAG, "Running setup for '%s'", this->get_name().c_str()); #ifndef USE_ADC_SENSOR_VCC this->pin_->setup();
#ifndef USE_ADC_SENSOR_VCC
this->pin_->setup();
#endif // !USE_ADC_SENSOR_VCC #endif // !USE_ADC_SENSOR_VCC
} }

View File

@ -14,7 +14,6 @@ namespace adc {
static const char *const TAG = "adc.rp2040"; static const char *const TAG = "adc.rp2040";
void ADCSensor::setup() { void ADCSensor::setup() {
ESP_LOGCONFIG(TAG, "Running setup for '%s'", this->get_name().c_str());
static bool initialized = false; static bool initialized = false;
if (!initialized) { if (!initialized) {
adc_init(); adc_init();

View File

@ -8,10 +8,7 @@ static const char *const TAG = "adc128s102";
float ADC128S102::get_setup_priority() const { return setup_priority::HARDWARE; } float ADC128S102::get_setup_priority() const { return setup_priority::HARDWARE; }
void ADC128S102::setup() { void ADC128S102::setup() { this->spi_setup(); }
ESP_LOGCONFIG(TAG, "Running setup");
this->spi_setup();
}
void ADC128S102::dump_config() { void ADC128S102::dump_config() {
ESP_LOGCONFIG(TAG, "ADC128S102:"); ESP_LOGCONFIG(TAG, "ADC128S102:");

View File

@ -10,7 +10,6 @@ static const uint8_t ADS1115_REGISTER_CONVERSION = 0x00;
static const uint8_t ADS1115_REGISTER_CONFIG = 0x01; static const uint8_t ADS1115_REGISTER_CONFIG = 0x01;
void ADS1115Component::setup() { void ADS1115Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
uint16_t value; uint16_t value;
if (!this->read_byte_16(ADS1115_REGISTER_CONVERSION, &value)) { if (!this->read_byte_16(ADS1115_REGISTER_CONVERSION, &value)) {
this->mark_failed(); this->mark_failed();

View File

@ -9,7 +9,6 @@ static const char *const TAG = "ads1118";
static const uint8_t ADS1118_DATA_RATE_860_SPS = 0b111; static const uint8_t ADS1118_DATA_RATE_860_SPS = 0b111;
void ADS1118::setup() { void ADS1118::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
this->spi_setup(); this->spi_setup();
this->config_ = 0; this->config_ = 0;

View File

@ -24,8 +24,6 @@ static const uint16_t ZP_CURRENT = 0x0000;
static const uint16_t ZP_DEFAULT = 0xFFFF; static const uint16_t ZP_DEFAULT = 0xFFFF;
void AGS10Component::setup() { void AGS10Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
auto version = this->read_version_(); auto version = this->read_version_();
if (version) { if (version) {
ESP_LOGD(TAG, "AGS10 Sensor Version: 0x%02X", *version); ESP_LOGD(TAG, "AGS10 Sensor Version: 0x%02X", *version);

View File

@ -38,8 +38,6 @@ static const uint8_t AHT10_STATUS_BUSY = 0x80;
static const float AHT10_DIVISOR = 1048576.0f; // 2^20, used for temperature and humidity calculations static const float AHT10_DIVISOR = 1048576.0f; // 2^20, used for temperature and humidity calculations
void AHT10Component::setup() { void AHT10Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
if (this->write(AHT10_SOFTRESET_CMD, sizeof(AHT10_SOFTRESET_CMD)) != i2c::ERROR_OK) { if (this->write(AHT10_SOFTRESET_CMD, sizeof(AHT10_SOFTRESET_CMD)) != i2c::ERROR_OK) {
ESP_LOGE(TAG, "Reset failed"); ESP_LOGE(TAG, "Reset failed");
} }

View File

@ -16,10 +16,7 @@ static const char *const TAG = "aic3204";
return; \ return; \
} }
void AIC3204::setup() { void AIC3204::setup() { // Set register page to 0
ESP_LOGCONFIG(TAG, "Running setup");
// Set register page to 0
ERROR_CHECK(this->write_byte(AIC3204_PAGE_CTRL, 0x00), "Set page 0 failed"); ERROR_CHECK(this->write_byte(AIC3204_PAGE_CTRL, 0x00), "Set page 0 failed");
// Initiate SW reset (PLL is powered off as part of reset) // Initiate SW reset (PLL is powered off as part of reset)
ERROR_CHECK(this->write_byte(AIC3204_SW_RST, 0x01), "Software reset failed"); ERROR_CHECK(this->write_byte(AIC3204_SW_RST, 0x01), "Software reset failed");

View File

@ -89,10 +89,7 @@ bool AM2315C::convert_(uint8_t *data, float &humidity, float &temperature) {
return this->crc8_(data, 6) == data[6]; return this->crc8_(data, 6) == data[6];
} }
void AM2315C::setup() { void AM2315C::setup() { // get status
ESP_LOGCONFIG(TAG, "Running setup");
// get status
uint8_t status = 0; uint8_t status = 0;
if (this->read(&status, 1) != i2c::ERROR_OK) { if (this->read(&status, 1) != i2c::ERROR_OK) {
ESP_LOGE(TAG, "Read failed!"); ESP_LOGE(TAG, "Read failed!");

View File

@ -34,7 +34,6 @@ void AM2320Component::update() {
this->status_clear_warning(); this->status_clear_warning();
} }
void AM2320Component::setup() { void AM2320Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
uint8_t data[8]; uint8_t data[8];
data[0] = 0; data[0] = 0;
data[1] = 4; data[1] = 4;

View File

@ -54,8 +54,6 @@ enum { // APDS9306 registers
} }
void APDS9306::setup() { void APDS9306::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
uint8_t id; uint8_t id;
if (!this->read_byte(APDS9306_PART_ID, &id)) { // Part ID register if (!this->read_byte(APDS9306_PART_ID, &id)) { // Part ID register
this->error_code_ = COMMUNICATION_FAILED; this->error_code_ = COMMUNICATION_FAILED;

View File

@ -15,7 +15,6 @@ static const char *const TAG = "apds9960";
#define APDS9960_WRITE_BYTE(reg, value) APDS9960_ERROR_CHECK(this->write_byte(reg, value)); #define APDS9960_WRITE_BYTE(reg, value) APDS9960_ERROR_CHECK(this->write_byte(reg, value));
void APDS9960::setup() { void APDS9960::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
uint8_t id; uint8_t id;
if (!this->read_byte(0x92, &id)) { // ID register if (!this->read_byte(0x92, &id)) { // ID register
this->error_code_ = COMMUNICATION_FAILED; this->error_code_ = COMMUNICATION_FAILED;

View File

@ -7,8 +7,6 @@ namespace as3935 {
static const char *const TAG = "as3935"; static const char *const TAG = "as3935";
void AS3935Component::setup() { void AS3935Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
this->irq_pin_->setup(); this->irq_pin_->setup();
LOG_PIN(" IRQ Pin: ", this->irq_pin_); LOG_PIN(" IRQ Pin: ", this->irq_pin_);

View File

@ -7,9 +7,7 @@ namespace as3935_spi {
static const char *const TAG = "as3935_spi"; static const char *const TAG = "as3935_spi";
void SPIAS3935Component::setup() { void SPIAS3935Component::setup() {
ESP_LOGI(TAG, "SPIAS3935Component setup started!");
this->spi_setup(); this->spi_setup();
ESP_LOGI(TAG, "SPI setup finished!");
AS3935Component::setup(); AS3935Component::setup();
} }

View File

@ -23,8 +23,6 @@ static const uint8_t REGISTER_AGC = 0x1A; // 8 bytes / R
static const uint8_t REGISTER_MAGNITUDE = 0x1B; // 16 bytes / R static const uint8_t REGISTER_MAGNITUDE = 0x1B; // 16 bytes / R
void AS5600Component::setup() { void AS5600Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
if (!this->read_byte(REGISTER_STATUS).has_value()) { if (!this->read_byte(REGISTER_STATUS).has_value()) {
this->mark_failed(); this->mark_failed();
return; return;

View File

@ -8,7 +8,6 @@ namespace as7341 {
static const char *const TAG = "as7341"; static const char *const TAG = "as7341";
void AS7341Component::setup() { void AS7341Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
LOG_I2C_DEVICE(this); LOG_I2C_DEVICE(this);
// Verify device ID // Verify device ID

View File

@ -41,7 +41,6 @@ void ATM90E26Component::update() {
} }
void ATM90E26Component::setup() { void ATM90E26Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
this->spi_setup(); this->spi_setup();
uint16_t mmode = 0x422; // default values for everything but L/N line current gains uint16_t mmode = 0x422; // default values for everything but L/N line current gains

View File

@ -109,7 +109,6 @@ void ATM90E32Component::update() {
} }
void ATM90E32Component::setup() { void ATM90E32Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
this->spi_setup(); this->spi_setup();
uint16_t mmode0 = 0x87; // 3P4W 50Hz uint16_t mmode0 = 0x87; // 3P4W 50Hz

View File

@ -17,7 +17,6 @@ constexpr static const uint8_t AXS_READ_TOUCHPAD[11] = {0xb5, 0xab, 0xa5, 0x5a,
} }
void AXS15231Touchscreen::setup() { void AXS15231Touchscreen::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
if (this->reset_pin_ != nullptr) { if (this->reset_pin_ != nullptr) {
this->reset_pin_->setup(); this->reset_pin_->setup();
this->reset_pin_->digital_write(false); this->reset_pin_->digital_write(false);

View File

@ -121,8 +121,6 @@ void spi_dma_tx_finish_callback(unsigned int param) {
} }
void BekenSPILEDStripLightOutput::setup() { void BekenSPILEDStripLightOutput::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
size_t buffer_size = this->get_buffer_size_(); size_t buffer_size = this->get_buffer_size_();
size_t dma_buffer_size = (buffer_size * 8) + (2 * 64); size_t dma_buffer_size = (buffer_size * 8) + (2 * 64);

View File

@ -88,7 +88,6 @@ const char *oversampling_to_str(BME280Oversampling oversampling) { // NOLINT
} }
void BME280Component::setup() { void BME280Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
uint8_t chip_id = 0; uint8_t chip_id = 0;
// Mark as not failed before initializing. Some devices will turn off sensors to save on batteries // Mark as not failed before initializing. Some devices will turn off sensors to save on batteries

View File

@ -71,7 +71,6 @@ static const char *iir_filter_to_str(BME680IIRFilter filter) {
} }
void BME680Component::setup() { void BME680Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
uint8_t chip_id; uint8_t chip_id;
if (!this->read_byte(BME680_REGISTER_CHIPID, &chip_id) || chip_id != 0x61) { if (!this->read_byte(BME680_REGISTER_CHIPID, &chip_id) || chip_id != 0x61) {
this->mark_failed(); this->mark_failed();

View File

@ -21,8 +21,6 @@ static const char *const TAG = "bme68x_bsec2.sensor";
static const std::string IAQ_ACCURACY_STATES[4] = {"Stabilizing", "Uncertain", "Calibrating", "Calibrated"}; static const std::string IAQ_ACCURACY_STATES[4] = {"Stabilizing", "Uncertain", "Calibrating", "Calibrated"};
void BME68xBSEC2Component::setup() { void BME68xBSEC2Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
this->bsec_status_ = bsec_init_m(&this->bsec_instance_); this->bsec_status_ = bsec_init_m(&this->bsec_instance_);
if (this->bsec_status_ != BSEC_OK) { if (this->bsec_status_ != BSEC_OK) {
this->mark_failed(); this->mark_failed();

View File

@ -119,7 +119,6 @@ const float GRAVITY_EARTH = 9.80665f;
void BMI160Component::internal_setup_(int stage) { void BMI160Component::internal_setup_(int stage) {
switch (stage) { switch (stage) {
case 0: case 0:
ESP_LOGCONFIG(TAG, "Running setup");
uint8_t chipid; uint8_t chipid;
if (!this->read_byte(BMI160_REGISTER_CHIPID, &chipid) || (chipid != 0b11010001)) { if (!this->read_byte(BMI160_REGISTER_CHIPID, &chipid) || (chipid != 0b11010001)) {
this->mark_failed(); this->mark_failed();

View File

@ -20,7 +20,6 @@ void BMP085Component::update() {
this->set_timeout("temperature", 5, [this]() { this->read_temperature_(); }); this->set_timeout("temperature", 5, [this]() { this->read_temperature_(); });
} }
void BMP085Component::setup() { void BMP085Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
uint8_t data[22]; uint8_t data[22];
if (!this->read_bytes(BMP085_REGISTER_AC1_H, data, 22)) { if (!this->read_bytes(BMP085_REGISTER_AC1_H, data, 22)) {
this->mark_failed(); this->mark_failed();

View File

@ -57,7 +57,6 @@ static const char *iir_filter_to_str(BMP280IIRFilter filter) {
} }
void BMP280Component::setup() { void BMP280Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
uint8_t chip_id = 0; uint8_t chip_id = 0;
// Read the chip id twice, to work around a bug where the first read is 0. // Read the chip id twice, to work around a bug where the first read is 0.

View File

@ -69,9 +69,7 @@ static const LogString *iir_filter_to_str(IIRFilter filter) {
} }
void BMP3XXComponent::setup() { void BMP3XXComponent::setup() {
this->error_code_ = NONE; this->error_code_ = NONE; // Call the Device base class "initialise" function
ESP_LOGCONFIG(TAG, "Running setup");
// Call the Device base class "initialise" function
if (!reset()) { if (!reset()) {
ESP_LOGE(TAG, "Failed to reset"); ESP_LOGE(TAG, "Failed to reset");
this->error_code_ = ERROR_SENSOR_RESET; this->error_code_ = ERROR_SENSOR_RESET;

View File

@ -127,10 +127,7 @@ void BMP581Component::setup() {
* 6) Configure and prime IIR Filter(s), if enabled * 6) Configure and prime IIR Filter(s), if enabled
*/ */
this->error_code_ = NONE; this->error_code_ = NONE; ////////////////////
ESP_LOGCONFIG(TAG, "Running setup");
////////////////////
// 1) Soft reboot // // 1) Soft reboot //
//////////////////// ////////////////////

View File

@ -15,7 +15,6 @@ static const uint8_t BP1658CJ_ADDR_START_5CH = 0x30;
static const uint8_t BP1658CJ_DELAY = 2; static const uint8_t BP1658CJ_DELAY = 2;
void BP1658CJ::setup() { void BP1658CJ::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
this->data_pin_->setup(); this->data_pin_->setup();
this->data_pin_->digital_write(false); this->data_pin_->digital_write(false);
this->clock_pin_->setup(); this->clock_pin_->setup();

View File

@ -20,7 +20,6 @@ static const uint8_t BP5758D_ALL_DATA_CHANNEL_ENABLEMENT = 0b00011111;
static const uint8_t BP5758D_DELAY = 2; static const uint8_t BP5758D_DELAY = 2;
void BP5758D::setup() { void BP5758D::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
this->data_pin_->setup(); this->data_pin_->setup();
this->data_pin_->digital_write(false); this->data_pin_->digital_write(false);
delayMicroseconds(BP5758D_DELAY); delayMicroseconds(BP5758D_DELAY);

View File

@ -7,7 +7,6 @@ namespace canbus {
static const char *const TAG = "canbus"; static const char *const TAG = "canbus";
void Canbus::setup() { void Canbus::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
if (!this->setup_internal()) { if (!this->setup_internal()) {
ESP_LOGE(TAG, "setup error!"); ESP_LOGE(TAG, "setup error!");
this->mark_failed(); this->mark_failed();

View File

@ -7,10 +7,7 @@ namespace cap1188 {
static const char *const TAG = "cap1188"; static const char *const TAG = "cap1188";
void CAP1188Component::setup() { void CAP1188Component::setup() { // Reset device using the reset pin
ESP_LOGCONFIG(TAG, "Running setup");
// Reset device using the reset pin
if (this->reset_pin_ != nullptr) { if (this->reset_pin_ != nullptr) {
this->reset_pin_->setup(); this->reset_pin_->setup();
this->reset_pin_->digital_write(false); this->reset_pin_->digital_write(false);

View File

@ -10,8 +10,6 @@ static const char *const TAG = "cd74hc4067";
float CD74HC4067Component::get_setup_priority() const { return setup_priority::DATA; } float CD74HC4067Component::get_setup_priority() const { return setup_priority::DATA; }
void CD74HC4067Component::setup() { void CD74HC4067Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
this->pin_s0_->setup(); this->pin_s0_->setup();
this->pin_s1_->setup(); this->pin_s1_->setup();
this->pin_s2_->setup(); this->pin_s2_->setup();

View File

@ -13,9 +13,7 @@ static const uint8_t CH422G_REG_OUT_UPPER = 0x23; // write reg for output bit
static const char *const TAG = "ch422g"; static const char *const TAG = "ch422g";
void CH422GComponent::setup() { void CH422GComponent::setup() { // set outputs before mode
ESP_LOGCONFIG(TAG, "Running setup");
// set outputs before mode
this->write_outputs_(); this->write_outputs_();
// Set mode and check for errors // Set mode and check for errors
if (!this->set_mode_(this->mode_value_) || !this->read_inputs_()) { if (!this->set_mode_(this->mode_value_) || !this->read_inputs_()) {

View File

@ -4,7 +4,6 @@ namespace esphome {
namespace chsc6x { namespace chsc6x {
void CHSC6XTouchscreen::setup() { void CHSC6XTouchscreen::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
if (this->interrupt_pin_ != nullptr) { if (this->interrupt_pin_ != nullptr) {
this->interrupt_pin_->setup(); this->interrupt_pin_->setup();
this->attach_interrupt_(this->interrupt_pin_, gpio::INTERRUPT_FALLING_EDGE); this->attach_interrupt_(this->interrupt_pin_, gpio::INTERRUPT_FALLING_EDGE);

View File

@ -20,7 +20,6 @@ uint8_t cm1106_checksum(const uint8_t *response, size_t len) {
} }
void CM1106Component::setup() { void CM1106Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
uint8_t response[8] = {0}; uint8_t response[8] = {0};
if (!this->cm1106_write_command_(C_M1106_CMD_GET_CO2, sizeof(C_M1106_CMD_GET_CO2), response, sizeof(response))) { if (!this->cm1106_write_command_(C_M1106_CMD_GET_CO2, sizeof(C_M1106_CMD_GET_CO2), response, sizeof(response))) {
ESP_LOGE(TAG, ESP_LOG_MSG_COMM_FAIL); ESP_LOGE(TAG, ESP_LOG_MSG_COMM_FAIL);

View File

@ -52,8 +52,6 @@ bool CS5460AComponent::softreset_() {
} }
void CS5460AComponent::setup() { void CS5460AComponent::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
float current_full_scale = (pga_gain_ == CS5460A_PGA_GAIN_10X) ? 0.25 : 0.10; float current_full_scale = (pga_gain_ == CS5460A_PGA_GAIN_10X) ? 0.25 : 0.10;
float voltage_full_scale = 0.25; float voltage_full_scale = 0.25;
current_multiplier_ = current_full_scale / (fabsf(current_gain_) * 0x1000000); current_multiplier_ = current_full_scale / (fabsf(current_gain_) * 0x1000000);

View File

@ -42,7 +42,6 @@ static const uint8_t CSE7761_CMD_ENABLE_WRITE = 0xE5; // Enable write operation
enum CSE7761 { RMS_IAC, RMS_IBC, RMS_UC, POWER_PAC, POWER_PBC, POWER_SC, ENERGY_AC, ENERGY_BC }; enum CSE7761 { RMS_IAC, RMS_IBC, RMS_UC, POWER_PAC, POWER_PBC, POWER_SC, ENERGY_AC, ENERGY_BC };
void CSE7761Component::setup() { void CSE7761Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
this->write_(CSE7761_SPECIAL_COMMAND, CSE7761_CMD_RESET); this->write_(CSE7761_SPECIAL_COMMAND, CSE7761_CMD_RESET);
uint16_t syscon = this->read_(0x00, 2); // Default 0x0A04 uint16_t syscon = this->read_(0x00, 2); // Default 0x0A04
if ((0x0A04 == syscon) && this->chip_init_()) { if ((0x0A04 == syscon) && this->chip_init_()) {

View File

@ -6,7 +6,6 @@ namespace cst226 {
static const char *const TAG = "cst226.touchscreen"; static const char *const TAG = "cst226.touchscreen";
void CST226Touchscreen::setup() { void CST226Touchscreen::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
if (this->reset_pin_ != nullptr) { if (this->reset_pin_ != nullptr) {
this->reset_pin_->setup(); this->reset_pin_->setup();
this->reset_pin_->digital_write(true); this->reset_pin_->digital_write(true);

View File

@ -39,7 +39,6 @@ void CST816Touchscreen::continue_setup_() {
} }
void CST816Touchscreen::setup() { void CST816Touchscreen::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
if (this->reset_pin_ != nullptr) { if (this->reset_pin_ != nullptr) {
this->reset_pin_->setup(); this->reset_pin_->setup();
this->reset_pin_->digital_write(true); this->reset_pin_->digital_write(true);

View File

@ -20,8 +20,6 @@ static const uint8_t DAC7678_REG_INTERNAL_REF_0 = 0x80;
static const uint8_t DAC7678_REG_INTERNAL_REF_1 = 0x90; static const uint8_t DAC7678_REG_INTERNAL_REF_1 = 0x90;
void DAC7678Output::setup() { void DAC7678Output::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
ESP_LOGV(TAG, "Resetting device"); ESP_LOGV(TAG, "Resetting device");
// Reset device // Reset device

View File

@ -70,7 +70,6 @@ bool DallasTemperatureSensor::read_scratch_pad_() {
} }
void DallasTemperatureSensor::setup() { void DallasTemperatureSensor::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
if (!this->check_address_()) if (!this->check_address_())
return; return;
if (!this->read_scratch_pad_()) if (!this->read_scratch_pad_())

View File

@ -12,7 +12,6 @@ static const uint32_t TEARDOWN_TIMEOUT_DEEP_SLEEP_MS = 5000;
bool global_has_deep_sleep = false; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables) bool global_has_deep_sleep = false; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
void DeepSleepComponent::setup() { void DeepSleepComponent::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
global_has_deep_sleep = true; global_has_deep_sleep = true;
const optional<uint32_t> run_duration = get_run_duration_(); const optional<uint32_t> run_duration = get_run_duration_();

View File

@ -8,7 +8,6 @@ namespace dht {
static const char *const TAG = "dht"; static const char *const TAG = "dht";
void DHT::setup() { void DHT::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
this->pin_->digital_write(true); this->pin_->digital_write(true);
this->pin_->setup(); this->pin_->setup();
this->pin_->digital_write(true); this->pin_->digital_write(true);

View File

@ -34,7 +34,6 @@ void DHT12Component::update() {
this->status_clear_warning(); this->status_clear_warning();
} }
void DHT12Component::setup() { void DHT12Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
uint8_t data[5]; uint8_t data[5];
if (!this->read_data_(data)) { if (!this->read_data_(data)) {
this->mark_failed(); this->mark_failed();

View File

@ -10,10 +10,7 @@ static const char *const TAG = "dps310";
void DPS310Component::setup() { void DPS310Component::setup() {
uint8_t coef_data_raw[DPS310_NUM_COEF_REGS]; uint8_t coef_data_raw[DPS310_NUM_COEF_REGS];
auto timer = DPS310_INIT_TIMEOUT; auto timer = DPS310_INIT_TIMEOUT;
uint8_t reg = 0; uint8_t reg = 0; // first, reset the sensor
ESP_LOGCONFIG(TAG, "Running setup");
// first, reset the sensor
if (!this->write_byte(DPS310_REG_RESET, DPS310_CMD_RESET)) { if (!this->write_byte(DPS310_REG_RESET, DPS310_CMD_RESET)) {
this->mark_failed(); this->mark_failed();
return; return;

View File

@ -10,7 +10,6 @@ namespace ds1307 {
static const char *const TAG = "ds1307"; static const char *const TAG = "ds1307";
void DS1307Component::setup() { void DS1307Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
if (!this->read_rtc_()) { if (!this->read_rtc_()) {
this->mark_failed(); this->mark_failed();
} }

View File

@ -5,7 +5,6 @@ namespace ds2484 {
static const char *const TAG = "ds2484.onewire"; static const char *const TAG = "ds2484.onewire";
void DS2484OneWireBus::setup() { void DS2484OneWireBus::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
this->reset_device(); this->reset_device();
this->search(); this->search();
} }

View File

@ -8,7 +8,6 @@ namespace duty_cycle {
static const char *const TAG = "duty_cycle"; static const char *const TAG = "duty_cycle";
void DutyCycleSensor::setup() { void DutyCycleSensor::setup() {
ESP_LOGCONFIG(TAG, "Running setup for '%s'", this->get_name().c_str());
this->pin_->setup(); this->pin_->setup();
this->store_.pin = this->pin_->to_isr(); this->store_.pin = this->pin_->to_isr();
this->store_.last_level = this->pin_->digital_read(); this->store_.last_level = this->pin_->digital_read();

View File

@ -16,7 +16,6 @@ static const uint16_t PRESSURE_ADDRESS = 0x04B0;
void EE895Component::setup() { void EE895Component::setup() {
uint16_t crc16_check = 0; uint16_t crc16_check = 0;
ESP_LOGCONFIG(TAG, "Running setup");
write_command_(SERIAL_NUMBER, 8); write_command_(SERIAL_NUMBER, 8);
uint8_t serial_number[20]; uint8_t serial_number[20];
this->read(serial_number, 20); this->read(serial_number, 20);

View File

@ -16,7 +16,6 @@ static const uint8_t GET_Y_RES[4] = {0x53, 0x63, 0x00, 0x00};
static const uint8_t GET_POWER_STATE_CMD[4] = {0x53, 0x50, 0x00, 0x01}; static const uint8_t GET_POWER_STATE_CMD[4] = {0x53, 0x50, 0x00, 0x01};
void EKTF2232Touchscreen::setup() { void EKTF2232Touchscreen::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
this->interrupt_pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP); this->interrupt_pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP);
this->interrupt_pin_->setup(); this->interrupt_pin_->setup();

View File

@ -56,10 +56,7 @@ static const uint8_t EMC2101_POLARITY_BIT = 1 << 4;
float Emc2101Component::get_setup_priority() const { return setup_priority::HARDWARE; } float Emc2101Component::get_setup_priority() const { return setup_priority::HARDWARE; }
void Emc2101Component::setup() { void Emc2101Component::setup() { // make sure we're talking to the right chip
ESP_LOGCONFIG(TAG, "Running setup");
// make sure we're talking to the right chip
uint8_t chip_id = reg(EMC2101_REGISTER_WHOAMI).get(); uint8_t chip_id = reg(EMC2101_REGISTER_WHOAMI).get();
if ((chip_id != EMC2101_CHIP_ID) && (chip_id != EMC2101_ALT_CHIP_ID)) { if ((chip_id != EMC2101_CHIP_ID) && (chip_id != EMC2101_ALT_CHIP_ID)) {
ESP_LOGE(TAG, "Wrong chip ID %02X", chip_id); ESP_LOGE(TAG, "Wrong chip ID %02X", chip_id);

View File

@ -48,10 +48,7 @@ static const uint8_t ENS160_DATA_STATUS_NEWGPR = 0x01;
// helps remove reserved bits in aqi data register // helps remove reserved bits in aqi data register
static const uint8_t ENS160_DATA_AQI = 0x07; static const uint8_t ENS160_DATA_AQI = 0x07;
void ENS160Component::setup() { void ENS160Component::setup() { // check part_id
ESP_LOGCONFIG(TAG, "Running setup");
// check part_id
uint16_t part_id; uint16_t part_id;
if (!this->read_bytes(ENS160_REG_PART_ID, reinterpret_cast<uint8_t *>(&part_id), 2)) { if (!this->read_bytes(ENS160_REG_PART_ID, reinterpret_cast<uint8_t *>(&part_id), 2)) {
this->error_code_ = COMMUNICATION_FAILED; this->error_code_ = COMMUNICATION_FAILED;

View File

@ -87,7 +87,6 @@ static uint32_t crc7(uint32_t value) {
} }
void ENS210Component::setup() { void ENS210Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
uint8_t data[2]; uint8_t data[2];
uint16_t part_id = 0; uint16_t part_id = 0;
// Reset // Reset

View File

@ -37,10 +37,7 @@ void ES7210::dump_config() {
} }
} }
void ES7210::setup() { void ES7210::setup() { // Software reset
ESP_LOGCONFIG(TAG, "Running setup");
// Software reset
ES7210_ERROR_FAILED(this->write_byte(ES7210_RESET_REG00, 0xff)); ES7210_ERROR_FAILED(this->write_byte(ES7210_RESET_REG00, 0xff));
ES7210_ERROR_FAILED(this->write_byte(ES7210_RESET_REG00, 0x32)); ES7210_ERROR_FAILED(this->write_byte(ES7210_RESET_REG00, 0x32));
ES7210_ERROR_FAILED(this->write_byte(ES7210_CLOCK_OFF_REG01, 0x3f)); ES7210_ERROR_FAILED(this->write_byte(ES7210_CLOCK_OFF_REG01, 0x3f));

View File

@ -34,8 +34,6 @@ void ES7243E::dump_config() {
} }
void ES7243E::setup() { void ES7243E::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
ES7243E_ERROR_FAILED(this->write_byte(ES7243E_CLOCK_MGR_REG01, 0x3A)); ES7243E_ERROR_FAILED(this->write_byte(ES7243E_CLOCK_MGR_REG01, 0x3A));
ES7243E_ERROR_FAILED(this->write_byte(ES7243E_RESET_REG00, 0x80)); ES7243E_ERROR_FAILED(this->write_byte(ES7243E_RESET_REG00, 0x80));
ES7243E_ERROR_FAILED(this->write_byte(ES7243E_TEST_MODE_REGF9, 0x00)); ES7243E_ERROR_FAILED(this->write_byte(ES7243E_TEST_MODE_REGF9, 0x00));

View File

@ -17,8 +17,6 @@ static const char *const TAG = "es8156";
} }
void ES8156::setup() { void ES8156::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
ES8156_ERROR_FAILED(this->write_byte(ES8156_REG02_SCLK_MODE, 0x04)); ES8156_ERROR_FAILED(this->write_byte(ES8156_REG02_SCLK_MODE, 0x04));
ES8156_ERROR_FAILED(this->write_byte(ES8156_REG20_ANALOG_SYS1, 0x2A)); ES8156_ERROR_FAILED(this->write_byte(ES8156_REG20_ANALOG_SYS1, 0x2A));
ES8156_ERROR_FAILED(this->write_byte(ES8156_REG21_ANALOG_SYS2, 0x3C)); ES8156_ERROR_FAILED(this->write_byte(ES8156_REG21_ANALOG_SYS2, 0x3C));

View File

@ -21,10 +21,7 @@ static const char *const TAG = "es8311";
return false; \ return false; \
} }
void ES8311::setup() { void ES8311::setup() { // Reset
ESP_LOGCONFIG(TAG, "Running setup");
// Reset
ES8311_ERROR_FAILED(this->write_byte(ES8311_REG00_RESET, 0x1F)); ES8311_ERROR_FAILED(this->write_byte(ES8311_REG00_RESET, 0x1F));
ES8311_ERROR_FAILED(this->write_byte(ES8311_REG00_RESET, 0x00)); ES8311_ERROR_FAILED(this->write_byte(ES8311_REG00_RESET, 0x00));

View File

@ -22,10 +22,7 @@ static const char *const TAG = "es8388";
return false; \ return false; \
} }
void ES8388::setup() { void ES8388::setup() { // mute DAC
ESP_LOGCONFIG(TAG, "Running setup");
// mute DAC
this->set_mute_state_(true); this->set_mute_state_(true);
// I2S worker mode // I2S worker mode

View File

@ -25,8 +25,6 @@ static const char *const TAG = "esp32_ble";
void ESP32BLE::setup() { void ESP32BLE::setup() {
global_ble = this; global_ble = this;
ESP_LOGCONFIG(TAG, "Running setup");
if (!ble_pre_setup_()) { if (!ble_pre_setup_()) {
ESP_LOGE(TAG, "BLE could not be prepared for configuration"); ESP_LOGE(TAG, "BLE could not be prepared for configuration");
this->mark_failed(); this->mark_failed();

View File

@ -20,7 +20,6 @@ static constexpr uint8_t DAC0_PIN = 25;
static const char *const TAG = "esp32_dac"; static const char *const TAG = "esp32_dac";
void ESP32DAC::setup() { void ESP32DAC::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
this->pin_->setup(); this->pin_->setup();
this->turn_off(); this->turn_off();

View File

@ -59,8 +59,6 @@ static size_t IRAM_ATTR HOT encoder_callback(const void *data, size_t size, size
#endif #endif
void ESP32RMTLEDStripLightOutput::setup() { void ESP32RMTLEDStripLightOutput::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
size_t buffer_size = this->get_buffer_size_(); size_t buffer_size = this->get_buffer_size_();
RAMAllocator<uint8_t> allocator(this->use_psram_ ? 0 : RAMAllocator<uint8_t>::ALLOC_INTERNAL); RAMAllocator<uint8_t> allocator(this->use_psram_ ? 0 : RAMAllocator<uint8_t>::ALLOC_INTERNAL);

View File

@ -14,7 +14,6 @@ namespace esp8266_pwm {
static const char *const TAG = "esp8266_pwm"; static const char *const TAG = "esp8266_pwm";
void ESP8266PWM::setup() { void ESP8266PWM::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
this->pin_->setup(); this->pin_->setup();
this->turn_off(); this->turn_off();
} }

View File

@ -54,7 +54,6 @@ EthernetComponent *global_eth_component; // NOLINT(cppcoreguidelines-avoid-non-
EthernetComponent::EthernetComponent() { global_eth_component = this; } EthernetComponent::EthernetComponent() { global_eth_component = this; }
void EthernetComponent::setup() { void EthernetComponent::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
if (esp_reset_reason() != ESP_RST_DEEPSLEEP) { if (esp_reset_reason() != ESP_RST_DEEPSLEEP) {
// Delay here to allow power to stabilise before Ethernet is initialized. // Delay here to allow power to stabilise before Ethernet is initialized.
delay(300); // NOLINT delay(300); // NOLINT

View File

@ -9,7 +9,6 @@ namespace fastled_base {
static const char *const TAG = "fastled"; static const char *const TAG = "fastled";
void FastLEDLightOutput::setup() { void FastLEDLightOutput::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
this->controller_->init(); this->controller_->init();
this->controller_->setLeds(this->leds_, this->num_leds_); this->controller_->setLeds(this->leds_, this->num_leds_);
this->effect_data_ = new uint8_t[this->num_leds_]; // NOLINT this->effect_data_ = new uint8_t[this->num_leds_]; // NOLINT

View File

@ -57,8 +57,6 @@ void FingerprintGrowComponent::update() {
} }
void FingerprintGrowComponent::setup() { void FingerprintGrowComponent::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
this->has_sensing_pin_ = (this->sensing_pin_ != nullptr); this->has_sensing_pin_ = (this->sensing_pin_ != nullptr);
this->has_power_pin_ = (this->sensor_power_pin_ != nullptr); this->has_power_pin_ = (this->sensor_power_pin_ != nullptr);

View File

@ -7,8 +7,6 @@ namespace fs3000 {
static const char *const TAG = "fs3000"; static const char *const TAG = "fs3000";
void FS3000Component::setup() { void FS3000Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
if (model_ == FIVE) { if (model_ == FIVE) {
// datasheet gives 9 points to interpolate from for the 1005 model // datasheet gives 9 points to interpolate from for the 1005 model
static const uint16_t RAW_DATA_POINTS_1005[9] = {409, 915, 1522, 2066, 2523, 2908, 3256, 3572, 3686}; static const uint16_t RAW_DATA_POINTS_1005[9] = {409, 915, 1522, 2066, 2523, 2908, 3256, 3572, 3686};

View File

@ -9,7 +9,6 @@ namespace ft5x06 {
static const char *const TAG = "ft5x06.touchscreen"; static const char *const TAG = "ft5x06.touchscreen";
void FT5x06Touchscreen::setup() { void FT5x06Touchscreen::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
if (this->interrupt_pin_ != nullptr) { if (this->interrupt_pin_ != nullptr) {
this->interrupt_pin_->setup(); this->interrupt_pin_->setup();
this->interrupt_pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP); this->interrupt_pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP);

View File

@ -28,7 +28,6 @@ static const uint8_t FT63X6_ADDR_CHIP_ID = 0xA3;
static const char *const TAG = "FT63X6"; static const char *const TAG = "FT63X6";
void FT63X6Touchscreen::setup() { void FT63X6Touchscreen::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
if (this->interrupt_pin_ != nullptr) { if (this->interrupt_pin_ != nullptr) {
this->interrupt_pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP); this->interrupt_pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP);
this->interrupt_pin_->setup(); this->interrupt_pin_->setup();

View File

@ -33,9 +33,7 @@ void GDK101Component::update() {
} }
void GDK101Component::setup() { void GDK101Component::setup() {
uint8_t data[2]; uint8_t data[2]; // first, reset the sensor
ESP_LOGCONFIG(TAG, "Running setup");
// first, reset the sensor
if (!this->reset_sensor_(data)) { if (!this->reset_sensor_(data)) {
this->status_set_error("Reset failed!"); this->status_set_error("Reset failed!");
this->mark_failed(); this->mark_failed();

View File

@ -8,7 +8,6 @@ namespace gpio {
static const char *const TAG = "gpio.one_wire"; static const char *const TAG = "gpio.one_wire";
void GPIOOneWireBus::setup() { void GPIOOneWireBus::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
this->t_pin_->setup(); this->t_pin_->setup();
this->t_pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP); this->t_pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP);
// clear bus with 480µs high, otherwise initial reset in search might fail // clear bus with 480µs high, otherwise initial reset in search might fail

View File

@ -32,9 +32,7 @@ bool GroveGasMultichannelV2Component::read_sensor_(uint8_t address, sensor::Sens
return true; return true;
} }
void GroveGasMultichannelV2Component::setup() { void GroveGasMultichannelV2Component::setup() { // Before reading sensor values, must preheat sensor
ESP_LOGCONFIG(TAG, "Running setup");
// Before reading sensor values, must preheat sensor
if (!(this->write_bytes(GROVE_GAS_MC_V2_HEAT_ON, {}))) { if (!(this->write_bytes(GROVE_GAS_MC_V2_HEAT_ON, {}))) {
this->mark_failed(); this->mark_failed();
this->error_code_ = APP_START_FAILED; this->error_code_ = APP_START_FAILED;

View File

@ -24,7 +24,6 @@ void GroveMotorDriveTB6612FNG::dump_config() {
} }
void GroveMotorDriveTB6612FNG::setup() { void GroveMotorDriveTB6612FNG::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
if (!this->standby()) { if (!this->standby()) {
this->mark_failed(); this->mark_failed();
return; return;

View File

@ -26,7 +26,6 @@ static const size_t MAX_BUTTONS = 4; // max number of buttons scanned
void GT911Touchscreen::setup() { void GT911Touchscreen::setup() {
i2c::ErrorCode err; i2c::ErrorCode err;
ESP_LOGCONFIG(TAG, "Running setup");
if (this->reset_pin_ != nullptr) { if (this->reset_pin_ != nullptr) {
this->reset_pin_->setup(); this->reset_pin_->setup();
this->reset_pin_->digital_write(false); this->reset_pin_->digital_write(false);

View File

@ -241,9 +241,7 @@ haier_protocol::HandlerError HaierClimateBase::timeout_default_handler_(haier_pr
return haier_protocol::HandlerError::HANDLER_OK; return haier_protocol::HandlerError::HANDLER_OK;
} }
void HaierClimateBase::setup() { void HaierClimateBase::setup() { // Set timestamp here to give AC time to boot
ESP_LOGCONFIG(TAG, "Running setup");
// Set timestamp here to give AC time to boot
this->last_request_timestamp_ = std::chrono::steady_clock::now(); this->last_request_timestamp_ = std::chrono::steady_clock::now();
this->set_phase(ProtocolPhases::SENDING_INIT_1); this->set_phase(ProtocolPhases::SENDING_INIT_1);
this->haier_protocol_.set_default_timeout_handler( this->haier_protocol_.set_default_timeout_handler(

View File

@ -13,8 +13,6 @@ static const uint8_t HDC1080_CMD_TEMPERATURE = 0x00;
static const uint8_t HDC1080_CMD_HUMIDITY = 0x01; static const uint8_t HDC1080_CMD_HUMIDITY = 0x01;
void HDC1080Component::setup() { void HDC1080Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
const uint8_t data[2] = { const uint8_t data[2] = {
0b00000000, // resolution 14bit for both humidity and temperature 0b00000000, // resolution 14bit for both humidity and temperature
0b00000000 // reserved 0b00000000 // reserved

View File

@ -11,7 +11,6 @@ static const uint32_t HLW8012_CLOCK_FREQUENCY = 3579000;
void HLW8012Component::setup() { void HLW8012Component::setup() {
float reference_voltage = 0; float reference_voltage = 0;
ESP_LOGCONFIG(TAG, "Running setup");
this->sel_pin_->setup(); this->sel_pin_->setup();
this->sel_pin_->digital_write(this->current_mode_); this->sel_pin_->digital_write(this->current_mode_);
this->cf_store_.pulse_counter_setup(this->cf_pin_); this->cf_store_.pulse_counter_setup(this->cf_pin_);

View File

@ -11,7 +11,6 @@ static const uint8_t PM_2_5_VALUE_INDEX = 6;
static const uint8_t PM_10_0_VALUE_INDEX = 7; static const uint8_t PM_10_0_VALUE_INDEX = 7;
void HM3301Component::setup() { void HM3301Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
if (i2c::ERROR_OK != this->write(&SELECT_COMM_CMD, 1)) { if (i2c::ERROR_OK != this->write(&SELECT_COMM_CMD, 1)) {
error_code_ = ERROR_COMM; error_code_ = ERROR_COMM;
this->mark_failed(); this->mark_failed();

View File

@ -22,7 +22,6 @@ static const uint8_t HMC5883L_REGISTER_IDENTIFICATION_B = 0x0B;
static const uint8_t HMC5883L_REGISTER_IDENTIFICATION_C = 0x0C; static const uint8_t HMC5883L_REGISTER_IDENTIFICATION_C = 0x0C;
void HMC5883LComponent::setup() { void HMC5883LComponent::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
uint8_t id[3]; uint8_t id[3];
if (!this->read_byte(HMC5883L_REGISTER_IDENTIFICATION_A, &id[0]) || if (!this->read_byte(HMC5883L_REGISTER_IDENTIFICATION_A, &id[0]) ||
!this->read_byte(HMC5883L_REGISTER_IDENTIFICATION_B, &id[1]) || !this->read_byte(HMC5883L_REGISTER_IDENTIFICATION_B, &id[1]) ||

View File

@ -8,7 +8,6 @@ namespace hte501 {
static const char *const TAG = "hte501"; static const char *const TAG = "hte501";
void HTE501Component::setup() { void HTE501Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
uint8_t address[] = {0x70, 0x29}; uint8_t address[] = {0x70, 0x29};
this->write(address, 2, false); this->write(address, 2, false);
uint8_t identification[9]; uint8_t identification[9];

View File

@ -18,8 +18,6 @@ static const uint8_t HTU21D_READHEATER_REG_CMD = 0x11; /**< Read Heater Control
static const uint8_t HTU21D_REG_HTRE_BIT = 0x02; /**< Control Register Heater Bit */ static const uint8_t HTU21D_REG_HTRE_BIT = 0x02; /**< Control Register Heater Bit */
void HTU21DComponent::setup() { void HTU21DComponent::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
if (!this->write_bytes(HTU21D_REGISTER_RESET, nullptr, 0)) { if (!this->write_bytes(HTU21D_REGISTER_RESET, nullptr, 0)) {
this->mark_failed(); this->mark_failed();
return; return;

View File

@ -75,8 +75,6 @@ uint8_t compute_crc(uint32_t value) {
* I2C. * I2C.
*/ */
void HTU31DComponent::setup() { void HTU31DComponent::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
if (!this->reset_()) { if (!this->reset_()) {
this->mark_failed(); this->mark_failed();
return; return;

View File

@ -41,7 +41,6 @@ void HydreonRGxxComponent::dump_config() {
} }
void HydreonRGxxComponent::setup() { void HydreonRGxxComponent::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
while (this->available() != 0) { while (this->available() != 0) {
this->read(); this->read();
} }

View File

@ -13,7 +13,6 @@ namespace i2c {
static const char *const TAG = "i2c.arduino"; static const char *const TAG = "i2c.arduino";
void ArduinoI2CBus::setup() { void ArduinoI2CBus::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
recover_(); recover_();
#if defined(USE_ESP32) #if defined(USE_ESP32)

View File

@ -19,7 +19,6 @@ namespace i2c {
static const char *const TAG = "i2c.idf"; static const char *const TAG = "i2c.idf";
void IDFI2CBus::setup() { void IDFI2CBus::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
static i2c_port_t next_port = I2C_NUM_0; static i2c_port_t next_port = I2C_NUM_0;
this->port_ = next_port; this->port_ = next_port;
if (this->port_ == I2C_NUM_MAX) { if (this->port_ == I2C_NUM_MAX) {

View File

@ -10,8 +10,6 @@ namespace i2s_audio {
static const char *const TAG = "i2s_audio"; static const char *const TAG = "i2s_audio";
void I2SAudioComponent::setup() { void I2SAudioComponent::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
static i2s_port_t next_port_num = I2S_NUM_0; static i2s_port_t next_port_num = I2S_NUM_0;
if (next_port_num >= SOC_I2S_NUM) { if (next_port_num >= SOC_I2S_NUM) {
ESP_LOGE(TAG, "Too many components"); ESP_LOGE(TAG, "Too many components");

View File

@ -119,10 +119,7 @@ void I2SAudioMediaPlayer::set_volume_(float volume, bool publish) {
this->volume = volume; this->volume = volume;
} }
void I2SAudioMediaPlayer::setup() { void I2SAudioMediaPlayer::setup() { this->state = media_player::MEDIA_PLAYER_STATE_IDLE; }
ESP_LOGCONFIG(TAG, "Running setup");
this->state = media_player::MEDIA_PLAYER_STATE_IDLE;
}
void I2SAudioMediaPlayer::loop() { void I2SAudioMediaPlayer::loop() {
switch (this->i2s_state_) { switch (this->i2s_state_) {

View File

@ -40,7 +40,6 @@ enum MicrophoneEventGroupBits : uint32_t {
}; };
void I2SAudioMicrophone::setup() { void I2SAudioMicrophone::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
#ifdef USE_I2S_LEGACY #ifdef USE_I2S_LEGACY
#if SOC_I2S_SUPPORTS_ADC #if SOC_I2S_SUPPORTS_ADC
if (this->adc_) { if (this->adc_) {

View File

@ -61,8 +61,6 @@ static const std::vector<int16_t> Q15_VOLUME_SCALING_FACTORS = {
19508, 20665, 21891, 23189, 24565, 26022, 27566, 29201, 30933, 32767}; 19508, 20665, 21891, 23189, 24565, 26022, 27566, 29201, 30933, 32767};
void I2SAudioSpeaker::setup() { void I2SAudioSpeaker::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
this->event_group_ = xEventGroupCreate(); this->event_group_ = xEventGroupCreate();
if (this->event_group_ == nullptr) { if (this->event_group_ == nullptr) {

View File

@ -33,9 +33,7 @@ static const uint8_t INA219_REGISTER_POWER = 0x03;
static const uint8_t INA219_REGISTER_CURRENT = 0x04; static const uint8_t INA219_REGISTER_CURRENT = 0x04;
static const uint8_t INA219_REGISTER_CALIBRATION = 0x05; static const uint8_t INA219_REGISTER_CALIBRATION = 0x05;
void INA219Component::setup() { void INA219Component::setup() { // Config Register
ESP_LOGCONFIG(TAG, "Running setup");
// Config Register
// 0bx000000000000000 << 15 RESET Bit (1 -> trigger reset) // 0bx000000000000000 << 15 RESET Bit (1 -> trigger reset)
if (!this->write_byte_16(INA219_REGISTER_CONFIG, 0x8000)) { if (!this->write_byte_16(INA219_REGISTER_CONFIG, 0x8000)) {
this->mark_failed(); this->mark_failed();

View File

@ -37,8 +37,6 @@ static const uint16_t INA226_ADC_TIMES[] = {140, 204, 332, 588, 1100, 2116, 4156
static const uint16_t INA226_ADC_AVG_SAMPLES[] = {1, 4, 16, 64, 128, 256, 512, 1024}; static const uint16_t INA226_ADC_AVG_SAMPLES[] = {1, 4, 16, 64, 128, 256, 512, 1024};
void INA226Component::setup() { void INA226Component::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
ConfigurationRegister config; ConfigurationRegister config;
config.reset = 1; config.reset = 1;

View File

@ -34,10 +34,7 @@ static const uint8_t INA260_REGISTER_ALERT_LIMIT = 0x07;
static const uint8_t INA260_REGISTER_MANUFACTURE_ID = 0xFE; static const uint8_t INA260_REGISTER_MANUFACTURE_ID = 0xFE;
static const uint8_t INA260_REGISTER_DEVICE_ID = 0xFF; static const uint8_t INA260_REGISTER_DEVICE_ID = 0xFF;
void INA260Component::setup() { void INA260Component::setup() { // Reset device on setup
ESP_LOGCONFIG(TAG, "Running setup");
// Reset device on setup
if (!this->write_byte_16(INA260_REGISTER_CONFIG, 0x8000)) { if (!this->write_byte_16(INA260_REGISTER_CONFIG, 0x8000)) {
this->error_code_ = DEVICE_RESET_FAILED; this->error_code_ = DEVICE_RESET_FAILED;
this->mark_failed(); this->mark_failed();

View File

@ -50,8 +50,6 @@ static bool check_model_and_device_match(INAModel model, uint16_t dev_id) {
} }
void INA2XX::setup() { void INA2XX::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
if (!this->reset_config_()) { if (!this->reset_config_()) {
ESP_LOGE(TAG, "Reset failed, check connection"); ESP_LOGE(TAG, "Reset failed, check connection");
this->mark_failed(); this->mark_failed();

View File

@ -21,9 +21,7 @@ static const uint8_t INA3221_REGISTER_CHANNEL3_BUS_VOLTAGE = 0x06;
// A0 = SDA -> 0x42 // A0 = SDA -> 0x42
// A0 = SCL -> 0x43 // A0 = SCL -> 0x43
void INA3221Component::setup() { void INA3221Component::setup() { // Config Register
ESP_LOGCONFIG(TAG, "Running setup");
// Config Register
// 0bx000000000000000 << 15 RESET Bit (1 -> trigger reset) // 0bx000000000000000 << 15 RESET Bit (1 -> trigger reset)
if (!this->write_byte_16(INA3221_REGISTER_CONFIG, 0x8000)) { if (!this->write_byte_16(INA3221_REGISTER_CONFIG, 0x8000)) {
this->mark_failed(); this->mark_failed();

View File

@ -83,10 +83,8 @@ void InternalTemperatureSensor::setup() {
#ifdef USE_ESP32 #ifdef USE_ESP32
#if defined(USE_ESP32_VARIANT_ESP32C3) || defined(USE_ESP32_VARIANT_ESP32C6) || defined(USE_ESP32_VARIANT_ESP32S2) || \ #if defined(USE_ESP32_VARIANT_ESP32C3) || defined(USE_ESP32_VARIANT_ESP32C6) || defined(USE_ESP32_VARIANT_ESP32S2) || \
defined(USE_ESP32_VARIANT_ESP32S3) || defined(USE_ESP32_VARIANT_ESP32H2) || defined(USE_ESP32_VARIANT_ESP32C2) || \ defined(USE_ESP32_VARIANT_ESP32S3) || defined(USE_ESP32_VARIANT_ESP32H2) || defined(USE_ESP32_VARIANT_ESP32C2) || \
defined(USE_ESP32_VARIANT_ESP32P4) defined(USE_ESP32_VARIANT_ESP32P4) \
ESP_LOGCONFIG(TAG, "Running setup"); temperature_sensor_config_t tsens_config = TEMPERATURE_SENSOR_CONFIG_DEFAULT(-10, 80);
temperature_sensor_config_t tsens_config = TEMPERATURE_SENSOR_CONFIG_DEFAULT(-10, 80);
esp_err_t result = temperature_sensor_install(&tsens_config, &tsensNew); esp_err_t result = temperature_sensor_install(&tsens_config, &tsensNew);
if (result != ESP_OK) { if (result != ESP_OK) {

View File

@ -14,7 +14,6 @@ static const uint8_t KMETER_INTERNAL_TEMP_VAL_REG = 0x10;
static const uint8_t KMETER_FIRMWARE_VERSION_REG = 0xFE; static const uint8_t KMETER_FIRMWARE_VERSION_REG = 0xFE;
void KMeterISOComponent::setup() { void KMeterISOComponent::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
this->error_code_ = NONE; this->error_code_ = NONE;
// Mark as not failed before initializing. Some devices will turn off sensors to save on batteries // Mark as not failed before initializing. Some devices will turn off sensors to save on batteries

Some files were not shown because too many files have changed in this diff Show More