@@ -20,7 +20,6 @@ rtos::Thread t;
2020events::EventQueue queue (32 * EVENTS_EVENT_SIZE);
2121
2222/* Private function prototypes -----------------------------------------------*/
23- void _gt911_irqHandler ();
2423
2524/* Functions -----------------------------------------------------------------*/
2625Arduino_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*)) {
9998}
10099
101100uint8_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;
103105}
104106
105107uint8_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
136138 data[index++] = _wire.read ();
137139 }
138140
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 */
141143}
142144
143145void Arduino_GigaDisplayTouch::_gt911onIrq () {
@@ -170,7 +172,7 @@ uint8_t Arduino_GigaDisplayTouch::_gt911ReadInputCoord(uint8_t * pointsbuf, uint
170172 error = _gt911ReadOp (GT911_REG_GESTURE_START_POINT, pointsbuf, GT911_CONTACT_SIZE * GT911_MAX_CONTACTS);
171173
172174 if (error) {
173- return 1 ; /* I2C Error */
175+ return 1 ; /* I2C comm error */
174176 }
175177
176178 if (!(pointsbuf[0 ] & 0x80 )) {
0 commit comments