亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? structure.h

?? launchpad msp430官方示例
?? H
字號:
#ifndef CTS_STRUCTURE
#define CTS_STRUCTURE
//******************************************************************************
// structure.h
//
//
//******************************************************************************
//******************************************************************************
//******************************************************************************
// The following elements need to be configured by the user.
//******************************************************************************

#include "msp430.h"
//#include "msp430f5529.h"
#include <stdint.h>

/* Public Globals */
extern const struct Element element0;     //
extern const struct Element element1;     // 
extern const struct Element element2;     // 
extern const struct Element element3;     // 
extern const struct Element element4;     //
extern const struct Element element5;     //
extern const struct Element element6;     // 
extern const struct Element element7;     // 
extern const struct Element element8;     // 
extern const struct Element element9;     //
extern const struct Element elementA;     //
extern const struct Element elementB;     // 

extern const struct Sensor keypad;    // structure of info for a given 
                                          // group. There needs to be one 
                                          // instance for each group of sensors.

//****** RAM ALLOCATION ********************************************************
// TOTAL_NUMBER_OF_ELEMENTS represents the total number of elements used, even if 
// they are going to be segmented into seperate groups.  This defines the 
// RAM allocation for the baseline tracking.  If only the TI_CAPT_Raw function
// is used, then this definition should be removed to conserve RAM space.
#define TOTAL_NUMBER_OF_ELEMENTS 12
// If the RAM_FOR_FLASH definition is removed, then the appropriate HEAP size 
// must be allocated. 2 bytes * MAXIMUM_NUMBER_OF_ELEMENTS_PER_SENSOR + 2 bytes
// of overhead.
#define RAM_FOR_FLASH
//****** Structure Array Definition ********************************************
// This defines the array size in the sensor strucure.  In the event that 
// RAM_FOR_FLASH is defined, then this also defines the amount of RAM space
// allocated (global variable) for computations.
#define MAXIMUM_NUMBER_OF_ELEMENTS_PER_SENSOR  12
//****** Choosing a  Measurement Method ****************************************
// These variables are references to the definitions found in structure.c and
// must be generated per the application.
// possible values for the method field

// OSCILLATOR DEFINITIONS
//#define RO_COMPAp_TA0_WDTp  		64
//#define RO_PINOSC_TA0_WDTp  		65
//#define RO_PINOSC_TA0       		66
//#define RO_COMPAp_TA1_WDTp  		67
//#define RO_COMPB_TA0_WDTA			68
#define RO_COMPB_TA1_WDTA         69

// RC DEFINITIONS
//#define RC_PAIR_TA0       		01
         
// FAST RO DEFINITIONS
//#define fRO_PINOSC_TA0_SW           25
//#define fRO_COMPB_TA0_SW            26
//#define fRO_COMPB_TA1_SW            27
//#define fRO_COMPAp_TA0_SW            28
//#define fRO_COMPAp_SW_TA0            29
//#define fRO_COMPAp_TA1_SW            30

//****** WHEEL and SLIDER ******************************************************
// Are wheel or slider representations used?
//#define SLIDER
//#define ILLEGAL_SLIDER_WHEEL_POSITION		0xFFFF
//#define WHEEL

//******************************************************************************
// End of user configuration section.
//******************************************************************************
//******************************************************************************
//******************************************************************************

//possible timer source clock dividers, different from clock module dividers
#define TIMER_TxCLK 	0x0000       
#define TIMER_ACLK  	0x0100
#define TIMER_SMCLK 	0x0200
#define TIMER_INCLK 	0x0300

#define TIMER_SOURCE_DIV_0 0x0000  // ID_0, IDX_0
#define TIMER_SOURCE_DIV_1 0x0040
#define TIMER_SOURCE_DIV_2 0x0080
#define TIMER_SOURCE_DIV_3 0x00C0

#define GATE_WDT_ACLK      0x0004
#define GATE_WDT_SMCLK     0x0000
#define GATE_WDTp_ACLK     0x0004
#define GATE_WDTp_SMCLK    0x0000

