1 /* ----------------------------------------------------------------------------
\r
2 * SAM Software Package License
\r
3 * ----------------------------------------------------------------------------
\r
4 * Copyright (c) 2011, Atmel Corporation
\r
6 * All rights reserved.
\r
8 * Redistribution and use in source and binary forms, with or without
\r
9 * modification, are permitted provided that the following conditions are met:
\r
11 * - Redistributions of source code must retain the above copyright notice,
\r
12 * this list of conditions and the disclaimer below.
\r
14 * Atmel's name may not be used to endorse or promote products derived from
\r
15 * this software without specific prior written permission.
\r
17 * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
\r
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
\r
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
\r
20 * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
\r
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
\r
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
\r
23 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
\r
24 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
\r
25 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
\r
26 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\r
27 * ----------------------------------------------------------------------------
\r
33 * \addtogroup tsd_module TouchScreen Driver
\r
37 * This unit provides a very powerful touchscreen driver which handles all the
\r
38 * complexity. This includes touchscreen calibration, retrieving measurements,
\r
39 * configuring the TSADC, etc.
\r
43 * -# Implement ADC interrupt handler in application, to invoke TSD_Handler()
\r
44 * to handle ADC sampling events for touchscreen monitor.
\r
45 * -# Call TSD_Initialize() to initialize ADC used for touchscreen.
\r
46 * -# Call TSD_Calibrate() to do touchscreen calibration with LCD, and enable
\r
47 * touchscreen monitor if calibration success.
\r
48 * -# Call TSD_Enable() to enable or disable touchscreen monitoring.
\r
49 * -# Declare a global TSD_PenPressed() function anywhere in your code. This
\r
50 * function will get called every time the pen is pressed on the screen.
\r
51 * -# Declare a global TSD_PenMoved() function, which will get called whenever
\r
52 * the pen stays in contact with the screen but changes position.
\r
53 * -# Declare a global TSD_PenReleased() function, which will be invoked as the
\r
54 * pen is lifted from the screen.
\r
60 /*----------------------------------------------------------------------------
\r
62 *----------------------------------------------------------------------------*/
\r
66 /*----------------------------------------------------------------------------
\r
68 *----------------------------------------------------------------------------*/
\r
70 extern void TSD_Handler(uint32_t dwAdcStatus);
\r
71 extern void TSD_Initialize(void);
\r
72 extern void TSD_DeInitialize(void);
\r
73 extern void TSD_Enable(uint8_t bEnDis);
\r
74 extern uint8_t TSD_Calibrate(void);
\r
76 /* calibration used functions */
\r
77 extern void TSD_GetRawMeasurement(uint32_t * pData);
\r
78 extern void TSD_WaitPenPressed(void);
\r
79 extern void TSD_WaitPenReleased(void);
\r
82 extern void TSD_PenPressed(uint32_t x, uint32_t y, uint32_t pressure);
\r
83 extern void TSD_PenMoved(uint32_t x, uint32_t y, uint32_t pressure);
\r
84 extern void TSD_PenReleased(uint32_t x, uint32_t y);
\r
86 #endif //#ifndef TSD_H
\r