mirror of
https://github.com/esphome/esphome.git
synced 2025-07-28 14:16:40 +00:00
Streamline setup() logging (e, f) (#8926)
This commit is contained in:
parent
6e0523109a
commit
18653f8f69
@ -16,7 +16,7 @@ static const uint16_t PRESSURE_ADDRESS = 0x04B0;
|
||||
|
||||
void EE895Component::setup() {
|
||||
uint16_t crc16_check = 0;
|
||||
ESP_LOGCONFIG(TAG, "Setting up EE895...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
write_command_(SERIAL_NUMBER, 8);
|
||||
uint8_t serial_number[20];
|
||||
this->read(serial_number, 20);
|
||||
|
@ -16,7 +16,7 @@ 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};
|
||||
|
||||
void EKTF2232Touchscreen::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up EKT2232 Touchscreen...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->interrupt_pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP);
|
||||
this->interrupt_pin_->setup();
|
||||
|
||||
|
@ -57,7 +57,7 @@ static const uint8_t EMC2101_POLARITY_BIT = 1 << 4;
|
||||
float Emc2101Component::get_setup_priority() const { return setup_priority::HARDWARE; }
|
||||
|
||||
void Emc2101Component::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up Emc2101 sensor...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
// make sure we're talking to the right chip
|
||||
uint8_t chip_id = reg(EMC2101_REGISTER_WHOAMI).get();
|
||||
|
@ -49,7 +49,7 @@ static const uint8_t ENS160_DATA_STATUS_NEWGPR = 0x01;
|
||||
static const uint8_t ENS160_DATA_AQI = 0x07;
|
||||
|
||||
void ENS160Component::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up ENS160...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
// check part_id
|
||||
uint16_t part_id;
|
||||
|
@ -87,7 +87,7 @@ static uint32_t crc7(uint32_t value) {
|
||||
}
|
||||
|
||||
void ENS210Component::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up ENS210...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
uint8_t data[2];
|
||||
uint16_t part_id = 0;
|
||||
// Reset
|
||||
|
@ -36,7 +36,7 @@ void ES7210::dump_config() {
|
||||
}
|
||||
|
||||
void ES7210::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up ES7210...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
// Software reset
|
||||
ES7210_ERROR_FAILED(this->write_byte(ES7210_RESET_REG00, 0xff));
|
||||
|
@ -34,7 +34,7 @@ void ES7243E::dump_config() {
|
||||
}
|
||||
|
||||
void ES7243E::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up ES7243E...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
ES7243E_ERROR_FAILED(this->write_byte(ES7243E_CLOCK_MGR_REG01, 0x3A));
|
||||
ES7243E_ERROR_FAILED(this->write_byte(ES7243E_RESET_REG00, 0x80));
|
||||
|
@ -17,7 +17,7 @@ static const char *const TAG = "es8156";
|
||||
}
|
||||
|
||||
void ES8156::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up ES8156...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
ES8156_ERROR_FAILED(this->write_byte(ES8156_REG02_SCLK_MODE, 0x04));
|
||||
ES8156_ERROR_FAILED(this->write_byte(ES8156_REG20_ANALOG_SYS1, 0x2A));
|
||||
|
@ -22,7 +22,7 @@ static const char *const TAG = "es8311";
|
||||
}
|
||||
|
||||
void ES8311::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up ES8311...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
// Reset
|
||||
ES8311_ERROR_FAILED(this->write_byte(ES8311_REG00_RESET, 0x1F));
|
||||
|
@ -23,7 +23,7 @@ static const char *const TAG = "es8388";
|
||||
}
|
||||
|
||||
void ES8388::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up ES8388...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
// mute DAC
|
||||
this->set_mute_state_(true);
|
||||
|
@ -28,7 +28,7 @@ static RAMAllocator<BLEEvent> EVENT_ALLOCATOR( // NOLINT(cppcoreguidelines-avoi
|
||||
|
||||
void ESP32BLE::setup() {
|
||||
global_ble = this;
|
||||
ESP_LOGCONFIG(TAG, "Setting up BLE...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
if (!ble_pre_setup_()) {
|
||||
ESP_LOGE(TAG, "BLE could not be prepared for configuration");
|
||||
|
@ -20,7 +20,7 @@ static constexpr uint8_t DAC0_PIN = 25;
|
||||
static const char *const TAG = "esp32_dac";
|
||||
|
||||
void ESP32DAC::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up ESP32 DAC Output...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->pin_->setup();
|
||||
this->turn_off();
|
||||
|
||||
|
@ -22,7 +22,7 @@ static const uint8_t RMT_CLK_DIV = 2;
|
||||
#endif
|
||||
|
||||
void ESP32RMTLEDStripLightOutput::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up ESP32 LED Strip...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
size_t buffer_size = this->get_buffer_size_();
|
||||
|
||||
|
@ -13,7 +13,7 @@ namespace esp32_touch {
|
||||
static const char *const TAG = "esp32_touch";
|
||||
|
||||
void ESP32TouchComponent::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up ESP32 Touch Hub...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
touch_pad_init();
|
||||
// set up and enable/start filtering based on ESP32 variant
|
||||
#if defined(USE_ESP32_VARIANT_ESP32S2) || defined(USE_ESP32_VARIANT_ESP32S3)
|
||||
|
@ -14,7 +14,7 @@ namespace esp8266_pwm {
|
||||
static const char *const TAG = "esp8266_pwm";
|
||||
|
||||
void ESP8266PWM::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up ESP8266 PWM Output...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->pin_->setup();
|
||||
this->turn_off();
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ EthernetComponent *global_eth_component; // NOLINT(cppcoreguidelines-avoid-non-
|
||||
EthernetComponent::EthernetComponent() { global_eth_component = this; }
|
||||
|
||||
void EthernetComponent::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up Ethernet...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
if (esp_reset_reason() != ESP_RST_DEEPSLEEP) {
|
||||
// Delay here to allow power to stabilise before Ethernet is initialized.
|
||||
delay(300); // NOLINT
|
||||
|
@ -9,7 +9,7 @@ namespace fastled_base {
|
||||
static const char *const TAG = "fastled";
|
||||
|
||||
void FastLEDLightOutput::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up FastLED light...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->controller_->init();
|
||||
this->controller_->setLeds(this->leds_, this->num_leds_);
|
||||
this->effect_data_ = new uint8_t[this->num_leds_]; // NOLINT
|
||||
|
@ -57,7 +57,7 @@ void FingerprintGrowComponent::update() {
|
||||
}
|
||||
|
||||
void FingerprintGrowComponent::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up Grow Fingerprint Reader...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
this->has_sensing_pin_ = (this->sensing_pin_ != nullptr);
|
||||
this->has_power_pin_ = (this->sensor_power_pin_ != nullptr);
|
||||
|
@ -7,7 +7,7 @@ namespace fs3000 {
|
||||
static const char *const TAG = "fs3000";
|
||||
|
||||
void FS3000Component::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up FS3000...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
if (model_ == FIVE) {
|
||||
// datasheet gives 9 points to interpolate from for the 1005 model
|
||||
|
@ -8,7 +8,7 @@ namespace ft5x06 {
|
||||
static const char *const TAG = "ft5x06.touchscreen";
|
||||
|
||||
void FT5x06Touchscreen::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up FT5x06 Touchscreen...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
if (this->interrupt_pin_ != nullptr) {
|
||||
this->interrupt_pin_->setup();
|
||||
this->interrupt_pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP);
|
||||
|
@ -28,7 +28,7 @@ static const uint8_t FT63X6_ADDR_CHIP_ID = 0xA3;
|
||||
static const char *const TAG = "FT63X6";
|
||||
|
||||
void FT63X6Touchscreen::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up FT63X6 Touchscreen...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
if (this->interrupt_pin_ != nullptr) {
|
||||
this->interrupt_pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP);
|
||||
this->interrupt_pin_->setup();
|
||||
|
Loading…
x
Reference in New Issue
Block a user