#define WDTp_GATE_32768    0x0000  // watchdog source/32768
#define WDTp_GATE_8192     0x0001  // watchdog source/8192
#define WDTp_GATE_512      0x0002  // watchdog source/512
#define WDTp_GATE_64       0x0003  // watchdog source/64

#define GATE_WDTA_SMCLK     0x0000
#define GATE_WDTA_ACLK      0x0020
#define GATE_WDTA_VLO       0x0040
#define GATE_WDTA_XCLK      0x0060

#define WDTA_GATE_2G       0x0000  // watchdog source/2G
#define WDTA_GATE_128M     0x0001  // watchdog source/128M
#define WDTA_GATE_8192K    0x0002  // watchdog source/8192K
#define WDTA_GATE_512K     0x0003  // watchdog source/512K
#define WDTA_GATE_32768    0x0004  // watchdog source/32768
#define WDTA_GATE_8192     0x0005  // watchdog source/8192
#define WDTA_GATE_512      0x0006  // watchdog source/512
#define WDTA_GATE_64       0x0007  // watchdog source/64

// The below variables are used to excluded portions of code not needed by
// the method chosen by the user. Uncomment the type used prior to compilation.
// Multiple types can be chosen as needed.
// What Method(s) are used in this application?

#ifdef RO_COMPAp_TA0_WDTp
    #define RO_TYPE
    #define RO_COMPAp_TYPE
    #define WDT_GATE
    #define HAL_DEFINITION
    //what devices have Pxsel2 ??
    // msp430f2112, 2122, 2132
    // msp430G2112, G2212, G2312, G2412, G2152, G2252, G2352, G2452
    // SEL2REGISTER
    #ifdef __MSP430F2112
      #define SEL2REGISTER
    #endif 
    #ifdef __MSP430F2122
      #define SEL2REGISTER
    #endif 
    #ifdef __MSP430F2132
      #define SEL2REGISTER
    #endif 
    #ifdef __MSP430G2112
      #define SEL2REGISTER
    #endif
    #ifdef __MSP430G2212
      #define SEL2REGISTER
    #endif      
    #ifdef __MSP430G2312
      #define SEL2REGISTER
    #endif  
    #ifdef __MSP430G2412
      #define SEL2REGISTER
    #endif  
    #ifdef __MSP430G2152
      #define SEL2REGISTER
    #endif 
    #ifdef __MSP430G2252
      #define SEL2REGISTER
    #endif 
    #ifdef __MSP430G2352
      #define SEL2REGISTER
    #endif 
    #ifdef __MSP430G2452
      #define SEL2REGISTER
    #endif 
#endif

#ifdef RO_PINOSC_TA0_WDTp
    #define RO_TYPE
    #define RO_PINOSC_TYPE
    #define WDT_GATE
    #define HAL_DEFINITION
#endif

#ifdef RO_PINOSC_TA0
    #define RO_TYPE
    #define RO_PINOSC_TYPE
    #define ACCUMULATE_TYPE
    #define HAL_DEFINITION
#endif

#ifdef RO_COMPAp_TA1_WDTp
    #define RO_TYPE
    #define RO_COMPAp_TYPE
    #define WDT_GATE
    #define HAL_DEFINITION
#endif

#ifdef RO_COMPB_TA0_WDTA
    #define RO_TYPE
    #define RO_COMPB_TYPE
    #define WDT_GATE
    #define HAL_DEFINITION
#endif

#ifdef RO_COMPB_TA1_WDTA
    #define RO_TYPE
    #define RO_COMPB_TYPE
    #define WDT_GATE
    #define HAL_DEFINITION
#endif

#ifdef RC_PAIR_TA0
    #define RC_TYPE
    #define RC_PAIR_TYPE
    #define ACCUMULATE_TYPE
    #define HAL_DEFINITION
#endif

#ifdef fRO_PINOSC_TA0_SW
	#define RO_TYPE
    #define RO_PINOSC_TYPE
	#define HAL_DEFINITION
#endif

#ifdef fRO_COMPB_TA0_SW
    #define RO_TYPE
    #define RO_COMPB_TYPE
	#define HAL_DEFINITION
#endif

#ifdef fRO_COMPB_TA1_SW
    #define RO_TYPE
    #define RO_COMPB_TYPE
	#define HAL_DEFINITION
#endif

#ifdef fRO_COMPAp_TA0_SW
    #define RO_TYPE
    #define RO_COMPAp_TYPE
	#define HAL_DEFINITION
#endif

#ifdef fRO_COMPAp_TA1_SW
    #define RO_TYPE
    #define RO_COMPAp_TYPE
    #define HAL_DEFINITION
#endif

#ifdef fRO_COMPAp_SW_TA0
    #define RO_TYPE
    #define RO_COMPAp_TYPE
    #define HAL_DEFINITION
#endif

#ifdef SLIDER
	#define SLIDER_WHEEL
#endif

#ifdef WHEEL
	#define SLIDER_WHEEL
#endif

#define RO_MASK         0xC0        // 1100 0000
#define RC_FRO_MASK     0x3F        // 0011 1111

//******************************************************************************
// The sensor structure identifies port or comparator input definitions for each
// sensor.
//******************************************************************************
struct Element{

#ifdef RO_PINOSC_TYPE
// These register address definitions are needed for each sensor only
// when using the PinOsc method
  uint8_t *inputPxselRegister;    // PinOsc: port selection address
  uint8_t *inputPxsel2Register;   // PinOsc: port selection 2 address  
#endif
  
#ifdef RC_PAIR_TYPE
// these fields are specific to the RC type. 
  uint8_t *inputPxoutRegister;    // RC: port output address: PxOUT
  volatile uint8_t *inputPxinRegister;     // RC: port input address: PxIN
  uint8_t *inputPxdirRegister;    // RC+PinOsc: port direction address
  uint8_t *referencePxoutRegister;// RC: port output address: PxOUT
  uint8_t *referencePxdirRegister;// RC: port direction address: PxDIR           
  uint8_t referenceBits;           // RC: port bit definition
#endif
 		     
  uint16_t inputBits;                 // Comp_RO+FastRO+RC+PinOsc: bit 
                                      // definition
                                      //
                                      // for comparator input bit 
                                      // location in CACTL2 or CBCTL0
                                      
  uint16_t threshold;                   // specific threshold for each button
  uint16_t maxResponse;                 // Special Case: Slider max counts
};

//******************************************************************************
// The following structure definitons are application independent and are not
// intended to be modified.
//
// The CT_handler 'groups' the sensor based upon function and capacitive 
// measurement method.
//******************************************************************************

struct Sensor{
  // the method acts as the switch to determine which HAL is called
  uint8_t halDefinition;           // COMPARATOR_TYPE (RO), RC, etc
                                   // RO_COMPA, RO_COMPB, RO_PINOSC
                                   // RC_GPIO, RC_COMPA, RC_COMPB
                                   // FAST_SCAN_RO
                                          
  uint8_t numElements;             // number of elements within group
  uint8_t baseOffset;              // the offset within the global 
                                   // base_cnt array

  struct Element const *arrayPtr[MAXIMUM_NUMBER_OF_ELEMENTS_PER_SENSOR];    
                                   // an array of pointers

//******************************************************************************
// Reference structure definitions for comparator types, for the RC method the 
// reference is defined within the element.
  
#ifdef RO_COMPAp_TYPE
  uint8_t * refPxoutRegister;      // RO+FastRO: port output address
  uint8_t * refPxdirRegister;      // RO+FastRO: port direction address
  uint8_t refBits;                 // RO+FastRO: port bit definition
  
  uint8_t * txclkDirRegister;      // PxDIR 
  uint8_t * txclkSelRegister;      // PxSEL
  uint8_t txclkBits;               // Bit field for register
  
  uint8_t *caoutDirRegister;      // PxDIR
  uint8_t *caoutSelRegister;      // PxSEL
  uint8_t caoutBits;               // Bit field for register
  
  // This is only applicable to the RO_COMPAp_TYPE
#ifdef SEL2REGISTER
  uint8_t *caoutSel2Register;
  uint8_t *txclkSel2Register;
#endif
  
  uint8_t refCactl2Bits;          // RO: CACTL2 input definition, 
                                          // CA0 (P2CA0),CA1(P2CA4),
                                          // CA2(P2CA0+P2CA4)
  uint8_t capdBits;
#endif 

#ifdef RO_COMPB_TYPE
  uint8_t *cboutTAxDirRegister;  // CBOUT_TA0CLK 
  uint8_t *cboutTAxSelRegister;  // CBOUT_TA0CLK
  uint8_t cboutTAxBits;           // Bit field for register  
  uint16_t cbpdBits;
#endif

//*****************************************************************************
// Timer definitions
//  The basic premise is to count a number of clock cycles within a time
//  period, where either the clock source or the timer period is a function
//  of the element capacitance.
// 
// RC Method:
//          Period: accumulationCycles * charge and discharge time of RC 
//          circuit where C is capacitive touch element
//
//          clock source: measGateSource/sourceScale
// RO Method:
//          Period: accumulationCycles*measGateSource/sourceScale 
//                  (with WDT sourceScale = 1, accumulationCycles is WDT control
//                   register settings)
//
//          clock source: relaxation oscillator where freq is a function of C
//
// fRO Method:
//          Period: accumulationCycles * 1/freq, freq is a function of C
//
//          clock source: measGateSource/sourceScale
     
  uint16_t measGateSource;         // RC+FastRO: measurement timer source,
                                   // {ACLK, TACLK, SMCLK}
                                   // Comp_RO+PinOsc: gate timer source, 
                                   // {ACLK, TACLK, SMCLK} 
  uint16_t sourceScale;            // Comp_RO+FastRO+PinOsc: gate timer,
                                   // TA/TB/TD, scale: 1,1/2,1/4,1/8
                                   // RC+FastRO: measurement timer, TA/TB/TD
                                   // scale: 16, 8, 4, 2, 1, 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美色网站导航| 国产欧美一区二区精品秋霞影院| 欧美mv和日韩mv国产网站| 国产精品视频在线看| 亚洲成人av一区二区三区| 国产成人免费视频精品含羞草妖精| 色综合天天综合在线视频| 国产午夜亚洲精品午夜鲁丝片| 亚洲一区二区三区小说| 成人黄色小视频| 亚洲精品一区二区在线观看| 亚洲第一久久影院| 色综合一个色综合| 国产精品不卡一区| 国产露脸91国语对白| 日韩丝袜美女视频| 日韩—二三区免费观看av| 色女孩综合影院| 亚洲三级电影网站| 不卡的电影网站| 久久久99久久精品欧美| 麻豆91在线播放| 欧美一级二级在线观看| 日日夜夜精品视频天天综合网| 成人av电影在线观看| 久久久国产精品不卡| 国产原创一区二区| 欧美www视频| 国模冰冰炮一区二区| 精品电影一区二区| 国产一区高清在线| 久久久久久99久久久精品网站| 国产综合久久久久久鬼色 | 99热精品国产| 26uuuu精品一区二区| 久久精品噜噜噜成人88aⅴ| 91精品国产色综合久久不卡蜜臀 | 欧美日韩一卡二卡三卡| 一区二区三区电影在线播| 99精品欧美一区二区三区小说| 国产精品水嫩水嫩| 91香蕉视频在线| 一区二区三国产精华液| 欧美性大战xxxxx久久久| 午夜国产精品一区| 精品国产乱码久久久久久1区2区| 国内外成人在线视频| 国产欧美视频在线观看| 91视频免费看| 视频一区免费在线观看| 久久色.com| 99精品热视频| 日韩高清在线观看| 久久久久国产精品麻豆ai换脸| 成人久久久精品乱码一区二区三区 | 99久久精品99国产精品 | 久久精品一区四区| 成人中文字幕电影| 亚洲最大的成人av| 日韩欧美国产小视频| 国产91精品一区二区麻豆网站| 1区2区3区精品视频| 欧美一区二区视频在线观看| 激情亚洲综合在线| 亚洲免费在线播放| 精品日韩99亚洲| 91最新地址在线播放| 99久久婷婷国产综合精品 | 日韩丝袜美女视频| 国产精品一区二区无线| 国产精品久久久久久久久免费丝袜| 91社区在线播放| 久久国产视频网| 亚洲精品视频在线观看免费| 欧美一区二区三区日韩视频| 成人动漫视频在线| 另类小说综合欧美亚洲| 亚洲免费av高清| 久久精品网站免费观看| 欧美性一区二区| 高清国产一区二区三区| 午夜精品一区二区三区三上悠亚| 久久久久久**毛片大全| 欧美日韩激情在线| 成人av资源下载| 韩国精品在线观看| 午夜精品福利视频网站| 日韩一区日韩二区| 久久久久久99精品| 欧美一区二区成人| 欧美午夜影院一区| 99久久婷婷国产| 国产精品一区二区不卡| 蜜臀av性久久久久蜜臀aⅴ四虎| 国产精品久久久久久久久免费桃花| 日韩欧美aaaaaa| 欧美日韩一区视频| 色综合咪咪久久| 99久久精品免费精品国产| 国产一区二区在线看| 免费黄网站欧美| 亚洲成av人片在www色猫咪| 亚洲欧美aⅴ...| 国产精品久久久久影视| 欧美国产日韩在线观看| 久久蜜桃香蕉精品一区二区三区| 欧美一区二区三区播放老司机| 欧美三级中文字幕在线观看| 色婷婷激情一区二区三区| eeuss鲁片一区二区三区在线看| 狠狠色丁香久久婷婷综合丁香| 性感美女极品91精品| 亚洲一区二区黄色| 天天综合日日夜夜精品| 婷婷六月综合亚洲| 日韩成人一级大片| 久久国产视频网| 国产一区二三区好的| 国产精品2024| 成人免费视频免费观看| 成年人网站91| 色综合色综合色综合色综合色综合| 波多野结衣一区二区三区| 成人精品国产免费网站| 99re视频这里只有精品| 日本高清免费不卡视频| 欧美三级午夜理伦三级中视频| 欧美亚洲禁片免费| 欧美日本一道本| 日韩精品一区二区三区四区视频| 欧美变态口味重另类| 久久久天堂av| 综合色中文字幕| 亚洲午夜一区二区三区| 蜜桃精品视频在线| 成人夜色视频网站在线观看| 91麻豆文化传媒在线观看| 欧美日韩一区二区欧美激情| 日韩视频一区在线观看| 久久久久久99久久久精品网站| 国产精品丝袜黑色高跟| 亚洲成人www| 韩国v欧美v日本v亚洲v| 99国产精品视频免费观看| 欧美日韩国产一二三| www国产成人免费观看视频 深夜成人网| 久久久午夜电影| 亚洲一区二区在线免费观看视频| 日本午夜精品视频在线观看| 国产91清纯白嫩初高中在线观看 | 国产黄色精品视频| 色综合视频一区二区三区高清| 欧美日韩精品一区二区三区蜜桃| 精品少妇一区二区三区视频免付费| 国产校园另类小说区| 亚洲bt欧美bt精品777| 国产成人av电影在线观看| 欧美无砖砖区免费| 国产亚洲精品中文字幕| 午夜精品福利视频网站| 成人午夜av在线| 日韩一区二区在线观看视频| 中文在线一区二区| 日韩高清不卡在线| 91麻豆6部合集magnet| 国产亚洲制服色| 日韩精品成人一区二区三区| av在线不卡电影| 精品国产伦一区二区三区免费| 一区二区三区欧美日韩| 国产夫妻精品视频| 日韩欧美不卡一区| 偷拍一区二区三区四区| 99久久婷婷国产精品综合| 久久综合av免费| 日本网站在线观看一区二区三区| 91论坛在线播放| 国产精品二区一区二区aⅴ污介绍| 美洲天堂一区二卡三卡四卡视频| 91首页免费视频| 中日韩av电影| 国产一区美女在线| 日韩精品一区在线| 亚洲 欧美综合在线网络| 97精品电影院| 国产精品水嫩水嫩| 成人免费视频一区| 欧美激情在线一区二区| 国产一区二区成人久久免费影院 | 欧美激情在线看| 精品一区精品二区高清| 欧美一区二区三区在| 天天色综合天天| 欧美日韩在线观看一区二区 | 精品亚洲porn| 欧美成人精品3d动漫h| 秋霞av亚洲一区二区三| 欧美日韩不卡一区| 日韩成人免费电影| 777久久久精品|