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

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

?? halsrf04.h

?? CC1100_CC2500_Examples_Libraries_1_31
?? H
?? 第 1 頁 / 共 3 頁
字號:
//-------------------------------------------------------------------------------------------------------
void halSpiWriteBurstReg(BYTE addr, BYTE *buffer, BYTE count);




//-------------------------------------------------------------------------------------------------------
//  void halSpiReadBurstReg(BYTE addr, BYTE *buffer, BYTE count)
//
//  DESCRIPTION:
//      This function reads multiple CCxxx0 register, using SPI burst access.
//
//  ARGUMENTS:
//      BYTE addr
//          Address of the first CCxxx0 register to be accessed.
//      BYTE *buffer
//          Pointer to a byte array which stores the values read from a
//          corresponding range of CCxxx0 registers.
//      BYTE count
//          Number of bytes to be read from the subsequent CCxxx0 registers.
//-------------------------------------------------------------------------------------------------------
void halSpiReadBurstReg(BYTE addr, BYTE *buffer, BYTE count);




//-------------------------------------------------------------------------------------------------------
// Macro to reset the CCxxx0 and wait for it to be ready
#define RESET_CCxxx0() \
    do { \
        NSSMD0 = 0; \
        while (P0_1); \
        SPI0DAT = CCxxx0_SRES; \
        SPI_WAIT(); \
        while (P0_1); \
        NSSMD0 = 1; \
    } while (0)
//-------------------------------------------------------------------------------------------------------




//-------------------------------------------------------------------------------------------------------
// Macro to reset the CCxxx0 after power_on and wait for it to be ready
// IMPORTANT NOTICE:
// The file Wait.c must be included if this macro shall be used
// The file is located under: ..\Lib\Chipcon\Hal\CCxx00
//
//                 min 40 us
//                 <------------------>
// CSn      |--|  |--------------------|            |-----
//          |  |  |                    |            |
//              --                      ------------
//
// MISO                                     |----|
//          -----------------------------|  |    |
//                                        --      ---------
//               Unknown / don't care
//                                       SRES     done
//
#define POWER_UP_RESET_CCxxx0() \
    do { \
        NSSMD0 = 1; \
        halWait(1); \
        NSSMD0 = 0; \
        halWait(1); \
        NSSMD0 = 1; \
        halWait(41); \
        RESET_CCxxx0(); \
    } while (0)
//-------------------------------------------------------------------------------------------------------





/*******************************************************************************************************
 *******************************************************************************************************
 **************************              Timer macros/functions             ****************************
 *******************************************************************************************************
 *******************************************************************************************************/
//-------------------------------------------------------------------------------------------------------
// This section contains macros and functions for setting up the 4 different timers available
//      TIMER0_RUN(x)
//      TIMER1_RUN(x)
//      TIMER2_RUN(x)
//      TIMER3_RUN(x)
//      SET_RELOAD_VALUE_TIMER0(period_us, clock_kHz)
//      SET_RELOAD_VALUE_TIMER1(period_us, clock_kHz)
//      SET_RELOAD_VALUE_TIMER2_8BIT(periodH_us, periodL_us, clock_kHzH, clock_kHzL)
//      SET_RELOAD_VALUE_TIMER3_8BIT(periodH_us, periodL_us, clock_kHzH, clock_kHzL)
//      SET_RELOAD_VALUE_TIMER2_16BIT(period_us, clock_kHz)
//      SET_RELOAD_VALUE_TIMER3_16BIT(period_us, clock_kHz)
//      void halSetupTimer01(UINt8 timer01, UINT8 clkSource, UINT8 mode, BOOL timerInt)
//      void halSetupTimer23(UINT8 timer23, UINT8 clkSourceH, UINT8 clkSourceL, UINT8 mode, BOOL timerInt)
//-------------------------------------------------------------------------------------------------------




//-------------------------------------------------------------------------------------------------------
// Defines used for variable _clkSource_, _clkSourceL_, and _clkSourceH_
#define SYSCLK_DIV_12   0
#define SYSCLK_DIV_4    1
#define SYSCLK_DIV_48   2
#define EXTCLK_DIV_8    3
#define SYSCLK_DIV_1    4

