eGUI alias D4D  Release 3.0
Reference Manual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
d4dtch_template.c
Go to the documentation of this file.
1 /**************************************************************************
2 *
3 * Copyright 2014 by Petr Gargulak. eGUI Community.
4 * Copyright 2009-2013 by Petr Gargulak. Freescale Semiconductor, Inc.
5 *
6 ***************************************************************************
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License Version 3
9 * or later (the "LGPL").
10 *
11 * As a special exception, the copyright holders of the eGUI project give you
12 * permission to link the eGUI sources with independent modules to produce an
13 * executable, regardless of the license terms of these independent modules,
14 * and to copy and distribute the resulting executable under terms of your
15 * choice, provided that you also meet, for each linked independent module,
16 * the terms and conditions of the license of that module.
17 * An independent module is a module which is not derived from or based
18 * on this library.
19 * If you modify the eGUI sources, you may extend this exception
20 * to your version of the eGUI sources, but you are not obligated
21 * to do so. If you do not wish to do so, delete this
22 * exception statement from your version.
23 *
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27 *
28 * You should have received a copy of the GNU General Public License
29 * and the GNU Lesser General Public License along with this program.
30 * If not, see <http://www.gnu.org/licenses/>.
31 *
32 ***************************************************************************/
46 #include "d4d.h" // include of all public items (types, function etc) of D4D driver
47 #include "common_files/d4d_lldapi.h" // include non public low level driver interface header file (types, function prototypes, enums etc. )
48 #include "common_files/d4d_private.h" // include the private header file that contains perprocessor macros as D4D_MK_STR
49 
50 
51 // identification string of driver - must be same as name D4DTCH_FUNCTIONS structure + "_ID"
52 // it is used for enable the code for compilation
53 #define d4dtch_template_ID 1
54 
55 
56 // copilation enable preprocessor condition
57 // the string d4dtch_template_ID must be replaced by define created one line up
58 #if (D4D_MK_STR(D4D_LLD_TCH) == d4dtch_template_ID)
59 
60  // include of low level driver heaser file
61  // it will be included into wole project only in case that this driver is selected in main D4D configuration file
63  /******************************************************************************
64  * Macros
65  ******************************************************************************/
66 
67  /******************************************************************************
68  * Internal function prototypes
69  ******************************************************************************/
70 
71  static unsigned char D4DTCH_Init_Template(void);
72  static unsigned char D4DTCH_DeInit_Template(void);
73  static D4D_TOUCHSCREEN_LIMITS* D4DTCH_GetRawLimits_Template(void);
74  static unsigned char D4DTCH_GetPositionRaw_Template(unsigned short *TouchPositionX,
75  unsigned short *TouchPositionY);
76 
77  /**************************************************************/
83  // the main structure that contains low level driver api functions
84  // the name fo this structure is used for recognizing of configured low level driver of whole D4D
85  // so this name has to be used in main configuration header file of D4D driver to enable this driver
86  const D4DTCH_FUNCTIONS d4dtch_template =
87  {
88  D4DTCH_Init_Template,
89  D4DTCH_GetPositionRaw_Template,
90  D4DTCH_GetRawLimits_Template,
91  D4DTCH_DeInit_Template
92  };
93 
94  /**************************************************************/
100  /**************************************************************/
107  /******************************************************************************
108  * Begin of D4D_TCH public functions
109  */
113  /**************************************************************************/
118  static unsigned char D4DTCH_Init_Template(void)
119  {
120  return 0;
121  }
122 
123  /**************************************************************************/
128  static unsigned char D4DTCH_DeInit_Template(void)
129  {
130  return 0;
131  }
132 
133  /**************************************************************************/
138  static D4D_TOUCHSCREEN_LIMITS* D4DTCH_GetRawLimits_Template(void)
139  {
140  return NULL;
141  }
142 
143  /**************************************************************************/
150  static unsigned char D4DTCH_GetPositionRaw_Template (unsigned short *TouchPositionX,
151  unsigned short *TouchPositionY)
152  {
153  (void)TouchPositionX;
154  (void)TouchPositionY;
155 
156  return 0;
157  }
158 
161 #endif //(D4D_MK_STR(D4D_LLD_TCH) == d4dtch_template_ID)
D4D low level touch screen interface API structure.
Definition: d4d_lldapi.h:195
D4D Driver main header file.
D4D Driver private header file.
D4D low level touch screen limitation structure.
Definition: d4d_lldapi.h:105
D4D driver - template touch screen driver function header file.
#define NULL
Type definition of null pointer.
Definition: d4d_types.h:184
D4D driver - resistive touch screen driver function header file.