mirror of
https://github.com/esphome/esphome.git
synced 2024-12-24 14:34:54 +01:00
clang issues
This commit is contained in:
parent
330ceaf2be
commit
2b5d67603e
2 changed files with 5 additions and 7 deletions
|
@ -35,8 +35,6 @@ void ICNT86Touchscreen::setup() {
|
|||
void ICNT86Touchscreen::update_touches() {
|
||||
char buf[100];
|
||||
char mask[1] = {0x00};
|
||||
// Read report length
|
||||
uint16_t data_len;
|
||||
|
||||
this->icnt_read_(0x1001, buf, 1);
|
||||
uint8_t touch_count = buf[0];
|
||||
|
@ -71,7 +69,7 @@ void ICNT86Touchscreen::reset_() {
|
|||
}
|
||||
|
||||
void ICNT86Touchscreen::i2c_write_byte_(UWORD reg, char const *data, UBYTE len) {
|
||||
char wbuf[50] = {static_cast<char>(reg >> 8) & 0xff, static_cast<char>(reg) & 0xff};
|
||||
char wbuf[50] = {static_cast<char>(reg >> 8 & 0xff), static_cast<char>(reg & 0xff)};
|
||||
for (UBYTE i = 0; i < len; i++) {
|
||||
wbuf[i + 2] = data[i];
|
||||
}
|
||||
|
|
|
@ -23,10 +23,10 @@ class ICNT86Touchscreen : public touchscreen::Touchscreen, public i2c::I2CDevice
|
|||
protected:
|
||||
void update_touches() override;
|
||||
void reset_();
|
||||
void i2c_read_byte_(UWORD reg, char const *Data, UBYTE len);
|
||||
void icnt_read_(UWORD reg, char const *Data, UBYTE len);
|
||||
void icnt_write_(UWORD reg, char const *Data, UBYTE len);
|
||||
void i2c_write_byte_(UWORD reg, char const *Data, UBYTE len);
|
||||
void i2c_read_byte_(UWORD reg, char const *data, UBYTE len);
|
||||
void icnt_read_(UWORD reg, char const *data, UBYTE len);
|
||||
void icnt_write_(UWORD reg, char const *data, UBYTE len);
|
||||
void i2c_write_byte_(UWORD reg, char const *data, UBYTE len);
|
||||
void reset_touch_sensor_();
|
||||
InternalGPIOPin *interrupt_pin_{};
|
||||
GPIOPin *reset_pin_{nullptr};
|
||||
|
|
Loading…
Reference in a new issue