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

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

?? structure.h

?? launchpad msp430官方示例
?? H
字號:
#ifndef CTS_STRUCTURE
#define CTS_STRUCTURE
//******************************************************************************
// structure.h
//
// Launch Pad MSP430G2452
// 4 element wheel
// middle button
// proximity sensor
//
//
// 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.
//
//
// Developed with IAR 5.10.4 [Kickstart] (5.10.4.30168)
//
// Revision 0.06   Updated with case and format from Stye Guide
//
//******************************************************************************
//******************************************************************************
//******************************************************************************
// The following elements need to be configured by the user.
//******************************************************************************

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

/* Public Globals */
extern const struct Element volume_down;     // structure containing elements for
extern const struct Element volume_up;     // 
extern const struct Element right;     // 
extern const struct Element left;     // 
extern const struct Element middle_element;     // 
extern const struct Element proximity_element;     // 

extern const struct Sensor wheel;

extern const struct Sensor middle_button;    // structure of info for a given  

extern const struct Sensor proximity_sensor;    // structure of info for a given  

//****** 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 6
// 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  4
//****** 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一区二区三区免费野_久草精品视频
欧美亚洲动漫精品| 亚洲精品乱码久久久久久| 国产尤物一区二区| 亚洲精品一线二线三线| 久久国产精品第一页| 久久久久久**毛片大全| 福利电影一区二区三区| 欧美国产日韩亚洲一区| 成人av网在线| 亚洲一区二区在线免费观看视频| 欧美日本精品一区二区三区| 日本少妇一区二区| 日本一区二区三区国色天香| 99riav久久精品riav| 亚洲国产一二三| 精品国产3级a| av一区二区久久| 日日夜夜免费精品视频| 亚洲精品一区二区三区99| 成人av在线一区二区三区| 亚洲一区二区三区中文字幕| 日韩精品一区二区在线观看| 99精品在线观看视频| 婷婷中文字幕一区三区| 欧美激情中文字幕一区二区| 91一区一区三区| 日韩国产欧美三级| 欧美日韩国产色站一区二区三区| 日日夜夜精品视频天天综合网| 日韩欧美一区二区视频| 国产一本一道久久香蕉| 国产精品免费久久| 色诱视频网站一区| 爽爽淫人综合网网站| 精品剧情v国产在线观看在线| 国产精品一二一区| 亚洲男人天堂av| 555夜色666亚洲国产免| 免费成人av在线播放| 日韩视频永久免费| 成人丝袜高跟foot| 亚洲国产日韩a在线播放性色| 日韩三级免费观看| 成人国产一区二区三区精品| 亚洲成人资源在线| 精品精品国产高清a毛片牛牛 | 国产精品毛片无遮挡高清| a级高清视频欧美日韩| 亚洲电影一区二区| 久久精品亚洲国产奇米99| 99re热视频精品| 毛片av一区二区| 亚洲欧美日韩综合aⅴ视频| 777奇米成人网| 成人永久看片免费视频天堂| 亚洲gay无套男同| 国产日韩欧美电影| 在线成人小视频| 国产东北露脸精品视频| 爽好久久久欧美精品| 国产精品久久久久久久久图文区| 欧美在线观看视频一区二区| 蜜芽一区二区三区| 国产精品久久国产精麻豆99网站| 欧美一区二区三区免费大片| 国产99久久精品| 美美哒免费高清在线观看视频一区二区 | 狠狠v欧美v日韩v亚洲ⅴ| 欧美国产1区2区| 欧美精品久久天天躁| 一本色道a无线码一区v| 国产美女精品在线| 蜜桃传媒麻豆第一区在线观看| 亚洲欧美一区二区三区孕妇| 久久久久国产精品麻豆| 欧美电影免费观看高清完整版在线观看| 色就色 综合激情| 东方aⅴ免费观看久久av| 午夜影院久久久| 亚洲视频在线观看一区| 国产精品久久毛片av大全日韩| 亚洲精品一区二区三区在线观看 | 国产精品国产三级国产普通话99| 日韩免费电影网站| 制服丝袜激情欧洲亚洲| 欧美在线观看一区| 在线视频你懂得一区| www.成人在线| 福利一区二区在线| 成人午夜伦理影院| 久久99国产精品麻豆| 午夜不卡av在线| 亚洲激情欧美激情| 亚洲综合在线第一页| 亚洲视频香蕉人妖| 一区二区三区精品视频| 一区二区三区国产精华| 一区二区三区电影在线播| 亚洲精品国产一区二区精华液 | 成人午夜免费视频| 成人动漫视频在线| 不卡在线视频中文字幕| 99热国产精品| 色婷婷综合久久久| 欧美视频一区二区在线观看| 精品视频123区在线观看| 欧美午夜精品久久久久久孕妇| 日本韩国精品在线| 欧美日韩国产免费一区二区| 色婷婷综合视频在线观看| 国产精品一区免费视频| 国产精品一区二区在线播放| 99视频一区二区| 欧美亚日韩国产aⅴ精品中极品| 欧美日韩国产首页| 欧美大胆一级视频| 欧美经典一区二区三区| 中文字幕一区二区在线观看| 一区二区三区精密机械公司| 亚洲成av人片一区二区三区| 日韩成人精品视频| 奇米777欧美一区二区| 麻豆久久久久久| 国产精品一区二区黑丝| 欧美亚一区二区| 欧美tk丨vk视频| 国产精品成人网| 午夜伦理一区二区| 国产精品1024| 在线视频观看一区| 精品久久久影院| 亚洲日本一区二区| 日本亚洲天堂网| 不卡视频免费播放| 欧美日本高清视频在线观看| 欧美xxxxxxxx| 亚洲综合一区二区三区| 国产精品白丝jk白祙喷水网站| 色婷婷亚洲一区二区三区| 日韩欧美一区二区免费| 成人免费小视频| 麻豆一区二区99久久久久| 国产精品资源在线观看| 欧美综合欧美视频| 久久久久9999亚洲精品| 亚洲va欧美va人人爽| 成人av免费在线观看| 日韩一区二区免费在线电影| 亚洲欧洲一区二区在线播放| 蜜桃视频第一区免费观看| 99国产一区二区三精品乱码| 日韩一卡二卡三卡| 亚洲综合激情另类小说区| 日韩成人午夜精品| 粉嫩一区二区三区在线看| 99久久99久久综合| 91精品国产丝袜白色高跟鞋| 国产精品美日韩| 日本少妇一区二区| 欧美色视频一区| 欧美国产一区视频在线观看| 六月婷婷色综合| 欧美日韩久久不卡| 亚洲视频香蕉人妖| 成人美女视频在线观看| 精品国产91乱码一区二区三区| 亚洲一区二区av在线| 国产一区二区在线观看视频| 日韩一本二本av| 五月天精品一区二区三区| 91小宝寻花一区二区三区| 国产欧美综合在线观看第十页 | 69成人精品免费视频| 亚洲欧美电影院| 国产一二精品视频| 中文字幕欧美日韩一区| 国产专区欧美精品| 日韩一级片在线播放| 日韩福利视频网| 欧美日韩www| 亚洲国产aⅴ天堂久久| 在线观看av不卡| 亚洲乱码一区二区三区在线观看| 成人美女在线观看| 国产精品亲子伦对白| 成人动漫中文字幕| 久久久午夜精品理论片中文字幕| 久久精品999| 欧美sm极限捆绑bd| 国产毛片精品一区| 久久久国产午夜精品| 久久99精品一区二区三区三区| 91福利精品视频| 亚洲成在线观看| 日韩一级视频免费观看在线| 午夜成人在线视频| 欧美电影免费观看完整版| 蓝色福利精品导航| 久久蜜桃一区二区| 成人av电影免费在线播放|