Merge branch 'testbranch' into dev

This commit is contained in:
SGE 2024-04-02 10:48:22 +02:00
commit dc17e17987
2 changed files with 5 additions and 7 deletions

View file

@ -35,8 +35,6 @@ void ICNT86Touchscreen::setup() {
void ICNT86Touchscreen::update_touches() { void ICNT86Touchscreen::update_touches() {
char buf[100]; char buf[100];
char mask[1] = {0x00}; char mask[1] = {0x00};
// Read report length
uint16_t data_len;
this->icnt_read_(0x1001, buf, 1); this->icnt_read_(0x1001, buf, 1);
uint8_t touch_count = buf[0]; 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) { 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++) { for (UBYTE i = 0; i < len; i++) {
wbuf[i + 2] = data[i]; wbuf[i + 2] = data[i];
} }

View file

@ -23,10 +23,10 @@ class ICNT86Touchscreen : public touchscreen::Touchscreen, public i2c::I2CDevice
protected: protected:
void update_touches() override; void update_touches() override;
void reset_(); void reset_();
void i2c_read_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_read_(UWORD reg, char const *data, UBYTE len);
void icnt_write_(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_write_byte_(UWORD reg, char const *data, UBYTE len);
void reset_touch_sensor_(); void reset_touch_sensor_();
InternalGPIOPin *interrupt_pin_{}; InternalGPIOPin *interrupt_pin_{};
GPIOPin *reset_pin_{nullptr}; GPIOPin *reset_pin_{nullptr};