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

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

?? cul.h

?? ti-Chipcon CC251x 2.4G Soc應用開發源碼實例。包括rf,powermodes,clockmodes,flashRW,interrupts,timer,pwm,uart...所有
?? H
?? 第 1 頁 / 共 3 頁
字號:
/******************************************************************************
*                                                                             *
*        **********                                                           *
*       ************                                                          *
*      ***        ***                                                         *
*     ***    ++    ***                                                        *
*     ***   +  +   ***                      CHIPCON                           *
*     ***   +                                                                 *
*     ***   +  +   ***                                                        *
*     ***    ++    ***                                                        *
*      ***        ***                                                         *
*       ************                                                          *
*        **********                                                           *
*                                                                             *
*******************************************************************************

Filename:     cul.h
Target:       cc2510
Author:       EFU/ KJA
Revised:      20/6-2006
Revision:     1.0

Description:
Chipcon Utility Library

Provides utility functions for DMA administration, timer administration, SPP
handling, etc.

******************************************************************************/
#ifndef CUL_H
#define CUL_H


#include "hal.h"


typedef void FUNCTION(void);

/******************************************************************************
*******************     DMA administration functions         ******************
******************************************************************************/

// The number of DMA channels available for the DMA administrator
#define DMA_ADM_NUMBER_OF_CHANNELS      5

// Structure for the DMA administration table
typedef struct {
    BYTE        assigned;
    FUNCTION*   callBackFunction;
} DMA_TABLE_ENTRY;



/******************************************************************************
* @fn  culDmaInit
*
* @brief
*      This function resets the table for assigning DMA channels 1 to 4, the
*      table consisting of the DMA descriptors 1 to 4 and clears all interrupt
*      flags and disarms all DMA channels 1 to 4. The configuration for
*      channel 0 is left unchanged. The address of the DMA descriptors is set
*      in register DMA1CFG.
*
* Parameters:
*
* @param  void
*
* @return void
*
******************************************************************************/
void culDmaInit(void);

/******************************************************************************
* @fn  dma_IRQ
*
* @brief
*     This interrupt routine is run each time the DMA generates an interrupt.
*     According to the interrupt flag of the DMA channel, the corresponding
*     callBackFunction is called. The interrupt flags are cleared.
*
* Parameters:
*
* @param  void
*
* @return void
*
******************************************************************************/
__interrupt void dma_IRQ (void);

/******************************************************************************
* @fn  culDmaAlloc
*
* @brief
*      This function administrates the allocation of the DMA channels 1 to 4.
*      This function, along with culDmaFreeChannel(...), keeps track of the
*      availability of the DMA channels. When this function is called, the
*      table _dmaTable_ is searched for an unused channel. If an unused channel
*      is found, the channel is reserved and the number of the assigned channel
*      is handed to the calling function. A pointer to the descriptor of the
*      assigned DMA channel is returned. At the time of editing the table, all
*      interrupts are disabled in order to avoid that the table is edited by an
*      interrupt routine before the table is updated. If no DMA channel is
*      available, the function returns 0 and the channel number pointed to by
*      _pDmaChannelNumber_ is set to 0.
*
*      This function leaves to the caller to arm the DMA channel and initiate
*      the transfer. Alternatively, the function culDmaSetUpChannel(...) could
*      be used to simplify the use of the DMA.
*
*      NOTE:   If the number pointed to by _pDmaChannelNumber_ is set to 0 by
*              this function, the allocation was unsuccessful. This must not be
*              interpreted as if DMA channel 0 has been  used.
*
* Parameters:
*
* @param  UINT8*    pDmaChannelNumber
*         Pointer to where the assigned DMA channel number is to be stored. If
*         this value is set to 0 by this function, no DMA channel was assigned.
*         (NOT that DMA channel 0 was used!)
* @param  FUNCTION* callBackFunction
*         This parameter is a pointer to the function to be called from an
*         interrupt routine when the DMA transfer is finished. The function
*         must be a [void <functionName>(void)] type. The configuration of
*         the interrupt routine must be performed manually. If no function
*         is to be called, please set this parameter to NULL (0x00);
*
* @return DMA_DESC*
*         Pointer to the assigned DMA structure. The calling function must set
*         this descriptor occording to the desired DMA transfer.
*
******************************************************************************/
DMA_DESC* culDmaAllocChannel(UINT8* pDmaChannelNumber, FUNCTION* callBackFunction);

/******************************************************************************
* @fn  culDmaFreeChannel
*
* @brief
*      This function frees a channel assigned by culDmaAlloc(...). When a
*      DMA channel no longer is in use, this function should be called with
*      the channel number as a parameter in order to make the  DMA channel
*      available for other functionality.
*
*      NOTE: Be careful not to free a channel which is still in use.
*
* Parameters:
*
* @param  BYTE	 dmaChannelNumber - Describe value.
*         Number of the channel to be freed. This number should be identical
*         to the number returned by culDmaAlloc(...) when the channel was
*         requested.
*
* @return void
*
******************************************************************************/
void culDmaFreeChannel(BYTE dmaChannelNumber);


/******************************************************************************
* @fn  culDmaSetUpChannel
*
* @brief
*      This function is used to initiate a DMA transfer. The function requests
*      an available DMA channel by using culDmaAlloc(...). The DMA descriptor
*      is copied into the list of assigned DMA desriptors. The channel is then
*      armed (meaning that the channel is active but not nescessarily started.)
*      If the Boolean expression _immediately_ is true, the DMA data transfer
*      is started. The number of the DMA channel used is returned. This
*      identifier should be used with the function culDmaFreeChannel(...) when
*      the DMA channel is no longer needed in order to make the channel
*      available for other transfers.
*
* Parameters:
*
* @param  DMA_DESC*	 pDmaDescriptor
*         Pointer to the DMA descriptor structure the channel data is to be
*         fetched from. The data at this pointer is copied into the list of
*         active DMA channels.
* @param  BOOL	 immediately
*         If this value is TRUE, the DMA transfer is started as soon as the
*         channel setup is complete. If FALSE, the channel will wait for either
*         a DMA trigger or that the transfer is initiated manually (through
*         the register DMAREQ).
* @param  FUNCTION*	 callBackFunction
*         This parameter is a pointer to the function to be called from an
*         interrupt routine when the DMA transfer is finished. The function
*         must be a [void <functionName>(void)] type. The configuration of
*         the interrupt routine must be performed manually. If no function is
*         to be called, please set this parameter to NULL (0x00);
*
* @return BYTE
*         The returned value indicates the DMA channel number used for the
*         transfer. If 0 is returned, the function call was unsuccessful,
*         most probably because all DMA channels were occupied.
*
*         NOTE: The return value 0 (0x00) does NOT indicate that DMA
*               channel 0 was used.
*
******************************************************************************/
BYTE culDmaSetUpChannel(DMA_DESC* pDmaDescriptor, BOOL immediately, FUNCTION* callBackFunction);


/******************************************************************************
* @fn  culSetDmaChannel0CallBack
*
* @brief
*      This function sets the callbackfunction to be called when DMA channel
*      0 finishes its transfer. This function is used in order to avoid
*      changing the DMA ISR.
*
* Parameters:
*
* @param  FUNCTION*	 pCallBackFunction
*
* @return void
*
******************************************************************************/
void culSetDmaChannel0CallBack(FUNCTION* pCallBackFunction);


/******************************************************************************
* @fn  culClearDmaChannel0CallBack
*
* @brief
*      This function clears the callbackfunction to be called when DMA
*      channel 0 finishes.
*
* Parameters:
*
* @param  void
*
* @return void
*
******************************************************************************/
void culClearDmaChannel0CallBack(void);


/******************************************************************************
* @fn  culDMAToFlash
*
* @brief       Description of the function.
*      This function configures DMA transfer of _length_ bytes starting from
*      _srcAddr_ to the flash. The flash address to be written must be set in
*      the register FADDR. The flash write address consists of 15 bits dividing
*      the 128 KB flash memory into 4 byte segments. Hence, each flash write must
*      contain at least 4 bytes (zero-padded if nescessary). The flash controller
*      issues a DMA trigger each time a new byte is desired.
*
* Parameters:
*
* @param  DMA_DESC*	pDmaChannel
*         A pointer to the DMA channel structure to be used for the transfer.
* @param  BYTE*      pSrcAddr
*         The start address in __xdata space of the data to be transferred.
* @param  WORD	      length
*         The number of bytes to be transferred.
* @param  BOOL	      generateInterrupt
*         If TRUE, the DMA channel will generate an interrupt request upon
*         completion.
*
* @return void
*
******************************************************************************/
void culDMAToFlash(DMA_DESC* pDmaChannel, BYTE __xdata* , WORD length, BOOL generateInterrupt);


/******************************************************************************
* @fn  culDmaToAes
*
* @brief
*      This function configures a DMA descriptor for transferring data to be
*      converted by the AES module. The function _culDmaFromAes(...)_ is used
*      to set up a DMA descriptor for transferring converted data from the AES
*      module.
*
* Parameters:
*
* @param  DMA_DESC*	 pDmaChannel
*         Pointer to the DMA descriptor to be used for DMA transfer of data to
*         be converted.
* @param  BYTE*	  pSrcAddr
*         Pointer to the start address of the data to be transferred to the AES
*         module. The length of the data to be converted should be a multiplum
*         of 16 bytes, as the AES module operates on blocks of 16 bytes
*         (128 bit). The data should be zero-padded at the end if nescessary, to
*         make the total byte count a multiplum of 16 bytes.
* @param  WORD	 length
*         Number of bytes to be converted in total. This number should be a
*         multiplum of 16 bytes, as the AES module operates on blocks of 16
*         bytes (128 bit).
* @param  BOOL	 generateInterrupt
*         If this parameter is TRUE the DMA channel will generate an interrupt
*         request when done. In order to generate an interrupt, the lines

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区二区三区乱码在线 | 色就色 综合激情| 国内精品自线一区二区三区视频| 性久久久久久久久| 亚洲国产色一区| 一区二区三区四区视频精品免费| 亚洲精品第一国产综合野| 亚洲美腿欧美偷拍| 亚洲一区二区三区视频在线| 亚洲国产综合91精品麻豆| 亚洲综合久久久久| 亚洲sss视频在线视频| 一区二区三区四区在线免费观看| 一区二区三区在线观看网站| 亚洲国产高清在线| 欧美国产综合一区二区| 久久久五月婷婷| 精品国产精品一区二区夜夜嗨| 欧美一区二区三区在线视频| 日韩亚洲欧美成人一区| 日韩视频一区二区| 日韩欧美国产精品一区| 精品福利在线导航| 久久久久国色av免费看影院| 国产日韩视频一区二区三区| 国产欧美一区二区精品性色| 国产精品久久久久aaaa樱花| 亚洲欧洲一区二区三区| 夜夜嗨av一区二区三区中文字幕 | 亚洲欧美日韩国产综合在线| 一区二区三区视频在线观看| 亚洲影院久久精品| 日韩av中文在线观看| 精品中文字幕一区二区| 国产成人激情av| 在线观看91视频| 欧美一级二级在线观看| 久久久国产精华| 亚洲欧美一区二区久久 | 亚洲激情图片一区| 奇米色777欧美一区二区| 国产综合色在线| 91麻豆免费视频| 欧美一区二区免费视频| 国产午夜久久久久| 亚洲一区二区在线观看视频| 理论电影国产精品| 国产成人精品免费网站| 666欧美在线视频| 正在播放亚洲一区| 久久久久久久久99精品| 最新国产成人在线观看| 国产乱人伦偷精品视频不卡| 国产一区二区精品在线观看| 97se亚洲国产综合在线| 日韩欧美国产综合在线一区二区三区 | 国内成人免费视频| av中文字幕亚洲| 91精品国产高清一区二区三区| 久久久三级国产网站| 亚洲精品第1页| 国产乱淫av一区二区三区| 91精品国产免费久久综合| 国产精品久久久久久久蜜臀| 久久精品噜噜噜成人av农村| 在线精品视频免费观看| 亚洲国产精品黑人久久久| 亚洲va中文字幕| 91麻豆国产福利在线观看| 国产亚洲欧美色| 久久99精品国产.久久久久久| 欧美午夜精品久久久久久孕妇| 欧美精品在线一区二区| 亚洲精品欧美激情| 97久久精品人人做人人爽50路| 欧美tickling挠脚心丨vk| 视频在线观看一区| 欧美在线观看一区二区| 亚洲天堂网中文字| 成人精品免费看| 欧美国产综合色视频| 久久99九九99精品| 日韩一级欧美一级| 日本不卡视频在线| 欧美日韩电影在线| 亚洲成人午夜影院| 91精品久久久久久蜜臀| 亚洲成人一区在线| 欧美日韩久久久久久| 亚洲国产一二三| 欧亚洲嫩模精品一区三区| 一区二区三区欧美| 欧美性一级生活| 五月综合激情婷婷六月色窝| 欧美三级乱人伦电影| 午夜久久久久久电影| 日本韩国欧美国产| 亚洲精品v日韩精品| 色偷偷久久人人79超碰人人澡| 亚洲日本护士毛茸茸| 在线视频一区二区三| 亚洲免费观看高清完整版在线观看| 国产超碰在线一区| 亚洲日本免费电影| 欧美日韩大陆在线| 美女尤物国产一区| 国产日韩欧美麻豆| 色综合天天综合在线视频| 一区二区三区高清| 在线亚洲精品福利网址导航| 亚洲18女电影在线观看| 精品美女被调教视频大全网站| 狠狠色狠狠色综合| 国产精品久久久久久久久免费相片 | 中文字幕一区二区三区av| 久久精品国产精品亚洲红杏| 精品99久久久久久| av在线不卡电影| 亚洲综合视频在线| 久久综合色天天久久综合图片| 在线视频一区二区免费| 亚洲视频小说图片| 五月激情丁香一区二区三区| 亚洲国产乱码最新视频 | 欧美女孩性生活视频| 日本乱人伦aⅴ精品| 99久久久久久99| 91麻豆免费观看| 99久久精品免费观看| 精品综合免费视频观看| 奇米一区二区三区| 国产精品夫妻自拍| 中文字幕欧美一区| 亚洲成人综合网站| 视频在线观看一区| 秋霞电影一区二区| 麻豆精品一区二区av白丝在线| 亚洲国产乱码最新视频 | 中文字幕一区二区三中文字幕| 国产亚洲欧美中文| 中文字幕日韩精品一区| 亚洲图片你懂的| 亚洲高清久久久| 日韩电影在线观看电影| 久久99国产精品免费网站| 国产精品一区久久久久| 9l国产精品久久久久麻豆| 色综合久久综合网97色综合 | 欧美日韩国产美| 欧美日韩精品三区| 在线观看国产一区二区| 日韩一级视频免费观看在线| 久久久91精品国产一区二区三区| 国产日韩欧美高清| 亚洲制服丝袜av| 免费高清在线一区| 国产成人亚洲精品狼色在线 | 久久精品国产一区二区三| 国产中文字幕精品| 99久久久久久99| 欧美精品aⅴ在线视频| 精品国产三级电影在线观看| 亚洲国产电影在线观看| 一区二区三区国产| 久久精品国产一区二区| 99在线精品一区二区三区| 欧美理论片在线| 久久久久久久久久看片| 亚洲综合丝袜美腿| 国产美女娇喘av呻吟久久| 色哟哟国产精品| 久久综合色天天久久综合图片| 日韩码欧中文字| 久久成人久久鬼色| 欧美伊人久久大香线蕉综合69 | 午夜成人免费视频| 成人app在线| 日韩视频一区二区三区| 国产精品久久久久久久久快鸭| 日韩av一区二区三区四区| 成人一级黄色片| 欧洲色大大久久| 日韩女优av电影在线观看| 136国产福利精品导航| 国产自产v一区二区三区c| 日本丰满少妇一区二区三区| 久久久不卡影院| 蜜臀av性久久久久蜜臀av麻豆| 国产精品中文字幕一区二区三区| 日本精品视频一区二区三区| 国产精品午夜春色av| 极品瑜伽女神91| 欧美日韩1234| 亚洲日本在线看| 成人高清免费在线播放| 久久综合色之久久综合| 免费高清在线视频一区·| 欧美无砖砖区免费| 国产精品超碰97尤物18| 国产91清纯白嫩初高中在线观看|