// Define used for variable _timer01_ 
#define TIMER_0     0
#define TIMER_1     1

// Define used for variable _timer23_ 
#define TIMER_2     2
#define TIMER_3     3

// Defines used for variable _mode_
#define MODE_0      0       // Timer0, timer1, timer2, and timer3
#define MODE_1      1       // Timer0, timer1, timer2, and timer3
#define MODE_2      2       // Timer0 and timer1
//-------------------------------------------------------------------------------------------------------




//-------------------------------------------------------------------------------------------------------
// Macro for stopping and starting the timers.
#define TIMER0_RUN(x)    (TR0 = !!(x))
#define TIMER1_RUN(x)    (TR1 = !!(x))
#define TIMER2_RUN(x)    (TR2 = !!(x))
#define TIMER3_RUN(x)    (x ? (TMR3CN |= BM_TR3) : (TMR3CN &= (~BM_TR3)))
//-------------------------------------------------------------------------------------------------------




//-------------------------------------------------------------------------------------------------------
//  SET_RELOAD_VALUE_TIMERx(period_us, clock_kHz)
//
//  DESCRIPTION:
//      Macros used to calculate the reload value and update the reload registers.
//      x = 0 or 1
//
//      Below is a table showing what periods are possible for the different clock sources
//
//      Clock Source:   |   Freq:   |   Min. period |   Max period
//      ----------------------------------------------------------
//      SYSCLK_DIV_1    |   24 MHz  |   41.7 ns     |   10.6 us      
//      SYSCLK_DIV_4    |   6 MHz   |   166.7 ns    |   42.6 us
//      SYSCLK_DIV_12   |   2 MHz   |   500 ns      |   128 us
//      SYSCLK_DIV_48   |   0.5 MHz |   2 us        |   512 us
//      ----------------------------------------------------------
//
//      Example of usage:
//
//      SET_RELOAD_VALUE_TIMER0(0.0417, 24000);
//  
//      halSetupTimer01(TIMER_0, SYSCLK_DIV_1, MODE_2, INT_ON);
//
//      IMPORTANT NOTICE:
//      Constants should be used as arguments when using the SET_RELOAD_VALUE_TIMERx macro in order
//      to reduce code size.
//      
//  ARGUMENTS:
//      period_us
//          The period between interrupts. The period must be given in us.
//
//      clock_kHz
//          The frequency of the clock source (in kHz)
//-------------------------------------------------------------------------------------------------------
// This macro is only for internal use in this library file
#define SET_RELOAD_VALUE_TIMER01(timer01, period_us, clock_kHz) \
    do { \
        UINT8 count; \
        count = (UINT8)(((float)period_us * (float)clock_kHz) / 1000); \
        TH##timer01 = 256 - count; \
        TL##timer01 = TH##timer01; \
    } while (0)
//-------------------------------------------------------------------------------------------------------
// These macros are available for the user
#define SET_RELOAD_VALUE_TIMER0(period_us, clock_kHz)  SET_RELOAD_VALUE_TIMER01(0, period_us, clock_kHz)
#define SET_RELOAD_VALUE_TIMER1(period_us, clock_kHz)  SET_RELOAD_VALUE_TIMER01(1, period_us, clock_kHz)
//-------------------------------------------------------------------------------------------------------




