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

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

?? cul.h

?? CC2430下基于ZigBee的綜合實力源碼
?? H
?? 第 1 頁 / 共 3 頁
字號:
/******************************************************************************
Filename:     cul.h
Target:       cc2430
Revised:      16/12-2005
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.
//這個函數管理 DMA 通道1-4的分配。這個函數和 culDmaFreeChannel(...)一起記住可用的 DMA
//通道。調用這個函數時從dmaTable表搜索一個通道。如果找到一個通道,
* 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
*         INT_ENABLE(INUM_DMA, INT_ON); and EA = TRUE; must also be included.
*
* @return void
*
******************************************************************************/
void culDmaToAes(DMA_DESC* pDmaChannel, BYTE * pSrcAddr, WORD length, BOOL generateInterrupt);


/******************************************************************************
* @fn  culDmaFromAes
*
* @brief
*      This function configures a DMA descriptor for transferring converted

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品在线免费观看| 综合亚洲深深色噜噜狠狠网站| 99精品国产视频| 国产精品18久久久久久久久久久久| 日日摸夜夜添夜夜添国产精品| 亚洲一区二区三区精品在线| 亚洲天堂久久久久久久| 国产精品午夜久久| 欧美国产日韩a欧美在线观看| 久久精品一级爱片| 欧美国产日韩精品免费观看| 国产日韩视频一区二区三区| 国产欧美精品一区二区三区四区 | 99久久精品国产毛片| 国产成人av网站| 波多野结衣中文一区| 99热精品国产| 欧美亚洲国产一区二区三区va| 欧美少妇bbb| 欧美一个色资源| 久久综合九色欧美综合狠狠| 久久久久久久免费视频了| 国产女同性恋一区二区| 99re这里只有精品6| 99久久99久久精品免费观看| 日本精品一区二区三区四区的功能| 91视频免费播放| 欧美日本免费一区二区三区| 国产91清纯白嫩初高中在线观看| 成人综合婷婷国产精品久久免费| 91丝袜高跟美女视频| 91超碰这里只有精品国产| 日韩一级黄色片| 国产精品嫩草99a| 亚洲一区二区三区四区的| 开心九九激情九九欧美日韩精美视频电影| 国内精品写真在线观看| 色综合天天综合给合国产| 欧美日本在线看| 欧美高清在线视频| 日韩国产欧美在线播放| 成人黄色小视频在线观看| 欧美精品日韩一本| 国产精品伦一区二区三级视频| 日韩在线观看一区二区| 亚洲人妖av一区二区| 天天做天天摸天天爽国产一区| 国产东北露脸精品视频| 欧美日韩一区二区三区四区| 国产日韩欧美麻豆| 日韩不卡一二三区| 成人国产在线观看| 精品福利视频一区二区三区| 亚洲国产一区在线观看| 国产成人8x视频一区二区| 6080午夜不卡| 一区二区三区视频在线看| 久久久久久久久久看片| 午夜激情久久久| 色诱视频网站一区| 国产精品你懂的在线| 国产中文字幕精品| 欧美日韩国产欧美日美国产精品| 亚洲色图一区二区三区| 国产精品亚洲一区二区三区妖精| 欧美日韩视频在线第一区| 国产精品看片你懂得| 国产一区二三区好的| 91精品麻豆日日躁夜夜躁| 日韩一区二区在线看片| 亚洲综合色成人| 97se亚洲国产综合自在线不卡| 久久综合色综合88| 日韩在线a电影| 欧美久久一区二区| 亚洲一区二区免费视频| 色综合色狠狠天天综合色| 国产精品不卡一区二区三区| 国产老妇另类xxxxx| 精品美女一区二区| ww亚洲ww在线观看国产| 久久99九九99精品| 日韩免费成人网| 麻豆成人久久精品二区三区红| 欧美日韩国产一区二区三区地区| 亚洲丝袜制服诱惑| 色综合久久99| 五月天激情小说综合| 91精品国产综合久久香蕉麻豆| 性感美女极品91精品| 欧美日韩国产另类不卡| 亚洲成人tv网| 国产精品一区三区| 精品国产91久久久久久久妲己| 精品一区二区在线看| 精品99一区二区三区| 国产大陆亚洲精品国产| 国产免费久久精品| 99热在这里有精品免费| 亚洲精品一二三| 欧美午夜理伦三级在线观看| 日本美女一区二区| 久久午夜羞羞影院免费观看| 狠狠色丁香婷综合久久| 久久久国产精华| 亚洲综合久久久久| 日韩欧美三级在线| 国产成人在线视频网址| 亚洲欧美成aⅴ人在线观看| 欧美精品自拍偷拍| 国产精品一区二区在线观看不卡| 国产精品欧美久久久久一区二区| 在线观看91精品国产入口| 免费观看日韩av| 中文字幕亚洲在| 337p亚洲精品色噜噜狠狠| 国产一区视频导航| 欧美乱妇23p| 国产寡妇亲子伦一区二区| 综合久久一区二区三区| 91精品国产福利在线观看| 懂色av一区二区夜夜嗨| 无码av免费一区二区三区试看| 欧美mv日韩mv| 色婷婷亚洲精品| 国产精品一区二区三区网站| 亚洲图片激情小说| 26uuu国产电影一区二区| 色哦色哦哦色天天综合| 国产乱码精品一区二区三区五月婷| 伊人开心综合网| 国产日韩欧美亚洲| 日韩美女视频一区二区在线观看| 91碰在线视频| 国产精品资源站在线| 日韩 欧美一区二区三区| 最近中文字幕一区二区三区| 精品国产乱码久久久久久久| 欧美这里有精品| 91日韩精品一区| 高清久久久久久| 久久99国产精品尤物| 性做久久久久久免费观看| 中文字幕一区二区日韩精品绯色| www成人在线观看| 日韩一区二区精品| 欧美电影一区二区| 91.xcao| 成人激情免费电影网址| 国产在线播放一区二区三区| 午夜精品福利一区二区三区av| 亚洲视频免费观看| 国产人伦精品一区二区| 精品国产乱码久久久久久夜甘婷婷 | 国产成人综合自拍| 三级欧美韩日大片在线看| 337p亚洲精品色噜噜噜| 91福利视频网站| 色婷婷亚洲综合| 欧美午夜精品久久久久久超碰 | 欧美男男青年gay1069videost | 国产精品国产三级国产普通话蜜臀| 欧美大黄免费观看| 欧美一二三区在线观看| 制服视频三区第一页精品| 欧美日韩一二三| 日韩激情视频在线观看| 亚洲一区电影777| 亚洲一区二区三区小说| 亚洲一区二区在线观看视频| 亚洲欧美一区二区三区孕妇| 亚洲人被黑人高潮完整版| 亚洲激情图片一区| 亚洲欧美一区二区在线观看| 欧美国产精品劲爆| 日韩理论片中文av| 最新高清无码专区| 性感美女久久精品| 久久精品国产精品青草| 韩国女主播成人在线| 久久久久久久久免费| 中文字幕一区二区三区在线观看 | 中文av一区二区| 亚洲天堂成人网| 亚洲电影视频在线| 丝袜美腿亚洲一区二区图片| 日韩电影在线看| 国产精品888| 99精品久久只有精品| 欧美丝袜丝交足nylons图片| 欧美一区二区视频免费观看| 精品国产乱码久久久久久影片| 欧美高清一级片在线观看| 一区二区三区色| 麻豆一区二区三区| 成人av动漫在线| 欧美欧美午夜aⅴ在线观看| 久久综合色播五月| 亚洲精品午夜久久久| 人禽交欧美网站|