Untangle core headers (part 1) (#2276)

This commit is contained in:
Oxan van Leeuwen 2021-09-13 09:33:29 +02:00 committed by GitHub
parent f0b6aabc96
commit f31e0532c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 32 additions and 11 deletions

View File

@ -1,6 +1,7 @@
#pragma once
#include "esphome/core/component.h"
#include "esphome/core/esphal.h"
#include "esphome/components/i2c/i2c.h"
#include "esphome/components/sensor/sensor.h"

View File

@ -1,4 +1,6 @@
#include "am43_base.h"
#include <cstring>
#include <cstdio>
namespace esphome {
namespace am43 {

View File

@ -1,4 +1,6 @@
#include "anova_base.h"
#include <cstdio>
#include <cstring>
namespace esphome {
namespace anova {

View File

@ -1,6 +1,7 @@
#pragma once
#include "esphome/core/component.h"
#include "esphome/core/esphal.h"
#include "esphome/components/sensor/sensor.h"
#include "esphome/components/binary_sensor/binary_sensor.h"

View File

@ -1,5 +1,5 @@
#include "climate_traits.h"
#include "esphome/core/log.h"
#include <cstdio>
namespace esphome {
namespace climate {

View File

@ -3,6 +3,7 @@
#include "esphome/core/component.h"
#include "esphome/core/helpers.h"
#include "esphome/core/automation.h"
#include "esphome/core/esphal.h"
namespace esphome {
namespace deep_sleep {

View File

@ -1,6 +1,7 @@
#pragma once
#include "esphome/core/component.h"
#include "esphome/core/esphal.h"
#include "esphome/components/sensor/sensor.h"
namespace esphome {

View File

@ -1,6 +1,7 @@
#pragma once
#include "esphome/core/helpers.h"
#include "esphome/core/esphal.h"
#ifdef ARDUINO_ARCH_ESP32

View File

@ -1,6 +1,7 @@
#pragma once
#include "esphome/core/component.h"
#include "esphome/core/esphal.h"
#include "esphome/components/binary_sensor/binary_sensor.h"
namespace esphome {

View File

@ -1,6 +1,7 @@
#pragma once
#include "esphome/core/component.h"
#include "esphome/core/esphal.h"
#include "esphome/components/switch/switch.h"
namespace esphome {

View File

@ -1,4 +1,5 @@
#include "nfc.h"
#include <cstdio>
#include "esphome/core/log.h"
namespace esphome {

View File

@ -1,6 +1,7 @@
#pragma once
#include "esphome/core/component.h"
#include "esphome/core/esphal.h"
#include "esphome/core/automation.h"
#include "esphome/components/binary_sensor/binary_sensor.h"

View File

@ -1,4 +1,5 @@
#include "remote_receiver.h"
#include "esphome/core/esphal.h"
#include "esphome/core/log.h"
#include "esphome/core/helpers.h"

View File

@ -2,6 +2,7 @@
#include "esphome/components/i2c/i2c.h"
#include "esphome/core/component.h"
#include "esphome/core/esphal.h"
#include "sx1509_gpio_pin.h"
#include "sx1509_registers.h"

View File

@ -1,6 +1,7 @@
#pragma once
#include "esphome/core/component.h"
#include "esphome/core/esphal.h"
#include "esphome/components/binary_sensor/binary_sensor.h"
namespace esphome {

View File

@ -1,6 +1,7 @@
#pragma once
#include "esphome/core/component.h"
#include "esphome/core/esphal.h"
#include "esphome/components/sensor/sensor.h"
namespace esphome {

View File

@ -3,6 +3,7 @@
#include <list>
#include "esphome/core/component.h"
#include "esphome/core/esphal.h"
#include "esphome/components/sensor/sensor.h"
#include "esphome/components/i2c/i2c.h"

View File

@ -1,9 +1,7 @@
#pragma once
#include "Arduino.h"
#ifdef ARDUINO_ARCH_ESP32
#include <esp32-hal.h>
#endif
// Fix some arduino defs
#ifdef round
#undef round

View File

@ -6,8 +6,11 @@
#include <memory>
#include <type_traits>
#ifdef ARDUINO_ARCH_ESP32
#include "esp32-hal-psram.h"
#endif
#include "esphome/core/optional.h"
#include "esphome/core/esphal.h"
#ifdef CLANG_TIDY
#undef ICACHE_RAM_ATTR

View File

@ -3,18 +3,20 @@
#include <cassert>
#include <cstdarg>
#include <string>
#ifdef USE_STORE_LOG_STR_IN_FLASH
#include "WString.h"
#endif
#include "esphome/core/macros.h"
// avoid esp-idf redefining our macros
#include "esphome/core/esphal.h"
// Both the ESP-IDF and Arduino also define ESP_LOG* macros. Include them here, so that they won't
// be reincluded later on and redefine our macros.
#ifdef ARDUINO_ARCH_ESP32
#include "esp_err.h"
#include <esp_log.h>
#include <esp32-hal-log.h>
#endif
#include "esphome/core/macros.h"
namespace esphome {
#define ESPHOME_LOG_LEVEL_NONE 0

View File

@ -1,8 +1,8 @@
#pragma once
#include <string>
#include <cstring>
#include "esphome/core/esphal.h"
#include "esphome/core/defines.h"
namespace esphome {