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 --- Libraries/TouchSense/tsl_user.h | 102 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 Libraries/TouchSense/tsl_user.h (limited to 'Libraries/TouchSense/tsl_user.h') diff --git a/Libraries/TouchSense/tsl_user.h b/Libraries/TouchSense/tsl_user.h new file mode 100644 index 0000000..cbf5d34 --- /dev/null +++ b/Libraries/TouchSense/tsl_user.h @@ -0,0 +1,102 @@ +/** + ****************************************************************************** + * @file STM32F072B_Ex01_2TKeys_EVAL\inc\tsl_user.h + * @author MCD Application Team + * @version V1.1.0 + * @date 04-April-2014 + * @brief Touch-Sensing user configuration and api 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_USER_H +#define __TSL_USER_H + +#include "tsl.h" + +//============================================================================== +// U S E R S E T T I N G S +//============================================================================== + +// Select to use or not the LCD (0=No, 1=Yes) +// Warning: the usage of LCD slows down the touch-sensing reactivity observed on the LEDs +#define USE_LCD (0) + +// STMStudio software usage (0=No, 1=Yes) +// Warning: The low-power mode must be disabled when STMStudio is used. +#define USE_STMSTUDIO (0) + +//============================================================================== + + +#if USE_STMSTUDIO > 0 +#include "stmCriticalSection.h" +#define STMSTUDIO_LOCK {enterLock();} +#define STMSTUDIO_UNLOCK {exitLock();} +#else +#define STMSTUDIO_LOCK +#define STMSTUDIO_UNLOCK +#endif + +//======================= +// Channel IOs definition +//======================= + +#define CHANNEL_0_IO_MSK (TSL_GROUP1_IO3) +#define CHANNEL_0_GRP_MSK (TSL_GROUP1) +#define CHANNEL_0_SRC (0) // Index in source register (TSC->IOGXCR[]) +#define CHANNEL_0_DEST (0) // Index in destination result array + +#define CHANNEL_1_IO_MSK (TSL_GROUP5_IO1) +#define CHANNEL_1_GRP_MSK (TSL_GROUP5) +#define CHANNEL_1_SRC (4) // Index in source register (TSC->IOGXCR[]) +#define CHANNEL_1_DEST (1) // Index in destination result array + +//====================== +// Shield IOs definition +//====================== + +//#define SHIELD_IO_MSK (TSL_GROUP4_IO1) + +//================= +// Banks definition +//================= + +#define BANK_0_NBCHANNELS (1) +#define BANK_0_MSK_CHANNELS (CHANNEL_0_IO_MSK) +#define BANK_0_MSK_GROUPS (CHANNEL_0_GRP_MSK) // Only these groups will be acquired + +#define BANK_1_NBCHANNELS (1) +#define BANK_1_MSK_CHANNELS (CHANNEL_1_IO_MSK) +#define BANK_1_MSK_GROUPS (CHANNEL_1_GRP_MSK) // Only these groups will be acquired + +// User Parameters +extern CONST TSL_Bank_T MyBanks[]; +extern CONST TSL_TouchKey_T MyTKeys[]; +extern CONST TSL_Object_T MyObjects[]; +extern TSL_ObjectGroup_T MyObjGroup; + +void TSL_user_Init(void); +TSL_Status_enum_T TSL_user_Action(void); +void TSL_user_SetThresholds(void); + +#endif /* __TSL_USER_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ -- cgit v1.2.3