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

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

?? hal_org.h

?? ZigBee協議棧2.0的程序
?? H
?? 第 1 頁 / 共 5 頁
字號:
         T##timer##CCTL##channel## |= 0x40;                   \
      } else {                                                \
         T##timer##CCTL##channel## &= ~0x40;                  \
      }                                                       \
   } while(0)



/******************************************************************************
*******************          Watch Dog Timer (WDT)          *******************
*******************************************************************************

The WDT may be used to prevent the unit from being trapped in a system
stalemate, i.e. an endless waiting state. The WDT must be reset before it times
out. If a timeout occurs, the system is reset.

The WDT can also be configured as a normal timer which generates interrupt at
each timeout. This must be configured manually.
******************************************************************************/

// Macro for setting the WDT timeout interval.
#define WDT_SET_TIMEOUT_PERIOD(timeout) \
   do {  WDCTL &= ~0x03; WDCTL |= timeout; } while (0)

// Where _timeout_ is one of
#define SEC_1          0x00     // after 1 second
#define M_SEC_250      0x01     // after 250 ms
#define M_SEC_15       0x02     // after 15 ms
#define M_SEC_2        0x03     // after 2 ms

// Macro for resetting the WDT. If this is not done before the WDT times out,
// the system is reset.
#define WDT_RESET() do {           \
   WDCTL = (WDCTL & ~0xF0) | 0xA0; \
   WDCTL = (WDCTL & ~0xF0) | 0x50; \
} while (0)

// Macro for turning on the WDT
#define WDT_ENABLE()   WDCTL |= 0x08
#define WDT_DISABLE()  WDCTL &= ~0x08




/******************************************************************************
*******************             ADC macros/functions        *******************
*******************************************************************************

These functions/macros simplifies usage of the ADC.

******************************************************************************/
// Macro for setting up a single conversion. If ADCCON1.STSEL = 11, using this
// macro will also start the conversion.
#define ADC_SINGLE_CONVERSION(settings) \
   do{ ADCCON3 = settings; }while(0)

// Macro for setting up a single conversion
#define ADC_SEQUENCE_SETUP(settings) \
   do{ ADCCON2 = settings; }while(0)

// Where _settings_ are the following:
// Reference voltage:
#define ADC_REF_1_25_V      0x00     // Internal 1.25V reference
#define ADC_REF_P0_7        0x40     // External reference on AIN7 pin
#define ADC_REF_AVDD        0x80     // AVDD_SOC pin
#define ADC_REF_P0_6_P0_7   0xC0     // External reference on AIN6-AIN7 differential input

// Resolution (decimation rate):
#define ADC_8_BIT           0x00     //  64 decimation rate
#define ADC_10_BIT          0x10     // 128 decimation rate
#define ADC_12_BIT          0x20     // 256 decimation rate
#define ADC_14_BIT          0x30     // 512 decimation rate
// Input channel:
#define ADC_AIN0            0x00     // single ended P0_0
#define ADC_AIN1            0x01     // single ended P0_1
#define ADC_AIN2            0x02     // single ended P0_2
#define ADC_AIN3            0x03     // single ended P0_3
#define ADC_AIN4            0x04     // single ended P0_4
#define ADC_AIN5            0x05     // single ended P0_5
#define ADC_AIN6            0x06     // single ended P0_6
#define ADC_AIN7            0x07     // single ended P0_7
#define ADC_GND             0x0C     // Ground
#define ADC_TEMP_SENS       0x0E     // on-chip temperature sensor
#define ADC_VDD_3           0x0F     // (vdd/3)


//-----------------------------------------------------------------------------
// Macro for starting the ADC in continuous conversion mode
#define ADC_SAMPLE_CONTINUOUS() \
   do { ADCCON1 &= ~0x30; ADCCON1 |= 0x10; } while (0)

// Macro for stopping the ADC in continuous mode (and setting the ADC to be
// started manually by ADC_SAMPLE_SINGLE() )
#define ADC_STOP() \
  do { ADCCON1 |= 0x30; } while (0)

// Macro for initiating a single sample in single-conversion mode (ADCCON1.STSEL = 11).
#define ADC_SAMPLE_SINGLE() \
  do { ADC_STOP(); ADCCON1 |= 0x40;  } while (0)

// Macro for configuring the ADC to be started from T1 channel 0. (T1 ch 0 must be in compare mode!!)
#define ADC_TRIGGER_FROM_TIMER1()  do { ADC_STOP(); ADCCON1 &= ~0x10;  } while (0)

// Expression indicating whether a conversion is finished or not.
#define ADC_SAMPLE_READY()  (ADCCON1 & 0x80)

// Macro for setting/clearing a channel as input of the ADC
#define ADC_ENABLE_CHANNEL(ch)   ADCCFG |=  (0x01<<ch)
#define ADC_DISABLE_CHANNEL(ch)  ADCCFG &= ~(0x01<<ch)



/******************************************************************************
* @fn  halAdcSampleSingle
*
* @brief
*      This function makes the adc sample the given channel at the given
*      resolution with the given reference.
*
* Parameters:
*
* @param BYTE reference
*          The reference to compare the channel to be sampled.
*        BYTE resolution
*          The resolution to use during the sample (8, 10, 12 or 14 bit)
*        BYTE input
*          The channel to be sampled.
*
* @return INT16
*          The conversion result
*
******************************************************************************/
INT16 halAdcSampleSingle(BYTE reference, BYTE resolution, UINT8 input);



/******************************************************************************
* @fn  halGetAdcValue
*
* @brief
*      Returns the result of the last ADC conversion.
*
* Parameters:
*
* @param  void
*
* @return INT16
*         The ADC value
*
******************************************************************************/
INT16 halGetAdcValue(void);




/******************************************************************************
*******************    RF communication functions/macros    *******************
*******************************************************************************
// The functions in this section are designed to simplify usage of the radio.
// A function for setup, transmitting and receiption are included. In addition,
// macros for writing instructions to the Command Stobe Processor are included.

******************************************************************************/

/******************************************************************************
* @fn  halRfSend
*
* @brief
*      This function sends the given number of bytes using the radio. The radio
*      frequency must be set before sending. Can send a maximum of 125 bytes.
*      The function waits until the transfer is complete.
*
* Parameters:
*
* @param  BYTE*	 pData
*         Pointer to the start of the data to be transferred.
* @param  BYTE	 length
*         The number of bytes to be transferred.
*
* @return BYTE
*         Returns the number of transferred bytes.
*
******************************************************************************/
BYTE halRfSendPacket(BYTE* pData, BYTE length);



/******************************************************************************
* @fn  halRfReceivePacket
*
* @brief
*      This function receives a maximum of 128 bytes sent by another radio
*      transmitter. The function will wait for _timeOut_ ms before returning
*      without receiving any data.
*
* Parameters:
*
* @param  BYTE*	 pData
*         Pointer to the received packet is to be stored.
* @param  BYTE pRssi
*         Pointer to where to store the received signal strength indicator calculation.
* @param  BYTE pLqi
*         Pointer to where to store the link quality indicator.
* @param  BYTE	 timeOut
*         The number of ms the chip will wait for a packet to be received.
*
* @return BYTE
*         Returns the number of received bytes.
*
******************************************************************************/
BYTE halRfReceivePacket(BYTE* pData, BYTE*pRssi, BYTE* pLqi, BYTE timeOut);

/******************************************************************************
* @fn  halRfConfig
*
* @brief
*      This function configures the radio for simple send and receive operation.
*      Advanced IEEE 802.15.4 functionality such as Address Decoding, AutoAck
*      etc is not employed. CRC value is automatically calculated to enable
*      detection of packet corruption. The desired frequency is set. The
*      function returns TRUE if the configuration is successful.
*
* Parameters:
*
* @param  UINT32 frequency
*         The desired Radio Frequency in kHz.
*
* @return BOOL
*         Returns TRUE if the configuration is successful and FALSE otherwise.
*
******************************************************************************/
BOOL halRfConfig(UINT32 frequency);

/******************************************************************************
* @fn  halRfSetRadioFrequency
*
* @brief
*      This function sets the radio frequency of the radio. The requency must
*      be within the range of the radio.
*
* Parameters:
*
* @param  WORD	 frequency
*         The desired Radio Frequency in kHz.
*
* @return void
*
******************************************************************************/
void halRfSetRadioFrequency(UINT32 frequency);

#define STOP_RADIO()        ISRFOFF;

// RF interrupt flags
#define IRQ_RREG_ON         0x80
#define IRQ_TXDONE          0x40
#define IRQ_FIFOP           0x20
#define IRQ_SFD             0x10
#define IRQ_CCA             0x08
#define IRQ_CSP_WT          0x04
#define IRQ_CSP_STOP        0x02
#define IRQ_CSP_INT         0x01

// RF status flags
#define TX_ACTIVE_FLAG      0x10
#define FIFO_FLAG           0x08
#define FIFOP_FLAG          0x04
#define SFD_FLAG            0x02
#define CCA_FLAG            0x01

// Radio status states
#define TX_ACTIVE   (RFSTATUS & TX_ACTIVE_FLAG)
#define FIFO        (RFSTATUS & FIFO_FLAG)
#define FIFOP       (RFSTATUS & FIFOP_FLAG)
#define SFD         (RFSTATUS & SFD_FLAG)
#define CCA         (RFSTATUS & CCA_FLAG)

