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:
@@ -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.
|
||||
|
||||
@@ -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_;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user