From 1702ce6ce430a66bb7af51644b91b7c196e719d9 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 29 Jun 2022 11:03:02 +0300 Subject: =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D1=8E=20=D0=BD=D0=BE?= =?UTF-8?q?=D0=B2=D1=8B=D0=B9=20=D1=80=D0=B5=D0=BF=D0=BE=D0=B7=D0=B8=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B8=D0=B9.=20=D0=9F=D1=80=D0=BE=D0=B3=D1=80?= =?UTF-8?q?=D0=B0=D0=BC=D0=BC=D0=B0=20=D0=B4=D0=BB=D1=8F=20=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D1=81=D0=B8=D0=B8=20NixieClock=5Fv2.=20=D0=A0=D0=B0?= =?UTF-8?q?=D0=B1=D0=BE=D1=82=D0=B0=D0=B5=D1=82,=20=D1=87=D0=B0=D1=81?= =?UTF-8?q?=D1=8B=20=D1=82=D0=B8=D0=BA=D0=B0=D1=8E=D1=82.=20=D0=95=D1=81?= =?UTF-8?q?=D1=82=D1=8C=20=D0=BF=D1=80=D0=BE=D0=B1=D0=BB=D0=B5=D0=BC=D0=B0?= =?UTF-8?q?,=20=D1=87=D1=82=D0=BE=20=D1=81=D0=BA=D0=B0=D1=87=D0=B5=D1=82?= =?UTF-8?q?=20=D0=B2=D1=82=D0=BE=D1=80=D0=B0=D1=8F=20=D1=81=D0=B5=D0=BD?= =?UTF-8?q?=D0=BE=D1=81=D1=80=D0=BD=D0=B0=D1=8F=20=D0=BA=D0=BD=D0=BE=D0=BF?= =?UTF-8?q?=D0=BA=D0=B0=20(=D0=BE=D0=BD=D0=B0=20=D0=B2=20=D0=B4=D1=80?= =?UTF-8?q?=D1=83=D0=B3=D0=BE=D0=BC=20=D0=BA=D0=B0=D0=BD=D0=B0=D0=BB=D0=B5?= =?UTF-8?q?).=20=D0=9F=D0=BE=D1=8D=D1=82=D0=BE=D0=BC=D1=83=20=D0=BD=D0=B0?= =?UTF-8?q?=20=D0=BD=D0=B5=D0=B5=20=D1=81=D0=BE=D0=B1=D0=B8=D1=80=D0=B0?= =?UTF-8?q?=D1=8E=D1=81=D1=8C=20=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D1=82=D1=8C?= =?UTF-8?q?=20=D0=B0=D0=BD=D1=82=D0=B8=D0=B4=D1=80=D0=B5=D0=B1=D0=B5=D0=B7?= =?UTF-8?q?=D0=B3.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TouchSense/STMTouch_Driver/inc/tsl_object.h | 89 ++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 Libraries/TouchSense/STMTouch_Driver/inc/tsl_object.h (limited to 'Libraries/TouchSense/STMTouch_Driver/inc/tsl_object.h') diff --git a/Libraries/TouchSense/STMTouch_Driver/inc/tsl_object.h b/Libraries/TouchSense/STMTouch_Driver/inc/tsl_object.h new file mode 100644 index 0000000..64b4d01 --- /dev/null +++ b/Libraries/TouchSense/STMTouch_Driver/inc/tsl_object.h @@ -0,0 +1,89 @@ +/** + ****************************************************************************** + * @file tsl_object.h + * @author MCD Application Team + * @version V1.4.4 + * @date 31-March-2014 + * @brief This file contains external declarations of the tsl_object.c file. + ****************************************************************************** + * @attention + * + *

© COPYRIGHT 2014 STMicroelectronics

+ * + * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.st.com/software_license_agreement_liberty_v2 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __TSL_OBJECT_H +#define __TSL_OBJECT_H + +/* Includes ------------------------------------------------------------------*/ +#include "tsl_touchkey.h" +#include "tsl_linrot.h" + +/* Exported types ------------------------------------------------------------*/ + +#define TSL_OBJ_TYPE_TKEY_MASK (0x10) /**< TouchKey object mask */ +#define TSL_OBJ_TYPE_LINROT_MASK (0x20) /**< Linear and Rotary objects mask */ +#define TSL_OBJ_TYPE_TRACKNAV_MASK (0x40) /**< TrackPad and NaviPad objects mask */ + +/** Contains all different kinds of sensors. + */ +typedef enum +{ + TSL_OBJ_TOUCHKEY = (TSL_OBJ_TYPE_TKEY_MASK + 0), /**< Normal TouchKey */ + TSL_OBJ_TOUCHKEYB = (TSL_OBJ_TYPE_TKEY_MASK + 1), /**< Basic TouchKey */ + TSL_OBJ_LINEAR = (TSL_OBJ_TYPE_LINROT_MASK + 0), /**< Normal Linear sensor */ + TSL_OBJ_LINEARB = (TSL_OBJ_TYPE_LINROT_MASK + 1), /**< Basic Linear sensor */ + TSL_OBJ_ROTARY = (TSL_OBJ_TYPE_LINROT_MASK + 2), /**< Normal Rotary sensor */ + TSL_OBJ_ROTARYB = (TSL_OBJ_TYPE_LINROT_MASK + 3), /**< Basic Rotary sensor */ + TSL_OBJ_TRACKPAD = (TSL_OBJ_TYPE_TRACKNAV_MASK + 0), /**< TrackPad sensor */ + TSL_OBJ_NAVIPAD = (TSL_OBJ_TYPE_TRACKNAV_MASK + 1) /**< NaviPad sensor */ +} TSL_ObjectType_enum_T; + +/** Contains the definition of an Object. + * Variables of this structure type can be placed in RAM or ROM. + */ +typedef struct +{ + TSL_ObjectType_enum_T Type; /**< Object type */ + void *Elmt; /**< Pointer to the object */ +} TSL_Object_T; + +/** Contains the definition of a Group of Objects. + * Variables of this structure type must be placed in RAM only. + */ +typedef struct +{ + CONST TSL_Object_T *p_Obj; /**< Pointer to the first object */ + TSL_tNb_T NbObjects; /**< Number of objects in the group */ + TSL_tNb_T StateMask; /**< "OR" of all objects state mask */ + TSL_StateChange_enum_T Change; /**< The State is different from the previous one */ + TSL_tIndex_T ECS_exec; /**< Flag for the ECS execution */ +#if TSLPRM_ECS_DELAY > 0 + TSL_tIndex_T ECS_wait; /**< Flag for the ECS delay */ + TSL_tTick_ms_T ECS_start_time; /**< Keep the time for the ECS delay */ +#endif +} TSL_ObjectGroup_T; + +/* Exported functions --------------------------------------------------------*/ + +void TSL_obj_GroupInit(TSL_ObjectGroup_T *objgrp); +void TSL_obj_GroupProcess(TSL_ObjectGroup_T *objgrp); +void TSL_obj_SetGlobalObj(CONST TSL_Object_T *pobj); + +#endif /* __TSL_OBJECT_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ -- cgit v1.2.3