// Various radio settings
#define PAN_COORDINATOR     0x10
#define ADR_DECODE          0x08
#define AUTO_CRC            0x20
#define AUTO_ACK            0x10
#define AUTO_TX2RX_OFF      0x08
#define RX2RX_TIME_OFF      0x04
#define ACCEPT_ACKPKT       0x01






//-----------------------------------------------------------------------------
// Command Strobe Processor (CSP) instructions
//-----------------------------------------------------------------------------
#define DECZ        do{RFST = 0xBF;                       }while(0)
#define DECY        do{RFST = 0xBE;                       }while(0)
#define INCY        do{RFST = 0xBD;                       }while(0)
#define INCMAXY(m)  do{RFST = (0xB8 | m);                 }while(0) // m < 8 !!
#define RANDXY      do{RFST = 0xBC;                       }while(0)
#define INT         do{RFST = 0xB9;                       }while(0)
#define WAITX       do{RFST = 0xBB;                       }while(0)
#define WAIT(w)     do{RFST = (0x80 | w);                 }while(0) // w < 64 !!
#define WEVENT      do{RFST = 0xB8;                       }while(0)
#define LABEL       do{RFST = 0xBA;                       }while(0)
#define RPT(n,c)    do{RFST = (0xA0 | (n << 3) | c);      }while(0) // n = TRUE/FALSE && (c < 8)
#define SKIP(s,n,c) do{RFST = ((s << 4) | (n << 3) | c);  }while(0) // && (s < 8)
#define STOP        do{RFST = 0xDF;                       }while(0)
#define SNOP        do{RFST = 0xC0;                       }while(0)
#define STXCALN     do{RFST = 0xC1;                       }while(0)
#define SRXON       do{RFST = 0xC2;                       }while(0)
#define STXON       do{RFST = 0xC3;                       }while(0)
#define STXONCCA    do{RFST = 0xC4;                       }while(0)
#define SRFOFF      do{RFST = 0xC5;                       }while(0)
#define SFLUSHRX    do{RFST = 0xC6;                       }while(0)
#define SFLUSHTX    do{RFST = 0xC7;                       }while(0)
#define SACK        do{RFST = 0xC8;                       }while(0)
#define SACKPEND    do{RFST = 0xC9;                       }while(0)
#define ISSTOP      do{RFST = 0xFF;                       }while(0)
#define ISSTART     do{RFST = 0xFE;                       }while(0)
#define ISTXCALN    do{RFST = 0xE1;                       }while(0)
#define ISRXON      do{RFST = 0xE2;                       }while(0)
#define ISTXON      do{RFST

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本一区二区三级电影在线观看 | 乱中年女人伦av一区二区| 99久久国产综合精品女不卡| 欧美韩日一区二区三区四区| 91色|porny| 日韩成人精品视频| 7777精品伊人久久久大香线蕉完整版 | 久久综合久久鬼色中文字| 精品一区二区三区久久久| 国产嫩草影院久久久久| 国产色爱av资源综合区| 欧美三级视频在线| 另类综合日韩欧美亚洲| 日日夜夜一区二区| 国产精品国产三级国产三级人妇| 色999日韩国产欧美一区二区| 日韩国产高清在线| 久久国产精品99精品国产 | 亚洲精品日日夜夜| 日韩欧美美女一区二区三区| 成人深夜在线观看| 日韩国产欧美三级| 国产美女一区二区| 亚洲国产精品精华液网站| 国产亚洲自拍一区| 国产精品区一区二区三区| 日韩精品一区二区三区在线观看| 国产亚洲综合在线| 一区二区免费在线播放| 国产精品日韩精品欧美在线 | 欧美日韩精品一区二区在线播放 | 亚洲电影第三页| 亚洲色图.com| 国产拍欧美日韩视频二区| 亚洲欧美日韩国产一区二区三区| 久久日一线二线三线suv| 成人激情图片网| 精品无人码麻豆乱码1区2区 | 91精品国产综合久久久久久久 | 国产精品伦一区二区三级视频| 亚洲综合在线第一页| 亚洲色图视频网| 久久国内精品视频| 欧美亚洲尤物久久| 欧美色大人视频| 国产日韩欧美精品在线| 日韩精品福利网| 东方aⅴ免费观看久久av| 国内精品久久久久影院薰衣草| 日韩精品久久久久久| 暴力调教一区二区三区| 99国内精品久久| xnxx国产精品| 日韩电影免费在线观看网站| 色网站国产精品| 91精品婷婷国产综合久久性色| 中文字幕一区二区三区在线观看| 亚洲精品写真福利| 成人国产在线观看| 久久久九九九九| 国产一区二区三区免费在线观看 | 欧美成人三级在线| 久久久久久综合| 喷白浆一区二区| 波多野结衣一区二区三区| 精品欧美一区二区久久| 卡一卡二国产精品| 日韩视频一区二区| 国产嫩草影院久久久久| 国产在线日韩欧美| 日韩欧美精品在线视频| 视频一区欧美日韩| 制服丝袜av成人在线看| 日精品一区二区三区| 欧美色偷偷大香| 婷婷综合五月天| 国产一区二区三区| 精品国产乱码久久久久久夜甘婷婷 | 欧美v国产在线一区二区三区| 亚洲成人一区二区| 91.com在线观看| 日本不卡在线视频| 精品国产乱码久久| 大尺度一区二区| 亚洲乱码国产乱码精品精98午夜 | 五月开心婷婷久久| 欧美人动与zoxxxx乱| 日韩精品视频网站| 欧美精品一区二区蜜臀亚洲| 久久99精品视频| 国产丝袜欧美中文另类| 成人h动漫精品一区二区| 亚洲精品乱码久久久久久日本蜜臀| 色婷婷久久99综合精品jk白丝 | 日韩精品一区二区三区视频| 久色婷婷小香蕉久久| 国产日韩欧美精品在线| 91福利国产精品| 美国av一区二区| 日本丰满少妇一区二区三区| 午夜视频在线观看一区| 日韩精品一区二区三区在线播放| 国产一区二区h| 亚洲美女视频一区| 日韩一区二区三区视频在线观看| 国产一本一道久久香蕉| 亚洲女人****多毛耸耸8| 欧美放荡的少妇| 亚洲一区二区精品3399| 日韩西西人体444www| 99精品黄色片免费大全| 六月丁香婷婷色狠狠久久| 日韩理论片一区二区| 精品区一区二区| 欧美中文字幕一区二区三区| 亚洲精品欧美综合四区| 欧美大度的电影原声| 色狠狠色狠狠综合| 国产又粗又猛又爽又黄91精品| 一区二区三区在线免费| 久久亚洲一级片| 欧美久久一二区| 99精品视频在线免费观看| 久久99这里只有精品| 亚洲国产精品久久人人爱| 国产精品短视频| 欧美精品一区二区三区高清aⅴ| 欧美亚洲国产一区二区三区va| 国产成人av一区| 国产精品久久免费看| 欧美videos中文字幕| 欧美午夜片在线看| 成人精品免费网站| 精品一区二区三区在线播放 | 日韩欧美激情在线| 欧美日韩一区二区在线观看| 99riav久久精品riav| 国产999精品久久久久久| 精品一区二区三区在线观看| 日韩激情视频网站| 天堂在线一区二区| 亚洲国产日产av| 夜夜亚洲天天久久| 亚洲欧美电影一区二区| 国产精品久久久久aaaa樱花 | 欧美在线一区二区三区| 成人av集中营| 成人精品国产免费网站| 国产成人高清视频| 成人免费看黄yyy456| 国产传媒日韩欧美成人| 国产成人在线网站| 国产**成人网毛片九色| 成人av资源下载| 成人伦理片在线| 一本色道久久综合亚洲91| 色婷婷国产精品综合在线观看| 91在线精品一区二区| 色婷婷国产精品| 欧美色精品天天在线观看视频| 欧美日韩www| 欧美一区二区精品久久911| 懂色av中文字幕一区二区三区| 国产成人精品www牛牛影视| www.亚洲人| 欧美性淫爽ww久久久久无| 欧美日韩成人高清| 精品卡一卡二卡三卡四在线| 久久久影视传媒| 亚洲欧洲成人自拍| 亚洲电影第三页| 久久电影国产免费久久电影| 国产精品亚洲人在线观看| 视频一区二区国产| 蜜臀av在线播放一区二区三区| 韩国一区二区三区| 色系网站成人免费| 91麻豆精品国产综合久久久久久| 91精品国产全国免费观看| 欧美国产1区2区| 亚洲一区二区三区四区的| 九九九久久久精品| 91在线高清观看| 日韩一级在线观看| 国产精品成人一区二区艾草 | 久久久99久久精品欧美| 亚洲欧美激情视频在线观看一区二区三区 | 久久精品日韩一区二区三区| 亚洲免费在线看| 精品一区二区三区免费视频| 91在线精品一区二区| 精品免费视频一区二区| 亚洲日本一区二区| 精品一区二区三区在线观看国产| 99精品国产99久久久久久白柏 | 日韩理论在线观看| 极品少妇xxxx精品少妇| 欧洲av一区二区嗯嗯嗯啊| 国产色爱av资源综合区| 五月激情综合婷婷|