Skip to content

Commit 85875b2

Browse files
committed
fixes
bug fixes
1 parent 7221222 commit 85875b2

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

GT911.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ uint8_t GT911::read(uint16_t reg) {
7979
bool GT911::writeBytes(uint16_t reg, uint8_t *data, uint16_t size) {
8080
i2cStart(reg);
8181
for (uint16_t i = 0; i < size; i++) {
82-
_wire->write(data[i]);
82+
_wire->write(data[i]);
8383
}
8484
return _wire->endTransmission() == 0;
8585
}
@@ -159,8 +159,8 @@ bool GT911::begin(int8_t intPin, int8_t rstPin, uint8_t addr, uint32_t clk) {
159159
attachInterrupt(_intPin, _gt911_irq_handler, FALLING);
160160
}
161161

162-
_wire->setClock(clk);
163162
_wire->begin();
163+
_wire->setClock(clk);
164164
_wire->beginTransmission(_addr);
165165
if (_wire->endTransmission() == 0) {
166166
readInfo(); // Need to get resolution to use rotation

GT911.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ class GT911 {
3333
};
3434
private:
3535
TwoWire *_wire;
36-
uint8_t _intPin;
37-
uint8_t _rstPin;
36+
int8_t _intPin;
37+
int8_t _rstPin;
3838
uint8_t _addr;
3939

4040
bool _configLoaded = false;

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"name": "GT911",
3-
"version": "0.2.0"
3+
"version": "0.2.1"
44
}

0 commit comments

Comments
 (0)