/**
******************************************************************************
* @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****/