//-------------------------------------------------------------------------------------------------------
//  SET_RELOAD_VALUE_TIMERx_8BIT(periodH_us, periodL_us, clock_kHzH, clock_kHzL)
//
//  DESCRIPTION:
//      Macros used to calculate the reload value and update the reload registers.
//      x = 2 or 3
//
//      Below is a table showing what periods are possible for the different clock sources
//
//      Clock Source:   |   Freq:   |   Min. period |   Max period
//      ----------------------------------------------------------
//      SYSCLK_DIV_1    |   24 MHz  |   41.7 ns     |   10.6 us      
//      SYSCLK_DIV_12   |   2 MHz   |   500 ns      |   128 us
//      ----------------------------------------------------------
//
//      Example of usage:
//
//      SET_RELOAD_VALUE_TIMER2_8BIT(3, 60, 24000, 2000);
//  
//      halSetupTimer23(TIMER_2, SYSCLK_DIV_1, SYSCLK_DIV_12, MODE_1, INT_ON);
//
//      IMPORTANT NOTICE:
//      Constants should be used as arguments when using the SET_RELOAD_VALUE_TIMERx_8BIT macro in order
//      to reduce code size.
//      
//  ARGUMENTS:
//      periodH_us
//          The period between interrupts (high byte overflow). The period must be given in us.
//
//      periodL_us
//          The period between interrupts (low byte overflow). The period must be given in us.
//
//      clock_kHzH
//          The frequency of the clock source for timer TMRxH (in kHz)
//
//      clock_kHzL
//          The frequency of the clock source for timer TMRxL (in kHz)
//-------------------------------------------------------------------------------------------------------
// This macro is only for internal use in this library file
#define SET_RELOAD_VALUE_TIMER23_8BIT(timer23, periodH_us, periodL_us, clock_kHzH, clock_kHzL) \
    do { \
        UINT8 countH; \
        UINT8 countL; \
        countH = (UINT8)(((float)periodH_us * (float)clock_kHzH) / 1000); \
        countL = (UINT8)(((float)periodL_us * (float)clock_kHzL) / 1000); \          
        TMR##timer23##RLH = 256 - countH; \
        TMR##timer23##H = TMR##timer23##RLH; \
        TMR##timer23##RLL = 256 - countL; \
        TMR##timer23##L = TMR##timer23##RLL; \
    } while (0)
//-------------------------------------------------------------------------------------------------------
// These macros are available for the user
#define SET_RELOAD_VALUE_TIMER2_8BIT(periodH_us, periodL_us, clock_kHzH, clock_kHzL) \
    do { \
        SET_RELOAD_VALUE_TIMER23_8BIT(2, periodH_us, periodL_us, clock_kHzH, clock_kHzL); \
    } while (0)

#define SET_RELOAD_VALUE_TIMER3_8BIT(periodH_us, periodL_us, clock_kHzH, clock_kHzL) \
    do { \
        SET_RELOAD_VALUE_TIMER23_8BIT(3, periodH_us, periodL_us, clock_kHzH, clock_kHzL); \
    } while (0)
//-------------------------------------------------------------------------------------------------------




//-------------------------------------------------------------------------------------------------------
//  SET_RELOAD_VALUE_TIMERx_16BIT(period_us, clock_kHz)
//
//  DESCRIPTION:
//      Macros used to calculate the reload value and update the reload registers.
//      x = 2 or 3
//
//      Below is a table showing what periods are possible for the different clock sources
//
//      Clock Source:   |   Freq:   |   Min. period |   Max period
//      ----------------------------------------------------------
//      SYSCLK_DIV_1    |   24 MHz  |   41.7 ns     |   2.73 ms      
//      SYSCLK_DIV_12   |   2 MHz   |   500 ns      |   32.75 ms
//      ----------------------------------------------------------
//
//      Example of usage:
//
//      SET_RELOAD_VALUE_TIMER2_16BIT(100, 24000);
//  
//      halSetupTimer23(TIMER_2, NULL, SYSCLK_DIV_1, MODE_0, INT_ON);
//
//      IMPORTANT NOTICE:
//      Constants should be used as arguments when using the SET_RELOAD_VALUE_TIMERx_16BIT macro in order
//      to reduce code size.
//      
//  ARGUMENTS:
//      period_us
//          The period between interrupts. The period must be given in us.
//
//      clock_kHzH
//          The frequency of the clock source (in kHz)
//-------------------------------------------------------------------------------------------------------
// This macro is only for internal use in this library file
#define SET_RELOAD_VALUE_TIMER23_16BIT(timer23, period_us, clock_kHz) \
    do { \
        UINT16 count; \
        UINT16 reloadValue; \
        count = (UINT16)(((float)period_us * (float)clock_kHz) / 1000); \
        reloadValue = (UINT16)(65536 - count); \
        TMR##timer23##RLL = reloadValue; \
        TMR##timer23##RLH = reloadValue >> 8; \
        TMR##timer23##L = TMR##timer23##RLL; \
        TMR##timer23##H = TMR##timer23##RLH; \
    } while (0)
