Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
bug fixes
  • Loading branch information
alex-code committed Jul 12, 2022
1 parent 7221222 commit 85875b2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions GT911.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ uint8_t GT911::read(uint16_t reg) {
bool GT911::writeBytes(uint16_t reg, uint8_t *data, uint16_t size) {
i2cStart(reg);
for (uint16_t i = 0; i < size; i++) {
_wire->write(data[i]);
_wire->write(data[i]);
}
return _wire->endTransmission() == 0;
}
Expand Down Expand Up @@ -159,8 +159,8 @@ bool GT911::begin(int8_t intPin, int8_t rstPin, uint8_t addr, uint32_t clk) {
attachInterrupt(_intPin, _gt911_irq_handler, FALLING);
}

_wire->setClock(clk);
_wire->begin();
_wire->setClock(clk);
_wire->beginTransmission(_addr);
if (_wire->endTransmission() == 0) {
readInfo(); // Need to get resolution to use rotation
Expand Down
4 changes: 2 additions & 2 deletions GT911.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class GT911 {
};
private:
TwoWire *_wire;
uint8_t _intPin;
uint8_t _rstPin;
int8_t _intPin;
int8_t _rstPin;
uint8_t _addr;

bool _configLoaded = false;
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "GT911",
"version": "0.2.0"
"version": "0.2.1"
}

0 comments on commit 85875b2

Please sign in to comment.