2 ******************************************************************************
\r
4 * @author MCD Application Team
\r
6 * @date 22-January-2013
\r
7 * @brief This file contains external declarations of the tsl_object.c file.
\r
8 ******************************************************************************
\r
11 * <h2><center>© COPYRIGHT 2013 STMicroelectronics</center></h2>
\r
13 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
\r
14 * You may not use this file except in compliance with the License.
\r
15 * You may obtain a copy of the License at:
\r
17 * http://www.st.com/software_license_agreement_liberty_v2
\r
19 * Unless required by applicable law or agreed to in writing, software
\r
20 * distributed under the License is distributed on an "AS IS" BASIS,
\r
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
22 * See the License for the specific language governing permissions and
\r
23 * limitations under the License.
\r
25 ******************************************************************************
\r
28 /* Define to prevent recursive inclusion -------------------------------------*/
\r
29 #ifndef __TSL_OBJECT_H
\r
30 #define __TSL_OBJECT_H
\r
32 /* Includes ------------------------------------------------------------------*/
\r
33 #include "tsl_touchkey.h"
\r
34 #include "tsl_linrot.h"
\r
36 /* Exported types ------------------------------------------------------------*/
\r
38 #define TSL_OBJ_TYPE_TKEY_MASK (0x10) /**< TouchKey object mask */
\r
39 #define TSL_OBJ_TYPE_LINROT_MASK (0x20) /**< Linear and Rotary objects mask */
\r
40 #define TSL_OBJ_TYPE_TRACKNAV_MASK (0x40) /**< TrackPad and NaviPad objects mask */
\r
42 /** Contains all different kinds of sensors.
\r
46 TSL_OBJ_TOUCHKEY = (TSL_OBJ_TYPE_TKEY_MASK + 0), /**< Normal TouchKey */
\r
47 TSL_OBJ_TOUCHKEYB = (TSL_OBJ_TYPE_TKEY_MASK + 1), /**< Basic TouchKey */
\r
48 TSL_OBJ_LINEAR = (TSL_OBJ_TYPE_LINROT_MASK + 0), /**< Normal Linear sensor */
\r
49 TSL_OBJ_LINEARB = (TSL_OBJ_TYPE_LINROT_MASK + 1), /**< Basic Linear sensor */
\r
50 TSL_OBJ_ROTARY = (TSL_OBJ_TYPE_LINROT_MASK + 2), /**< Normal Rotary sensor */
\r
51 TSL_OBJ_ROTARYB = (TSL_OBJ_TYPE_LINROT_MASK + 3), /**< Basic Rotary sensor */
\r
52 TSL_OBJ_TRACKPAD = (TSL_OBJ_TYPE_TRACKNAV_MASK + 0), /**< TrackPad sensor */
\r
53 TSL_OBJ_NAVIPAD = (TSL_OBJ_TYPE_TRACKNAV_MASK + 1) /**< NaviPad sensor */
\r
55 TSL_ObjectType_enum_T;
\r
57 /** Contains the definition of an Object.
\r
58 * Variables of this structure type can be placed in RAM or ROM.
\r
62 TSL_ObjectType_enum_T Type; /**< Object type */
\r
63 void *Elmt; /**< Pointer to the object */
\r
67 /** Contains the definition of a Group of Objects.
\r
68 * Variables of this structure type must be placed in RAM only.
\r
72 CONST TSL_Object_T *p_Obj; /**< Pointer to the first object */
\r
73 TSL_tNb_T NbObjects; /**< Number of objects in the group */
\r
74 TSL_tNb_T StateMask; /**< "OR" of all objects state mask */
\r
75 TSL_StateChange_enum_T Change; /**< The State is different from the previous one */
\r
79 /* Exported functions --------------------------------------------------------*/
\r
81 void TSL_obj_GroupInit(TSL_ObjectGroup_T *objgrp);
\r
82 void TSL_obj_GroupProcess(TSL_ObjectGroup_T *objgrp);
\r
83 void TSL_obj_SetGlobalObj(CONST TSL_Object_T *pobj);
\r
85 #endif /* __TSL_OBJECT_H */
\r
87 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
\r