1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-26 20:53:50 +00:00

Fix clang-tidy header filter (#2385)

* Fix clang-tidy header filter

* Allow private members

* Fix clang-tidy detections

* Run clang-format

* Fix remaining detections

* Fix graph

* Run clang-format
This commit is contained in:
Otto Winter
2021-09-24 18:02:28 +02:00
committed by GitHub
parent 52dd79691b
commit aec02afcdc
76 changed files with 404 additions and 367 deletions

View File

@@ -11,7 +11,7 @@ namespace i2c {
static const char *const TAG = "i2c.arduino";
void ArduinoI2CBus::setup() {
recover();
recover_();
#ifdef USE_ESP32
static uint8_t next_bus_num = 0;
if (next_bus_num == 0)
@@ -92,7 +92,7 @@ ErrorCode ArduinoI2CBus::writev(uint8_t address, WriteBuffer *buffers, size_t cn
return ERROR_UNKNOWN;
}
void ArduinoI2CBus::recover() {
void ArduinoI2CBus::recover_() {
// Perform I2C bus recovery, see
// https://www.analog.com/media/en/technical-documentation/application-notes/54305147357414AN686_0.pdf
// or see the linux kernel implementation, e.g.

View File

@@ -23,7 +23,7 @@ class ArduinoI2CBus : public I2CBus, public Component {
void set_frequency(uint32_t frequency) { frequency_ = frequency; }
private:
void recover();
void recover_();
protected:
TwoWire *wire_;

View File

@@ -14,7 +14,7 @@ void IDFI2CBus::setup() {
static i2c_port_t next_port = 0;
port_ = next_port++;
recover();
recover_();
i2c_config_t conf{};
memset(&conf, 0, sizeof(conf));
@@ -144,7 +144,7 @@ ErrorCode IDFI2CBus::writev(uint8_t address, WriteBuffer *buffers, size_t cnt) {
return ERROR_OK;
}
void IDFI2CBus::recover() {
void IDFI2CBus::recover_() {
// Perform I2C bus recovery, see
// https://www.analog.com/media/en/technical-documentation/application-notes/54305147357414AN686_0.pdf
// or see the linux kernel implementation, e.g.

View File

@@ -25,7 +25,7 @@ class IDFI2CBus : public I2CBus, public Component {
void set_frequency(uint32_t frequency) { frequency_ = frequency; }
private:
void recover();
void recover_();
protected:
i2c_port_t port_;