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

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

?? halsrf04.h

?? c51控制cc1100示范程序
?? H
?? 第 1 頁 / 共 3 頁
字號:




//-------------------------------------------------------------------------------------------------------
//  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(); \
        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
//
// MOSI     - - - - - - - - - - - - - - - ---------- - - - - - 
//                                         | SRES |
//          - - - - - - - - - - - - - - - ---------- - - - - -                    
//
#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一区二区三区免费野_久草精品视频
国产精品中文欧美| 一区二区三区影院| 亚洲女性喷水在线观看一区| 国产在线精品一区在线观看麻豆| 欧美高清一级片在线| 亚洲精品v日韩精品| 91在线国产福利| 精品国免费一区二区三区| 日韩精品一级中文字幕精品视频免费观看 | 免播放器亚洲一区| 91在线播放网址| 成人欧美一区二区三区视频网页| 国产东北露脸精品视频| 91麻豆精品国产91久久久久久| 国产精品家庭影院| 99久久精品免费看国产| 自拍视频在线观看一区二区| 91美女片黄在线观看91美女| 日韩理论片在线| 欧美三区在线视频| 青青草伊人久久| 精品99久久久久久| 成人免费视频视频| 亚洲欧美日韩中文字幕一区二区三区| 国产乱码精品1区2区3区| 久久综合给合久久狠狠狠97色69| 激情综合五月天| 中文天堂在线一区| 一本到不卡免费一区二区| 国产日韩欧美精品一区| 波多野结衣中文字幕一区二区三区| 国产精品成人一区二区三区夜夜夜| 91小宝寻花一区二区三区| 中文字幕在线不卡| 欧美性生活久久| 蜜桃视频免费观看一区| 久久精品男人天堂av| 99精品1区2区| 亚洲成av人片www| 精品国产乱码久久久久久图片| 国产成人av电影在线| 夜夜揉揉日日人人青青一国产精品 | 色香色香欲天天天影视综合网| 中文字幕国产一区二区| 色八戒一区二区三区| 蜜桃视频一区二区| 欧美mv日韩mv亚洲| 色综合久久中文综合久久牛| 婷婷综合五月天| 久久人人爽人人爽| 欧美亚洲一区二区在线| 男男gaygay亚洲| 国产欧美精品一区aⅴ影院 | 在线播放日韩导航| 国产福利精品导航| 亚洲高清免费在线| 亚洲精品一区二区三区99| 91丨porny丨户外露出| 麻豆一区二区三| 一区二区三区在线免费播放| 7777精品久久久大香线蕉| 国产成人精品在线看| 亚洲成av人片在线观看| 《视频一区视频二区| 日韩免费福利电影在线观看| 色老汉av一区二区三区| 国产一区二区美女| 精品欧美乱码久久久久久| 国产精品久久久久久久久久久免费看 | 狠狠色综合日日| 亚洲一区二区三区四区中文字幕| 欧美videos大乳护士334| 色网综合在线观看| 国产精品一区二区男女羞羞无遮挡| 午夜精品久久久| 久久精品夜色噜噜亚洲a∨| 欧美高清视频在线高清观看mv色露露十八| 成人福利视频网站| 国产精品自产自拍| 五月激情丁香一区二区三区| 亚洲激情网站免费观看| 日日噜噜夜夜狠狠视频欧美人| 亚洲欧洲日韩在线| 国产欧美一区二区精品性色| www久久精品| 精品久久久久av影院 | 欧美日韩一区在线| 色www精品视频在线观看| 国产精品77777| 国产精品中文欧美| 国产真实乱子伦精品视频| 日韩和欧美一区二区| 欧美美女网站色| 91精品婷婷国产综合久久性色| 欧美亚洲国产bt| 欧美亚一区二区| 欧美一区二区二区| 久久综合网色—综合色88| 国产喷白浆一区二区三区| 国产精品久久久久久久久果冻传媒| 1区2区3区国产精品| 亚洲成人久久影院| 久久 天天综合| 成人黄页毛片网站| 欧美亚洲综合色| 日韩女优av电影在线观看| 中文字幕精品一区二区精品绿巨人| 亚洲视频1区2区| 青青草精品视频| 国产综合久久久久久鬼色| 97精品视频在线观看自产线路二| 欧美性做爰猛烈叫床潮| 日韩无一区二区| 国产精品视频在线看| av不卡在线播放| 欧美日韩国产a| 麻豆国产欧美一区二区三区| 日本大胆欧美人术艺术动态| 国产一区二区不卡| 91成人在线免费观看| 亚洲精品在线免费播放| 亚洲色图视频网站| 狠狠色2019综合网| 色吧成人激情小说| 久久久亚洲高清| 性久久久久久久久久久久| 国产成人在线视频网站| 日本韩国视频一区二区| 精品不卡在线视频| 一卡二卡三卡日韩欧美| 国产精品自拍av| 91精品黄色片免费大全| 国产精品高潮久久久久无| 免费看欧美女人艹b| 97精品超碰一区二区三区| 亚洲精品在线一区二区| 亚洲国产视频a| 大尺度一区二区| 欧美成人免费网站| 亚洲小说欧美激情另类| 成人黄页在线观看| 久久嫩草精品久久久精品一| 亚洲国产日日夜夜| 91首页免费视频| 欧美激情一区不卡| 中文字幕久久午夜不卡| 久久99精品久久久久婷婷| 色素色在线综合| 国产视频一区在线播放| 日韩电影在线观看电影| 色婷婷亚洲一区二区三区| 国产精品久久夜| 国产真实乱子伦精品视频| 欧美一区二区三区视频| 亚洲午夜视频在线观看| aaa亚洲精品| 国产精品久久久久久亚洲毛片 | 洋洋av久久久久久久一区| 成人午夜电影久久影院| 2020国产精品| 国精产品一区一区三区mba视频 | 国产精品入口麻豆九色| 国产成人精品www牛牛影视| 久久久99免费| 国产一区二区三区四 | 国产福利91精品一区二区三区| 久久女同精品一区二区| 日本麻豆一区二区三区视频| 欧美性猛交xxxx乱大交退制版| 亚洲欧洲精品天堂一级 | 欧美一区二区三区四区高清| 亚洲男人的天堂在线aⅴ视频| 国产成人aaa| 欧美国产禁国产网站cc| 不卡的av电影| 亚洲欧洲国产日本综合| 99久久精品国产一区二区三区| 亚洲欧洲日产国产综合网| aaa欧美日韩| 一区二区三区精品在线观看| 欧美综合一区二区| 日韩精品视频网| 久久综合色鬼综合色| 成人性生交大片| 亚洲综合在线五月| 在线播放一区二区三区| 久久精品国产99国产| 国产欧美日韩在线视频| av电影在线观看不卡| 亚洲精品日韩专区silk| 欧美日产在线观看| 另类的小说在线视频另类成人小视频在线 | 欧美乱熟臀69xxxxxx| 丝袜美腿一区二区三区| 欧美一级片在线看| 国产麻豆成人精品| 中文字幕一区二区在线播放| 在线视频你懂得一区| 美女在线视频一区| 久久久精品欧美丰满|