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/STMTouch_Driver/inc/tsl_acq.h | 118 +++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 Libraries/TouchSense/STMTouch_Driver/inc/tsl_acq.h (limited to 'Libraries/TouchSense/STMTouch_Driver/inc/tsl_acq.h') diff --git a/Libraries/TouchSense/STMTouch_Driver/inc/tsl_acq.h b/Libraries/TouchSense/STMTouch_Driver/inc/tsl_acq.h new file mode 100644 index 0000000..eec8d83 --- /dev/null +++ b/Libraries/TouchSense/STMTouch_Driver/inc/tsl_acq.h @@ -0,0 +1,118 @@ +/** + ****************************************************************************** + * @file tsl_acq.h + * @author MCD Application Team + * @version V1.4.4 + * @date 31-March-2014 + * @brief This file contains external declarations of the tsl_acq.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_ACQ_H +#define __TSL_ACQ_H + +/* Includes ------------------------------------------------------------------*/ + +// Check the device selection. +// It must be defined in the toolchain compiler preprocessor. +// The same name as in the Standard Peripheral Library is used. +#if !defined(STM8L10X) &&\ + !defined(STM8L15X_LD) && !defined(STM8L15X_MD) && !defined(STM8L15X_MDP) && !defined(STM8L15X_HD) &&\ + !defined(STM8TL5X) &&\ + !defined(STM32L1XX_MD) && !defined(STM32L1XX_MDP) && !defined(STM32L1XX_HD) && !defined(STM32L1XX_XL) &&\ + !defined(STM32F0XX) && !defined(STM32F0XX_MD) && !defined(STM32F0XX_HD) &&\ + !defined(STM32F051) && !defined(STM32F072) && !defined(STM32F042) &&\ + !defined(STM32F303xC) && !defined(STM32F334x8) && !defined(STM32F303x8) && !defined(STM32F301x8) && !defined(STM32F302x8) &&\ + !defined(STM32F37X) +#error "Device family not declared in the toolchain compiler preprocessor." +#endif + +#if defined(STM8L10X) || defined(STM8L15X_MD) || defined(STM8L15X_MDP) || defined(STM8L15X_HD) +#include "tsl_acq_stm8l_sw.h" // Software acquisition only +#endif + +#if defined(STM8L15X_LD) +#if defined(TSLPRM_STM8L1XX_SW_ACQ) +#include "tsl_acq_stm8l_sw.h" // Software acquisition +#else +#include "tsl_acq_stm8l_hw.h" // Hardware acquisition with Timers (default) +#endif +#endif + +#if defined(STM8TL5X) +#include "tsl_acq_stm8tl5x.h" +#endif + +#if defined(STM32L1XX_MD) +#include "tsl_acq_stm32l1xx_sw.h" // Software acquisition only +#endif + +#if defined(STM32L1XX_MDP) || defined(STM32L1XX_HD) || defined(STM32L1XX_XL) +#if defined(TSLPRM_STM32L1XX_SW_ACQ) +#include "tsl_acq_stm32l1xx_sw.h" // Software acquisition +#else +#include "tsl_acq_stm32l1xx_hw.h" // Hardware acquisition with Timers (default) +#endif +#endif + +#if defined(STM32F0XX) || defined(STM32F0XX_MD) || defined(STM32F0XX_HD) ||\ + defined(STM32F051) || defined(STM32F072) || defined(STM32F042) +#include "tsl_acq_stm32f0xx.h" +#endif + +#if defined(STM32F303xC) || defined(STM32F334x8) || defined(STM32F303x8) || defined(STM32F301x8) || defined(STM32F302x8) ||\ + defined(STM32F37X) +#include "tsl_acq_stm32f3xx.h" +#endif + +/* Defines -------------------------------------------------------------------*/ + +/* Exported types ------------------------------------------------------------*/ + +// Filter functions +typedef TSL_tMeas_T(* TSL_pFuncMeasFilter_T)(TSL_tMeas_T, TSL_tMeas_T); /**< Pointer to the Measure filter function */ +typedef TSL_tDelta_T(* TSL_pFuncDeltaFilter_T)(TSL_tDelta_T); /**< Pointer to the Delta filter function */ + +/** Structure containing all data of a Zone. + * A Zone is a set of Banks. + * Variables of this structure type can be placed in RAM or ROM. + */ +typedef struct +{ + // Common to all acquisitions + TSL_tIndex_T *BankIndex; /**< Pointer to an array of bank indexes */ + TSL_pFuncDeltaFilter_T *dFilter; /**< Pointer to a Delta filter function */ + TSL_tNb_T NbBanks; /**< Number of banks in the zone */ +} TSL_Zone_T; + +/* Exported variables --------------------------------------------------------*/ + +/* Exported macros -----------------------------------------------------------*/ + +/* Exported functions ------------------------------------------------------- */ +TSL_Status_enum_T TSL_acq_ZoneConfig(CONST TSL_Zone_T *zone, TSL_tIndex_T idx_bk); +TSL_Status_enum_T TSL_acq_BankGetResult(TSL_tIndex_T idx_bk, TSL_pFuncMeasFilter_T mfilter, TSL_pFuncDeltaFilter_T dfilter); +TSL_Status_enum_T TSL_acq_BankCalibrate(TSL_tIndex_T bank); +void TSL_acq_BankClearData(TSL_tIndex_T bank); + +#endif /* __TSL_ACQ_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ -- cgit v1.2.3