Skip to content

Commit a7016c8

Browse files
docs: add API
1 parent 2b7c34e commit a7016c8

File tree

2 files changed

+71
-1
lines changed

2 files changed

+71
-1
lines changed

docs/api.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Summary
2+
3+
Members | Descriptions
4+
--------------------------------|---------------------------------------------
5+
`class` [`Arduino_GigaDisplayTouch`](#) | The main class for managing the touch controller of the Giga Display Shield.
6+
7+
# class `Arduino_GigaDisplayTouch`
8+
The main class for managing the touch controller of the Giga Display Shield.
9+
10+
## Summary
11+
12+
Members | Descriptions
13+
--------------------------------|---------------------------------------------
14+
`public ` [`Arduino_GigaDisplayTouch`](#)`(TwoWire& wire, uint8_t intPin, uint8_t rstPin, uint8_t addr)` | Construct a new touch controller for Giga Display Shield.
15+
`public bool` [`begin`](#)`()` | Initialize the touch controller.
16+
`public void` [`end`](#)`()` | De-initialize the touch controller.
17+
`public bool` [`detect`](#)`(uint8_t& contacts, GDTpoint_t* points)` | Check if a touch event is detected and get the touch points.
18+
`public void` [`attach`](#)`(void (*handler)(uint8_t, GDTpoint_t*))` | Attach an interrupt handler function for touch detection callbacks.
19+
20+
## Members
21+
22+
### `public ` [`Arduino_GigaDisplayTouch`](#)`(TwoWire& wire, uint8_t intPin, uint8_t rstPin, uint8_t addr)`
23+
24+
Construct a new touch controller for Giga Display Shield.
25+
26+
#### Parameters
27+
* `wire` A reference to the Wire interface to be used for communication with the touch controller.
28+
29+
* `intPin` The interrupt pin number for the touch controller.
30+
31+
* `rstPin` The reset pin number for the touch controller.
32+
33+
* `addr` The device address for the touch controller.
34+
35+
### `public bool` [`begin`](#)`()`
36+
37+
Initialize the touch controller.
38+
39+
#### Returns
40+
true If the touch controller is successfully initialized
41+
42+
#### Returns
43+
false Otherwise
44+
45+
### `public void` [`end`](#)`()`
46+
47+
De-initialize the touch controller.
48+
49+
### `public bool` [`detect`](#)`(uint8_t& contacts, GDTpoint_t* points)`
50+
51+
Check if a touch event is detected and get the touch points.
52+
53+
#### Parameters
54+
* `contacts` The number of detected touch points.
55+
56+
* `points` The array containing the coordinates of the touch points.
57+
58+
#### Returns
59+
true If a touch event is detected
60+
61+
#### Returns
62+
false Otherwise
63+
64+
### `public void` [`attach`](#)`(void (*handler)(uint8_t, GDTpoint_t*))`
65+
66+
Attach an interrupt handler function for touch detection callbacks.
67+
68+
#### Parameters
69+
70+
* `handler` The pointer to the user-defined handler function.

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Arduino_GigaDisplayTouch
2-
version=1.0.0
2+
version=1.0
33
author=Arduino
44
maintainer=Arduino <info@arduino.cc>
55
sentence=Touch library for Arduino Giga Display Shield

0 commit comments

Comments
 (0)