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

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

?? cul.h

?? zigbee通信系統中使用芯片cc2430實現點對點通信的源碼
?? 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一区二区三区免费野_久草精品视频
国产视频一区在线播放| 欧美在线观看视频一区二区三区| 久久蜜臀精品av| 欧美中文一区二区三区| 亚洲国产精品影院| 欧美日韩在线播放三区| 欧美bbbbb| 久久夜色精品国产噜噜av| 色伊人久久综合中文字幕| 亚洲理论在线观看| 4438成人网| 国产精品一区久久久久| 亚洲猫色日本管| 日韩欧美国产高清| 成人美女视频在线看| 尤物在线观看一区| 精品奇米国产一区二区三区| 不卡一区在线观看| 亚洲成av人**亚洲成av**| 精品国产一区二区三区不卡 | 国产欧美日韩综合| 91亚洲男人天堂| 视频一区二区欧美| 国产午夜精品一区二区三区嫩草 | 一区二区中文字幕在线| 日本黄色一区二区| 精品一区二区三区在线播放| 亚洲国产高清在线观看视频| 欧美高清视频www夜色资源网| 国产美女一区二区三区| 亚洲午夜av在线| 国产欧美精品一区二区三区四区| 欧美午夜免费电影| 国产一区久久久| 午夜视频在线观看一区二区三区| 国产无一区二区| 日韩欧美专区在线| 欧美色图激情小说| 成人在线综合网站| 麻豆精品国产91久久久久久| 亚洲另类春色校园小说| 久久久久国产一区二区三区四区| 欧美日韩在线直播| av中文字幕在线不卡| 老司机午夜精品| 亚洲午夜影视影院在线观看| 国产日韩欧美综合一区| 欧美一区二区三区日韩视频| 日本韩国精品在线| 国产99久久精品| 久久国产欧美日韩精品| 视频一区二区三区中文字幕| 亚洲色图清纯唯美| 久久久久久久久久看片| 日韩视频一区二区| 欧美撒尿777hd撒尿| 99久久er热在这里只有精品66| 国产一区二区三区久久悠悠色av | 国产剧情一区二区| 日本va欧美va瓶| 午夜精品成人在线| 一区二区日韩av| 亚洲欧洲综合另类在线| 中文一区二区在线观看| 久久久精品影视| 久久久噜噜噜久噜久久综合| 欧美电影免费观看高清完整版在 | 欧美亚洲禁片免费| 91丨porny丨中文| 99久久精品免费看国产| 99久久婷婷国产综合精品电影| 国产69精品久久久久毛片| 国产成人精品免费在线| 国产一区不卡视频| 国产91精品一区二区麻豆亚洲| 国产一区美女在线| 国产成人免费视频一区| 国产91丝袜在线播放0| 成人综合婷婷国产精品久久 | 99re成人在线| 精品美女在线观看| 男女激情视频一区| 日韩一区二区三区免费观看| 日本aⅴ亚洲精品中文乱码| 日韩欧美国产小视频| 国产真实乱子伦精品视频| 久久精品在线观看| 99re成人在线| 亚洲一级二级三级| 欧美videos中文字幕| 国产伦精品一区二区三区免费迷 | 亚洲精品乱码久久久久久久久| 94-欧美-setu| 性欧美疯狂xxxxbbbb| 91精品国产综合久久精品| 国产一区二三区好的| 亚洲欧洲日本在线| 欧美日韩国产一级片| 美国三级日本三级久久99| 久久精品夜色噜噜亚洲a∨| 91麻豆国产香蕉久久精品| 婷婷开心久久网| 久久久久久亚洲综合影院红桃| 99国产精品久久久久| 亚洲高清免费观看| 欧美精品一区二区三区视频| av中文字幕一区| 秋霞午夜av一区二区三区| 国产无一区二区| 欧美主播一区二区三区美女| 国产一区二区三区四区在线观看| 亚洲人成网站精品片在线观看 | 久久爱www久久做| 亚洲图片欧美激情| 日韩你懂的电影在线观看| 91原创在线视频| 国内精品伊人久久久久av影院| 亚洲人妖av一区二区| 精品剧情在线观看| 欧美在线一二三| 成人午夜在线免费| 免费亚洲电影在线| 亚洲欧美电影院| 国产无一区二区| 日韩欧美成人激情| 欧美色图12p| 91视频在线看| 成人小视频免费观看| 九一久久久久久| 日韩精品三区四区| 一区二区高清在线| 亚洲欧洲在线观看av| 国产蜜臀av在线一区二区三区| 欧美乱熟臀69xxxxxx| 91精品办公室少妇高潮对白| 国产suv一区二区三区88区| 精品一区二区三区在线观看国产| 天天亚洲美女在线视频| 亚洲自拍都市欧美小说| 综合av第一页| 亚洲欧美日韩国产综合| 亚洲国产精华液网站w| 久久久电影一区二区三区| 2023国产精品| 久久久精品国产99久久精品芒果| 精品久久久久久久人人人人传媒| 欧美日韩国产成人在线91| 欧美人体做爰大胆视频| 欧美日韩一区高清| 欧美三级乱人伦电影| 欧美日韩一区二区三区视频| 色成年激情久久综合| 日本韩国精品在线| 欧美日本一区二区| 91麻豆精品国产综合久久久久久 | 一区二区三区成人在线视频| 亚洲免费av观看| 亚洲免费av高清| 三级成人在线视频| 日韩主播视频在线| 婷婷成人激情在线网| 久久精品国产在热久久| 狠狠色丁香婷婷综合久久片| 国产河南妇女毛片精品久久久| 国产大陆a不卡| 91麻豆高清视频| 欧美视频在线一区二区三区 | 欧美日韩国产三级| 91精品国产一区二区三区香蕉| 日韩欧美国产麻豆| 中文无字幕一区二区三区| 亚洲欧洲精品一区二区精品久久久| 亚洲欧美区自拍先锋| 日本成人在线看| 国产成人av一区二区三区在线| 99久久精品国产网站| 欧美日韩亚洲另类| 久久久精品综合| 亚洲一区在线观看网站| 青草av.久久免费一区| 豆国产96在线|亚洲| 欧美三级欧美一级| 国产色婷婷亚洲99精品小说| 一区二区三区视频在线看| 国精产品一区一区三区mba视频| av亚洲精华国产精华精| 欧美肥胖老妇做爰| 中文字幕不卡三区| 美女一区二区视频| www.日本不卡| 欧美sm美女调教| 亚洲午夜私人影院| 国产精品亚洲а∨天堂免在线| 欧美亚洲图片小说| 中文一区在线播放| 国产一区二区三区不卡在线观看| 在线观看亚洲a| 国产精品的网站| 国产一区二区三区黄视频| 在线观看精品一区|