SAM3S8/SD8 Software Package: libraries/libboard_sam3s-ek2/include/tsd.h File Reference

SAM3S8/SD8 Software Package 1.2
Functions

# tsd.h File Reference

`#include "tsd_com.h"`

Go to the source code of this file.

## Functions

void | TSD_Initialize (int8_t calEn)
| Initializes the touchscreen driver and starts the calibration process. When finished, the touchscreen is operational.
uint8_t | TSD_Calibrate (void)
| Do calibration.
void | TSD_Reset (void)
| Stop the Touchscreen, disable interrupt.
void | TSD_TimerHandler (void)
| Timer handler for touch screen. Increments the timestamp counter. Determine the state "Pen Pressed" or "Pen Released". To change state, the penIRQ has to keep the same value during DEBOUNCE_TIME.

## Detailed Description

Interface for touchscreen driver which includes touchscreen calibration, retrieving measurements etc.

Usage

1. Call TSD_Initialize() whenever the touchscreen should start the calibration process (as it is done in the function).
2. Declare a global TSD_PenPressed function anywhere in your code. This function will get called every time the pen is pressed on the screen.
3. Declare a global TSD_PenMoved function, which will get called whenever the pen stays in contact with the screen but changes position.
4. Declare a global TSD_PenReleased function, which will be invoked as the pen is lifted from the screen.

Definition in file tsd.h.

## Function Documentation

uint8_t TSD_Calibrate | ( | void | ) |

Do calibration.

Returns:
  1 if calibration is Ok, 0 else.

Definition at line 269 of file tsd_ads7843.c.

Here is the call graph for this function:

void TSD_Initialize | ( | int8_t | calEn ) |

Initializes the touchscreen driver and starts the calibration process. When finished, the touchscreen is operational.

Note:
  Important: the LCD driver must have been initialized prior to calling this function.

Definition at line 292 of file tsd_ads7843.c.

Here is the call graph for this function:

void TSD_TimerHandler | ( | void | ) |

Timer handler for touch screen. Increments the timestamp counter. Determine the state "Pen Pressed" or "Pen Released". To change state, the penIRQ has to keep the same value during DEBOUNCE_TIME.

Note:
  External timer interrupt should call it per 10ms.

Definition at line 107 of file tsd_ads7843.c.

Here is the call graph for this function:
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines