From ae078b80d0a9098a973da1945c071150d39bf9a7 Mon Sep 17 00:00:00 2001 From: Ali Jahangiri <75624145+aliphys@users.noreply.github.com> Date: Mon, 10 Jun 2024 17:16:12 +0200 Subject: [PATCH] docs: add header comment to examples --- examples/Touch_IRQ/Touch_IRQ.ino | 24 ++++++++++++++++++------ examples/Touch_Polling/Touch_Polling.ino | 24 ++++++++++++++++++------ 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/examples/Touch_IRQ/Touch_IRQ.ino b/examples/Touch_IRQ/Touch_IRQ.ino index 840addd..f4e0649 100644 --- a/examples/Touch_IRQ/Touch_IRQ.ino +++ b/examples/Touch_IRQ/Touch_IRQ.ino @@ -1,9 +1,21 @@ -/* - Touch_IRQ - - created 03 May 2023 - by Leonardo Cavagnis -*/ +/* + * Touch_IRQ.ino + * + * This example shows how to get the number of points and the coordinates of the first touch points detected by the touch controller using interrupts. + * + * The setup() function initializes the serial communication and the touch controller. Whenever a touch event is detcted, the gigaTouchHandler function is called that prints the number of points and first touch co-ordinates to the Serial Monitor. The loop() function is empty because the touch controller is configured to work with interrupts. + * + * For the polling version of this example, see Touch_Polling.ino + * + * Instructions: + * 1. Connect your GIGA Display Shield (ASX00039) to a GIGA R1 WiFi (ABX00063) board . + * 2. Upload this sketch to your board. + * 3. Open the Serial Monitor. + * 4. Touch the screen with your finger(s) and view the coordinates printed on the Serial Monitor. + * + * Initial author: Leonardo Cavagnis @leonardocavagnis + * Created: 03 May 2023 + */ #include "Arduino_GigaDisplayTouch.h" diff --git a/examples/Touch_Polling/Touch_Polling.ino b/examples/Touch_Polling/Touch_Polling.ino index 217da19..6d6b081 100644 --- a/examples/Touch_Polling/Touch_Polling.ino +++ b/examples/Touch_Polling/Touch_Polling.ino @@ -1,9 +1,21 @@ -/* - Touch_Polling - - created 03 May 2023 - by Leonardo Cavagnis -*/ +/* + * Touch_Polling.ino + * + * This example shows how to get the number of points and the coordinates of the first touch points detected by the touch controller using polling. + * + * The setup() function initializes the serial communication and the touch controller. The loop() function continuously checks to see if a touch event is detected. Whenever a touch event is detcted, that prints the number of points and first touch co-ordinates to the Serial Monitor. + * + * For the interrupt version of this example, see Touch_IRQ.ino + * + * Instructions: + * 1. Connect your GIGA Display Shield (ASX00039) to a GIGA R1 WiFi (ABX00063) board . + * 2. Upload this sketch to your board. + * 3. Open the Serial Monitor. + * 4. Touch the screen with your finger(s) and view the coordinates printed on the Serial Monitor. + * + * Initial author: Leonardo Cavagnis @leonardocavagnis + * Created: 03 May 2023 + */ #include "Arduino_GigaDisplayTouch.h"