?? stm8_tsl_rc_configuration_toadapt.h
字號:
/**
******************************************************************************
* @file STM8_TSL_RC_Configuration_TOADAPT.h
* @brief RC Touch Sensing Library for STM8 CPU family.
* Static configuration of the Library. This file is a template and must be
* adapted to your requirements.
* @author STMicroelectronics - MCD Application Team
* @version V1.1.0
* @date 21-FEB-2009
******************************************************************************
*
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* <h2><center>© COPYRIGHT 2009 STMicroelectronics</center></h2>
* @image html logo.bmp
******************************************************************************
*/
#ifndef __TSL_CONFIGURATION__
#define __TSL_CONFIGURATION__
//==============================================================================
//
// 1) MCU FAMILY SELECTION
//
// Uncomment only one line.
//==============================================================================
//#define STM8L (1) /**< Select it if the STM8L MCU is used (value not used) */
#define STM8S (1) /**< Select it if the STM8S MCU is used (value not used) */
//==============================================================================
//
// 2) REFERENCE LOAD I/O DEFINITION
//
// Set the port
// Set the pin mask
//==============================================================================
#define LOADREF_PORT_ADDR (GPIOF_BaseAddress) /**< LOADREF pin GPIO base address */
#define LOADREF_BIT (0x10) /**< LOADREF pin mask */
//==============================================================================
//
// 3) SINGLE CHANNEL KEYS DEFINITION - PORT 1
//
// Set the number of keys
// Set the port
// Set the pins mask
//
// Warning: This port is mandatory and one key at least must be defined.
//==============================================================================
#define SCKEY_P1_KEY_COUNT (4) /**< Single channel key Port 1: Number of keys used (value from 1 to 8) */
#define SCKEY_P1_PORT_ADDR (GPIOC_BaseAddress) /**< Single channel key Port 1: GPIO base address */
#define SCKEY_P1_A (0x02) /**< Single channel key Port 1: 1st key mask */
#define SCKEY_P1_B (0x04) /**< Single channel key Port 1: 2nd key mask */
#define SCKEY_P1_C (0x08) /**< Single channel key Port 1: 3rd key mask */
#define SCKEY_P1_D (0x80) /**< Single channel key Port 1: 4th key mask */
#define SCKEY_P1_E (0) /**< Single channel key Port 1: 5th key mask */
#define SCKEY_P1_F (0) /**< Single channel key Port 1: 6th key mask */
#define SCKEY_P1_G (0) /**< Single channel key Port 1: 7th key mask */
#define SCKEY_P1_H (0) /**< Single channel key Port 1: 8th key mask */
#define SCKEY_P1_DRIVEN_SHIELD_MASK (0)
//==============================================================================
//
// 4) SINGLE CHANNEL KEYS DEFINITION - PORT 2
//
// Set the number of keys
// Set the port
// Set the pins mask
//
// Note: This port is optional. Set SCKEY_P2_KEY_COUNT to 0 to not use this port.
//==============================================================================
#define SCKEY_P2_KEY_COUNT (1) /**< Single channel key Port 2: Number of keys used (value from 0 to 8) */
#define SCKEY_P2_PORT_ADDR (GPIOD_BaseAddress) /**< Single channel key Port 2: GPIO base address */
#define SCKEY_P2_A (0x01) /**< Single channel key Port 2: 1st key mask */
#define SCKEY_P2_B (0) /**< Single channel key Port 2: 2nd key mask */
#define SCKEY_P2_C (0) /**< Single channel key Port 2: 3rd key mask */
#define SCKEY_P2_D (0) /**< Single channel key Port 2: 4th key mask */
#define SCKEY_P2_E (0) /**< Single channel key Port 2: 5th key mask */
#define SCKEY_P2_F (0) /**< Single channel key Port 2: 6th key mask */
#define SCKEY_P2_G (0) /**< Single channel key Port 2: 7th key mask */
#define SCKEY_P2_H (0) /**< Single channel key Port 2: 8th key mask */
#define SCKEY_P2_DRIVEN_SHIELD_MASK (0)
//==============================================================================
//
// 5) SINGLE CHANNEL KEYS DEFINITION - PORT 3
//
// Set the number of keys
// Set the port
// Set the pins mask
//
// Note: This port is optional. Set SCKEY_P3_KEY_COUNT to 0 to not use this port.
//==============================================================================
#define SCKEY_P3_KEY_COUNT (0) /**< Single channel key Port 3: Number of keys used (value from 0 to 8) */
#define SCKEY_P3_PORT_ADDR (0) /**< Single channel key Port 3: GPIO base address */
#define SCKEY_P3_A (0) /**< Single channel key Port 3: 1st key mask */
#define SCKEY_P3_B (0) /**< Single channel key Port 3: 2nd key mask */
#define SCKEY_P3_C (0) /**< Single channel key Port 3: 3rd key mask */
#define SCKEY_P3_D (0) /**< Single channel key Port 3: 4th key mask */
#define SCKEY_P3_E (0) /**< Single channel key Port 3: 5th key mask */
#define SCKEY_P3_F (0) /**< Single channel key Port 3: 6th key mask */
#define SCKEY_P3_G (0) /**< Single channel key Port 3: 7th key mask */
#define SCKEY_P3_H (0) /**< Single channel key Port 3: 8th key mask */
#define SCKEY_P3_DRIVEN_SHIELD_MASK (0)
//==============================================================================
//
// 6) NUMBER OF MULTI CHANNEL KEYS AND NUMBER OF CHANNELS USED
//
// Set the total number of multi channel keys used (0, 1 or 2)
// Set the number of channels (5 or 8)
//==============================================================================
#define NUMBER_OF_MULTI_CHANNEL_KEYS (1) /**< Number of multi channel keys (value from 0 to 2) */
#define CHANNEL_PER_MCKEY (5) /**< Number of channels per key (possible values are 5 or 8 only) */
//==============================================================================
//
// 7) MULTI CHANNEL KEY 1 DEFINITION
//
// Set the port used
// Set the pins mask
//
// Note: This key is optional
//==============================================================================
#if NUMBER_OF_MULTI_CHANNEL_KEYS > 0
#define MCKEY1_A_PORT_ADDR (GPIOD_BaseAddress) /**< Multi channel key 1: 1st channel port */
#define MCKEY1_A (0x40) /**< Multi channel key 1: 1st channel mask */
#define MCKEY1_B_PORT_ADDR (GPIOD_BaseAddress) /**< Multi channel key 1: 2nd channel port */
#define MCKEY1_B (0x20) /**< Multi channel key 1: 2nd channel mask */
#define MCKEY1_C_PORT_ADDR (GPIOD_BaseAddress) /**< Multi channel key 1: 3rd channel port */
#define MCKEY1_C (0x10) /**< Multi channel key 1: 3rd channel mask */
#define MCKEY1_D_PORT_ADDR (GPIOD_BaseAddress) /**< Multi channel key 1: 4th channel port */
#define MCKEY1_D (0x08) /**< Multi channel key 1: 4th channel mask */
#define MCKEY1_E_PORT_ADDR (GPIOD_BaseAddress) /**< Multi channel key 1: 5th channel port */
#define MCKEY1_E (0x04) /**< Multi channel key 1: 5th channel mask */
#define MCKEY1_F_PORT_ADDR (0) /**< Multi channel key 1: 6th channel port */
#define MCKEY1_F (0) /**< Multi channel key 1: 6th channel mask */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -