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

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

?? structure.h

?? launchpad msp430官方示例
?? H
字號:
#ifndef CTS_STRUCTURE
#define CTS_STRUCTURE
//******************************************************************************
// structure.h
//
// RO_PINOSC_TA0_One_Button_Compact example
// Touch the middle element to turn on/off the center button LED
// Uses the low-level API function calls for reduced memory footprint.
// Note: Baseline tracking is implemented in the Application Layer
// RO method capactiance measurement using PinOsc IO, TimerA0, and WDT+
//
// This file contains both application dependent and independent pieces.  The 
// dependent piece must be updated along with structure.c, and carries the
// naming conventions found in structure.c to the rest of the library.
//
//******************************************************************************
//******************************************************************************
//******************************************************************************
// The following elements need to be configured by the user.
//******************************************************************************

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

/* Public Globals */
extern const struct Element middle_element;     
extern const struct Sensor middle_button;    

//****** 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 4
// 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  1
//****** 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 RO_COMPAp_TA0_SW
    #define RO_TYPE
    #define RO_COMPAp_TYPE
    #define HAL_DEFINITION
#endif

#ifdef RO_PINOSC_TA0_SW
    #define RO_TYPE
    #define RO_PINOSC_TYPE
    #define HAL_DEFINITION
#endif

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

#ifdef RC_PAIR_TA1
    #define RC_TYPE
    #define RC_PAIR_TYPE
    #define HAL_DEFINITION
#endif

#ifdef RC_PAIR_TD0
    #define RC_TYPE
    #define RC_PAIR_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_TA0_SW
    #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一区二区三区免费野_久草精品视频
成人一区二区三区视频在线观看 | 亚洲一区二区欧美激情| 欧美一级在线免费| 大陆成人av片| 日本一不卡视频| 国产精品福利一区二区| 精品国产一区二区三区忘忧草 | 欧美日韩亚州综合| 国产精品一二三四区| 在线观看av一区二区| 一片黄亚洲嫩模| 91精品国产福利在线观看| 亚洲一二三四在线| 国产视频一区二区三区在线观看| 欧美剧在线免费观看网站| 99久久久久久| 国产精品一区三区| 美女网站在线免费欧美精品| 亚洲一二三四久久| 亚洲啪啪综合av一区二区三区| 国产亚洲欧美在线| www国产亚洲精品久久麻豆| 欧美亚一区二区| 一本色道久久加勒比精品| 成人丝袜18视频在线观看| 国产做a爰片久久毛片| 秋霞影院一区二区| 肉色丝袜一区二区| 丝袜亚洲另类欧美| 三级精品在线观看| 日韩av电影免费观看高清完整版在线观看| 一区二区三区高清在线| 亚洲黄色免费网站| 亚洲欧美激情一区二区| 日韩欧美一二区| 99久久精品国产麻豆演员表| 亚洲成人免费电影| 一区二区三区丝袜| 一区二区三区视频在线看| 亚洲日本va在线观看| 国产精品久久久久久久蜜臀| 最新国产精品久久精品| 综合久久久久久| 亚洲精品免费播放| 亚洲一区二区三区四区在线免费观看 | 日韩欧美国产电影| 91精品国产综合久久久久久漫画| 欧美一级二级三级蜜桃| www成人在线观看| 国产午夜精品理论片a级大结局 | 这里只有精品视频在线观看| 欧美一级理论性理论a| 日韩精品一区二区三区四区 | 不卡一区中文字幕| 色屁屁一区二区| 91 com成人网| 精品成人一区二区三区| 国产日产欧美一区二区视频| 中文字幕巨乱亚洲| 一区二区三区**美女毛片| 亚洲国产欧美在线| 麻豆91精品91久久久的内涵| 九九九久久久精品| 国产精品亚洲成人| 色天天综合久久久久综合片| 5月丁香婷婷综合| 久久天天做天天爱综合色| 亚洲欧洲日韩在线| 午夜婷婷国产麻豆精品| 国产精品一区二区三区四区| a4yy欧美一区二区三区| 欧美久久久一区| 久久在线免费观看| 亚洲人午夜精品天堂一二香蕉| 亚洲国产日韩精品| 国产高清不卡二三区| 色综合视频在线观看| 欧美一激情一区二区三区| 国产精品久久久久影院老司| 日韩电影在线观看电影| 99精品视频在线观看| 91精品久久久久久久91蜜桃| 国产精品久久久久久久蜜臀| 日韩不卡手机在线v区| 99精品久久99久久久久| 欧美zozo另类异族| 一区二区三区不卡视频| 国产寡妇亲子伦一区二区| 欧美日韩亚洲综合在线| 国产午夜亚洲精品理论片色戒| 亚洲国产aⅴ天堂久久| 国产激情视频一区二区三区欧美| 欧美亚男人的天堂| 中文字幕一区二区三区在线观看 | 婷婷丁香久久五月婷婷| 丁香啪啪综合成人亚洲小说 | 日韩精品资源二区在线| 亚洲永久免费av| 福利视频网站一区二区三区| 欧美精品视频www在线观看| 国产女主播视频一区二区| 五月婷婷久久综合| 91丨porny丨国产入口| 日韩精品影音先锋| 午夜精品在线视频一区| 97国产精品videossex| 日本一区二区综合亚洲| 久久99精品久久久久久动态图| 欧美视频一区二| 亚洲欧美国产三级| 大尺度一区二区| 国产亚洲va综合人人澡精品 | 欧美日韩在线播| 亚洲欧洲av在线| 国产成人免费9x9x人网站视频| 欧美一区午夜视频在线观看| 亚洲午夜精品17c| 色菇凉天天综合网| 日韩毛片高清在线播放| 国产高清精品在线| 国产无一区二区| 国产很黄免费观看久久| 日韩欧美123| 久久国产成人午夜av影院| 日韩一卡二卡三卡国产欧美| 亚洲成人av在线电影| 欧美视频自拍偷拍| 亚洲第一搞黄网站| 欧美电影一区二区三区| 性欧美大战久久久久久久久| 欧美日韩免费观看一区三区| 亚洲曰韩产成在线| 欧美理论在线播放| 青青草国产成人av片免费| 91精品国产91久久综合桃花| 奇米色777欧美一区二区| 91精品在线观看入口| 爽好多水快深点欧美视频| 日韩一级精品视频在线观看| 精品中文字幕一区二区| 欧美精品一区二区三区很污很色的| 寂寞少妇一区二区三区| 久久久av毛片精品| 成人性视频免费网站| 成人免费在线视频观看| 色婷婷香蕉在线一区二区| 一区二区三区日韩在线观看| 在线观看免费一区| 日韩国产在线观看| 欧美大片国产精品| 国产ts人妖一区二区| 中文字幕一区二区三区不卡在线| 色哟哟国产精品免费观看| 亚洲愉拍自拍另类高清精品| 欧美一区二区三区爱爱| 国产一区二区视频在线| 国产精品久久久久国产精品日日| 91亚洲男人天堂| 香蕉久久夜色精品国产使用方法| 日韩视频在线观看一区二区| 国产高清不卡二三区| 一区二区三区四区不卡在线| 日韩欧美在线1卡| 成人综合婷婷国产精品久久蜜臀| 一区二区三区在线观看视频| 91精品国产综合久久蜜臀| 国产高清不卡二三区| 亚洲午夜久久久久久久久久久 | 欧美精品一卡两卡| 国产一区高清在线| 亚洲日本韩国一区| 日韩三级.com| 一本一道综合狠狠老| 麻豆91在线播放| 亚洲激情欧美激情| 日韩你懂的在线观看| 91美女视频网站| 国产自产高清不卡| 亚洲自拍另类综合| 久久久久久久久久久久久夜| 色av综合在线| 国产一区二区三区日韩| 亚洲国产cao| 国产精品国产三级国产普通话三级 | 国产一区激情在线| 亚洲国产婷婷综合在线精品| 久久亚区不卡日本| 欧美久久一区二区| 91蜜桃视频在线| 国产河南妇女毛片精品久久久 | 亚洲欧洲制服丝袜| 欧美大尺度电影在线| 在线中文字幕一区| 成人天堂资源www在线| 久久99深爱久久99精品| 亚洲国产中文字幕在线视频综合| 国产精品久久久久永久免费观看| 精品国产一区二区三区久久久蜜月| 欧美在线免费观看视频| 99这里都是精品|