//-------------------------------------------------------------------------------------------------------
// These macros are available for the user
#define SET_RELOAD_VALUE_TIMER2_16BIT(period_us, clock_kHz) \
    do { \
        SET_RELOAD_VALUE_TIMER23_16BIT(2, period_us, clock_kHz); \
    } while (0)

#define SET_RELOAD_VALUE_TIMER3_16BIT(period_us, clock_kHz) \
    do { \
        SET_RELOAD_VALUE_TIMER23_16BIT(3, period_us, clock_kHz); \
    } while (0)
//-------------------------------------------------------------------------------------------------------




//-------------------------------------------------------------------------------------------------------
#define INTERRUPT       TRUE
#define NO_INTERRUPT    FALSE
//-------------------------------------------------------------------------------------------------------




//-------------------------------------------------------------------------------------------------------
// void halSetupTimer01(UINT8 timer01, UINT8 clkSource, UINT8 mode, BOOL timerInt)
//
//  DESCRIPTION:
//      Function used to set up timer 0 or timer 1. Be aware that Timer 0 and Timer 1 share the same
//      prescaler. The function enables the given timer. Allowing the timer to be controlled by the 
//      external input signal can be done manually by setting GATE0 or GATE1 to 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产乱码字幕精品高清av| 亚洲人快播电影网| 免费成人结看片| 日韩丝袜美女视频| 日韩在线一区二区三区| 欧美色爱综合网| 麻豆精品国产91久久久久久| 日韩一区二区三区电影在线观看| 亚洲免费电影在线| 99久久综合狠狠综合久久| 中日韩免费视频中文字幕| 91在线观看高清| 亚洲美女视频一区| 欧美影片第一页| 精品在线观看免费| 《视频一区视频二区| 91成人在线免费观看| 天天综合网天天综合色 | 奇米777欧美一区二区| 中文字幕第一区第二区| 成人午夜电影网站| 一区二区中文字幕在线| 国产一区二区三区视频在线播放| 国产精品看片你懂得| 色婷婷狠狠综合| 亚洲国产欧美日韩另类综合| 精品黑人一区二区三区久久| 国产91精品一区二区麻豆亚洲| 欧美日韩国产综合草草| 韩国精品免费视频| 最新日韩在线视频| 欧美一区二区三区视频免费| 国产一区二区三区久久久| 国产精品丝袜黑色高跟| 51久久夜色精品国产麻豆| 国产麻豆精品在线| 一区二区在线观看视频在线观看| 精品久久久久一区二区国产| 国产东北露脸精品视频| 亚洲一区二区三区在线| 久久久精品欧美丰满| 91浏览器打开| 奇米色一区二区三区四区| 亚洲欧洲日产国产综合网| 欧美精品免费视频| 韩国av一区二区三区| 亚洲一区二区三区中文字幕| 精品国免费一区二区三区| 国产99久久久精品| 蜜臀99久久精品久久久久久软件| 国产精品嫩草影院av蜜臀| 成人性生交大片免费看在线播放| 五月天亚洲精品| 国产精品日韩精品欧美在线| 99久久精品99国产精品| 狠狠色丁香久久婷婷综合_中| 亚洲人成伊人成综合网小说| 色婷婷综合久色| 成人午夜视频福利| 免费在线成人网| 亚洲成av人影院在线观看网| 国产清纯在线一区二区www| 欧美日韩中文字幕精品| 一本大道综合伊人精品热热| 韩国视频一区二区| 日韩和欧美一区二区| 亚洲一线二线三线久久久| 欧美国产综合一区二区| 这里只有精品视频在线观看| 欧美伊人久久久久久久久影院 | 制服视频三区第一页精品| 不卡影院免费观看| 精品一区二区三区在线观看| 日韩福利电影在线观看| 亚洲男人电影天堂| 久久久www成人免费毛片麻豆| 欧美变态tickle挠乳网站| 欧美在线观看一二区| 国产乱码精品一品二品| 久久国产精品露脸对白| 午夜久久电影网| 国产精品久久三| 亚洲视频在线一区二区| 国产日产欧美一区| 91精品国产一区二区人妖| 欧美自拍偷拍一区| 色综合激情五月| 成人污视频在线观看| 国产一区在线观看麻豆| 精品一区二区三区影院在线午夜| 韩国精品主播一区二区在线观看 | 欧洲av一区二区嗯嗯嗯啊| 一本久久a久久免费精品不卡| 福利一区二区在线| 国产成人免费视频精品含羞草妖精| 韩国v欧美v日本v亚洲v| 久久国产精品72免费观看| 男人的天堂久久精品| 美国十次综合导航| 国产99久久久精品| 成人app在线观看| 本田岬高潮一区二区三区| 欧美中文字幕久久| 欧美日韩国产美女| 欧美一区二区网站| 久久久久久电影| 中文字幕av资源一区| 亚洲乱码中文字幕| 性做久久久久久免费观看| 日本不卡中文字幕| 国产福利精品导航| 91热门视频在线观看| 欧美日韩一区中文字幕| 99久久综合国产精品| 欧美日韩综合在线| 精品99久久久久久| 亚洲精品伦理在线| 韩国av一区二区| 国产福利一区二区| 色偷偷成人一区二区三区91| 一本色道久久综合狠狠躁的推荐 | 欧美理论片在线| 国产午夜一区二区三区| 综合中文字幕亚洲| 一区二区视频在线| 国产在线一区二区| 91麻豆免费看片| 欧美午夜精品免费| 久久亚洲精华国产精华液| 亚洲人吸女人奶水| 国产成人免费9x9x人网站视频| 97se亚洲国产综合自在线观| 欧美区在线观看| 亚洲欧美日韩一区| 秋霞电影网一区二区| 国产精品综合一区二区三区| 欧美精品久久久久久久多人混战| 亚洲精品一区二区三区香蕉| 国产欧美一区视频| 亚洲成av人影院| 色综合咪咪久久| 国产丝袜美腿一区二区三区| 美女诱惑一区二区| 欧美色图第一页| 国产人成亚洲第一网站在线播放| 日韩av不卡一区二区| 91麻豆免费观看| 久久久精品影视| 精品一区二区三区在线视频| 在线亚洲欧美专区二区| 国产精品久久三| 韩日av一区二区| 欧美日韩免费高清一区色橹橹 | 亚洲女同一区二区| 久久99久久精品| 欧美精三区欧美精三区| 亚洲欧美影音先锋| 国产在线日韩欧美| 91精品国产一区二区三区| 精品国产污污免费网站入口 | 日韩一区二区在线播放| 一区二区三区中文字幕| 成人国产一区二区三区精品| 久久精品欧美一区二区三区不卡 | 激情六月婷婷综合| 在线不卡的av| 亚洲欧美一区二区三区极速播放| 成人小视频免费观看| 精品国产成人系列| 午夜激情久久久| 欧美日韩激情在线| 亚洲综合成人在线视频| 美女视频网站黄色亚洲| 欧美一级精品在线| 婷婷国产v国产偷v亚洲高清| 亚洲国产精品一区二区www | 在线观看日韩高清av| 国产精品久久久久三级| 97久久精品人人做人人爽50路| 久久久国产精品麻豆| 婷婷激情综合网| 精品国内片67194| 韩国精品在线观看| 国产农村妇女毛片精品久久麻豆 | 国产综合一区二区| 国产婷婷色一区二区三区在线| 久久精品国产一区二区| 一本色道**综合亚洲精品蜜桃冫| 亚洲国产精品久久不卡毛片| 色婷婷综合激情| 国产精品高潮久久久久无| 不卡在线观看av| 亚洲精品欧美二区三区中文字幕| 欧美日韩一区二区三区在线| 亚洲综合另类小说| 欧美亚洲一区二区在线| 美女国产一区二区三区| 久久蜜桃av一区精品变态类天堂| av电影一区二区| 亚洲精品国产无天堂网2021|