@@ -20,7 +20,6 @@ rtos::Thread t;
20
20
events::EventQueue queue (32 * EVENTS_EVENT_SIZE);
21
21
22
22
/* Private function prototypes -----------------------------------------------*/
23
- void _gt911_irqHandler ();
24
23
25
24
/* Functions -----------------------------------------------------------------*/
26
25
Arduino_GigaDisplayTouch::Arduino_GigaDisplayTouch (TwoWire& wire, uint8_t intPin, uint8_t rstPin, uint8_t addr)
@@ -99,7 +98,10 @@ void Arduino_GigaDisplayTouch::attach(void (*handler)(uint8_t, GDTpoint_t*)) {
99
98
}
100
99
101
100
uint8_t Arduino_GigaDisplayTouch::_gt911WriteOp (uint16_t reg, uint8_t data) {
102
- _gt911WriteBytesOp (reg, &data, 1 );
101
+ uint8_t status = 0 ;
102
+ status = _gt911WriteBytesOp (reg, &data, 1 );
103
+
104
+ return status;
103
105
}
104
106
105
107
uint8_t Arduino_GigaDisplayTouch::_gt911WriteBytesOp (uint16_t reg, uint8_t * data, uint8_t len) {
@@ -136,8 +138,8 @@ uint8_t Arduino_GigaDisplayTouch::_gt911ReadOp(uint16_t reg, uint8_t * data, uin
136
138
data[index++] = _wire.read ();
137
139
}
138
140
139
- if (len == index) return 0 ; /* Success */
140
- else return 4 ; /* Other error */
141
+ if (len == index) return 0 ;
142
+ else return 4 ; /* Other error */
141
143
}
142
144
143
145
void Arduino_GigaDisplayTouch::_gt911onIrq () {
@@ -170,7 +172,7 @@ uint8_t Arduino_GigaDisplayTouch::_gt911ReadInputCoord(uint8_t * pointsbuf, uint
170
172
error = _gt911ReadOp (GT911_REG_GESTURE_START_POINT, pointsbuf, GT911_CONTACT_SIZE * GT911_MAX_CONTACTS);
171
173
172
174
if (error) {
173
- return 1 ; /* I2C Error */
175
+ return 1 ; /* I2C comm error */
174
176
}
175
177
176
178
if (!(pointsbuf[0 ] & 0x80 )) {
0 commit comments