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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? hal.h

?? 無線單片機CC1110的一些使用源代碼
?? H
?? 第 1 頁 / 共 5 頁
字號:
} 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 ADR_DECODE          0x08
#define AUTO_CRC            0x20
#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 = 0xE3;                       }while(0)
#define ISTXONCCA   do{RFST = 0xE4;                       }while(0)
#define ISRFOFF     do{RFST = 0xE5;                       }while(0)
#define ISFLUSHRX   do{RFST = 0xE6;                       }while(0)
#define ISFLUSHTX   do{RFST = 0xE7;                       }while(0)
#define ISACK       do{RFST = 0xE8;                       }while(0)
#define ISACKPEND   do{RFST = 0xE9;                       }while(0)


// Conditions _c_ for the RPT and SKIP instructions of the CSP
#define CCA_TRUE            0x00;
#define RECEIVING           0x01;
#define MCU_BIT_IS_1        0x02;
#define COMMAND_BUF_EMPT    0x03;
#define REGX_IS_0           0x04;
#define REGY_IS_0           0x05;
#define REGZ_IS_0           0x06;
#define NO_OP               0x07;




/******************************************************************************
******************* Memory space mapping macros/functions  ********************
*******************************************************************************/

// Macros for enabling or disabling unified code space.
// Unified code space is generally used when executing programs from RAM.
#define ENABLE_UINIFIED_CODE_SPACE()  do { MEMCTR |= 0x40;  } while (0)
#define DISABLE_UINIFIED_CODE_SPACE()  do { MEMCTR &= ~0x40;  } while (0)


/******************************************************************************
*******************   AES encryption / decryption functions *******************
*******************************************************************************

Functions for performing a encryption or decryption using the Advanced
Encryption Standard. A unique 16 byte key must be loaded prior to the
encryption or decryption process.

This function pe

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆成人在线观看| 日韩欧美专区在线| 国产精品久久久久久福利一牛影视| 麻豆国产91在线播放| 91精品国产免费| 日本亚洲欧美天堂免费| 精品入口麻豆88视频| 韩日av一区二区| 中文字幕+乱码+中文字幕一区| 成人免费视频免费观看| 国产精品美女久久福利网站| 92国产精品观看| 亚洲国产欧美一区二区三区丁香婷| 欧美色综合网站| 久久精品国产免费看久久精品| 337p日本欧洲亚洲大胆精品| 国产黄人亚洲片| 亚洲精品国产无天堂网2021| 欧美日韩免费一区二区三区视频| 蜜臀久久久久久久| 欧美高清在线一区二区| 91在线视频播放| 免费在线观看日韩欧美| 久久久久久久久久看片| 97超碰欧美中文字幕| 日本亚洲天堂网| 中文字幕制服丝袜一区二区三区 | 久久丝袜美腿综合| 成人开心网精品视频| 亚洲国产视频在线| 国产香蕉久久精品综合网| 色婷婷激情综合| 国产激情视频一区二区在线观看| 亚洲最新视频在线播放| 久久人人97超碰com| 色婷婷激情久久| 国产精品18久久久久久久网站| 亚洲精品国产无天堂网2021| 久久亚洲一区二区三区明星换脸| 91一区二区三区在线播放| 麻豆精品久久久| 亚洲一区二区三区免费视频| 日韩免费高清av| 在线观看亚洲专区| 国产乱人伦偷精品视频不卡| 亚洲成av人在线观看| 国产精品私房写真福利视频| 欧美精选午夜久久久乱码6080| bt欧美亚洲午夜电影天堂| 蜜桃av一区二区三区电影| 亚洲欧美另类图片小说| 久久久久高清精品| 欧美一区二区在线观看| 色吧成人激情小说| 成人国产免费视频| 国产一区二三区| 毛片不卡一区二区| 午夜国产精品影院在线观看| 中文欧美字幕免费| 久久精品人人做人人综合| 91精品国产入口| 在线成人高清不卡| 欧美精品电影在线播放| 91国偷自产一区二区三区观看| 成人永久aaa| 国产成人综合精品三级| 国内不卡的二区三区中文字幕| 视频在线观看国产精品| 亚洲小说春色综合另类电影| 国产精品久久午夜夜伦鲁鲁| 2022国产精品视频| 久久嫩草精品久久久精品一| 欧美一区在线视频| 日韩一区和二区| 日韩一区二区不卡| 日韩女优制服丝袜电影| 欧美久久久一区| 这里只有精品99re| 日韩一级大片在线观看| 欧美一区二区视频观看视频| 欧美日韩国产成人在线免费| 欧美日韩在线一区二区| 欧美日韩亚洲高清一区二区| 精品婷婷伊人一区三区三| 欧美日韩日日摸| 欧美大片在线观看一区| 欧美精品一区二区蜜臀亚洲| 欧美xxxxx牲另类人与| 欧美tickling挠脚心丨vk| 精品乱人伦一区二区三区| 日韩精品一区二区三区视频| 2017欧美狠狠色| 国产精品国产三级国产专播品爱网| 国产精品美女久久久久久久| 亚洲欧美另类小说视频| 亚洲成在人线免费| 精品一区二区三区av| 国产乱子轮精品视频| 成人免费看黄yyy456| 色综合久久久久久久| 欧美日韩精品一区二区三区| 日韩欧美一级二级三级久久久| 久久久久久久一区| 亚洲精品免费看| 青青草原综合久久大伊人精品 | 亚洲男女毛片无遮挡| 亚洲一区精品在线| 久久66热偷产精品| 成人av在线资源| 欧美日韩一区二区电影| 日韩欧美高清dvd碟片| 欧美激情综合在线| 亚洲电影视频在线| 国产一区二区91| 91久久人澡人人添人人爽欧美| 日韩亚洲电影在线| 国产精品久久久久久亚洲毛片| 亚洲一二三专区| 国产精品18久久久久久vr| 欧美亚洲高清一区| 国产亚洲综合av| 亚洲va在线va天堂| 成人激情校园春色| 欧美一区欧美二区| ...xxx性欧美| 极品尤物av久久免费看| 色婷婷av一区二区三区大白胸| wwww国产精品欧美| 午夜欧美一区二区三区在线播放| 国产成人av一区| 欧美日本一区二区三区四区| 国产午夜精品福利| 日本怡春院一区二区| 色婷婷综合激情| 国产欧美日韩在线看| 天堂成人免费av电影一区| a美女胸又www黄视频久久| 91精品视频网| 亚洲午夜激情网站| 99久久婷婷国产| www激情久久| 男女男精品视频网| 337p亚洲精品色噜噜| 亚洲人成精品久久久久久| 国产一区二区三区在线观看精品| 欧美日韩成人激情| 亚洲欧美电影院| caoporn国产精品| 国产精品水嫩水嫩| 美女一区二区三区| 91精品国产入口| 午夜激情一区二区| 欧美日韩亚洲国产综合| 亚洲欧美欧美一区二区三区| 成人动漫视频在线| 亚洲国产精品成人综合 | 欧美老肥妇做.爰bbww| 亚洲欧美另类图片小说| 97超碰欧美中文字幕| 中文天堂在线一区| 成人免费视频免费观看| 欧美激情综合在线| 成人av影院在线| 中文字幕精品一区二区精品绿巨人| 久久精品72免费观看| 欧美一二三区精品| 久久精品国内一区二区三区| 欧美一区欧美二区| 极品瑜伽女神91| 国产午夜亚洲精品午夜鲁丝片| 国产麻豆视频一区| 国产片一区二区三区| 国产iv一区二区三区| 日本一区二区三区久久久久久久久不| 国产伦精品一区二区三区免费| 久久久久高清精品| 成人午夜免费av| 亚洲日穴在线视频| 在线精品国精品国产尤物884a| 亚洲午夜一二三区视频| 欧美理论片在线| 日本vs亚洲vs韩国一区三区二区| 91精品国产91久久久久久最新毛片| 麻豆极品一区二区三区| 337p日本欧洲亚洲大胆色噜噜| 风间由美一区二区av101| 国产精品日韩精品欧美在线| 成人app网站| 亚洲成人动漫在线免费观看| 欧美视频一区二区三区四区| 日日摸夜夜添夜夜添精品视频| 日韩视频不卡中文| 国产成人亚洲综合a∨猫咪| 欧美国产精品劲爆| 欧美在线不卡一区| 久久99国产精品尤物| 国产精品女主播在线观看| 色婷婷综合久久久中文字幕| 日韩福利电影在线| 欧美激情中文字幕|