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

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

?? cul.h

?? 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.
*
* 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一区二区三区免费野_久草精品视频
国产呦精品一区二区三区网站| 成人动漫在线一区| 久久这里只有精品6| 日韩欧美一区二区不卡| 欧美精品免费视频| 欧美日韩精品三区| 91精品国模一区二区三区| 色婷婷综合五月| 制服视频三区第一页精品| 欧美日韩一区视频| 欧美日韩激情一区二区三区| 欧美色区777第一页| 欧美电影一区二区| 欧美大尺度电影在线| 欧美极品aⅴ影院| ...av二区三区久久精品| 亚洲自拍偷拍九九九| 手机精品视频在线观看| 国产一区二区三区精品视频| 国产精品白丝av| 欧洲国内综合视频| 欧美电视剧在线看免费| 欧美精彩视频一区二区三区| 一区二区三区四区乱视频| 天天综合色天天| 精品一区二区三区久久| 99在线精品视频| 欧美刺激午夜性久久久久久久| 欧美激情一二三区| 国产视频在线观看一区二区三区 | 欧美一区二区在线免费播放| 欧美丰满一区二区免费视频| 久久网站最新地址| 亚洲亚洲人成综合网络| 国产精品亚洲综合一区在线观看| 99精品久久久久久| 精品国产伦一区二区三区免费| 亚洲区小说区图片区qvod| 国模冰冰炮一区二区| 91玉足脚交白嫩脚丫在线播放| 久久精品夜夜夜夜久久| 午夜激情久久久| 色综合咪咪久久| 国产日韩精品一区二区浪潮av| 无码av免费一区二区三区试看| 波多野结衣中文一区| 欧美成人a∨高清免费观看| 午夜激情久久久| 欧洲日韩一区二区三区| 中文乱码免费一区二区| 成人av动漫网站| 久久亚洲捆绑美女| 久久福利视频一区二区| 日韩欧美成人午夜| 午夜精品一区在线观看| 国产精品中文字幕欧美| 精品久久久久久久久久久久久久久| 天天影视涩香欲综合网| 欧美在线999| 婷婷成人激情在线网| 制服丝袜一区二区三区| 亚洲午夜三级在线| 欧美日韩免费在线视频| 亚洲成在线观看| 91精品婷婷国产综合久久性色 | 国产精品沙发午睡系列990531| 国产精品羞羞答答xxdd| 国产精品久久久久久久蜜臀| 一本久久a久久免费精品不卡| 亚洲午夜国产一区99re久久| 欧美高清性hdvideosex| 日韩av在线免费观看不卡| 精品成人在线观看| 成人ar影院免费观看视频| 亚洲欧美日韩国产另类专区| 在线播放一区二区三区| 国产精品一区久久久久| 亚洲乱码国产乱码精品精的特点| 成人综合激情网| 久久在线观看免费| 日韩毛片一二三区| 欧美日韩一卡二卡三卡| 激情五月婷婷综合| 亚洲欧洲国产日韩| 91精品在线免费| 高清beeg欧美| 日本在线不卡一区| 国产精品国产三级国产普通话99| 91麻豆成人久久精品二区三区| 青青草国产成人99久久| 中文字幕一区二区三区乱码在线 | 亚洲免费在线电影| 久久亚洲精华国产精华液 | 亚洲另类一区二区| 久久久www免费人成精品| 91免费国产视频网站| 国产成人精品在线看| 麻豆国产精品官网| 亚洲妇熟xx妇色黄| √…a在线天堂一区| 欧美一区二区三区免费大片| 欧美午夜在线观看| 欧美日韩国产美| 色狠狠av一区二区三区| 91女人视频在线观看| 粉嫩aⅴ一区二区三区四区五区| 麻豆极品一区二区三区| 麻豆精品蜜桃视频网站| 国内精品写真在线观看| 精品一区二区三区免费观看| 久久精品国产久精国产爱| 免费在线观看一区| 精品在线播放午夜| 国产精品一级在线| 不卡高清视频专区| 国产一区二区在线看| 国产在线播放一区二区三区| 国产精品一级片在线观看| 国产成人av一区二区三区在线 | 国产一区二区在线免费观看| 成人激情黄色小说| 欧美精品日韩精品| 欧美激情综合在线| 日韩国产一区二| 99久久久久免费精品国产 | 7777精品伊人久久久大香线蕉完整版| 日韩视频在线一区二区| 亚洲美女屁股眼交3| 黑人巨大精品欧美一区| 91国偷自产一区二区三区观看| 欧美刺激脚交jootjob| 亚洲欧美日韩小说| 国产69精品久久久久毛片| 91精品国产高清一区二区三区蜜臀| 欧美自拍偷拍一区| 精品日韩成人av| 午夜精品123| 色就色 综合激情| 日本一区二区三区免费乱视频| 日本最新不卡在线| 欧美久久久一区| 自拍偷拍欧美精品| 成人蜜臀av电影| 国产精品入口麻豆九色| 精品综合免费视频观看| 日韩视频一区二区在线观看| 亚洲成人精品影院| 欧美色网一区二区| 亚洲国产精品久久人人爱蜜臀| 9色porny自拍视频一区二区| 国产婷婷一区二区| 国产乱码精品一区二区三区忘忧草 | 韩国中文字幕2020精品| 69av一区二区三区| 日韩av一二三| 精品久久国产字幕高潮| 免费观看成人av| 久久久久久久性| 国产99一区视频免费| 国产精品天美传媒沈樵| 99re6这里只有精品视频在线观看| 国产精品毛片大码女人| 91女人视频在线观看| 亚洲欧美乱综合| 在线播放91灌醉迷j高跟美女 | 欧洲一区在线观看| 亚洲成国产人片在线观看| 日韩一区二区免费在线观看| 韩国av一区二区三区四区| 日本一区二区免费在线观看视频 | 91麻豆精品国产91久久久久久| 免费成人在线网站| 国产日韩精品一区二区三区| 99精品久久99久久久久| 日韩激情中文字幕| 国产日韩欧美麻豆| 欧美高清一级片在线| 国产成人精品网址| 天天综合网天天综合色| 国产婷婷色一区二区三区| 欧美午夜影院一区| www.爱久久.com| 久久99九九99精品| 亚洲制服丝袜在线| 国产欧美精品一区aⅴ影院| 欧美日韩在线观看一区二区| 国产一区二区不卡老阿姨| 亚洲妇熟xx妇色黄| 国产精品卡一卡二| 亚洲成人动漫在线免费观看| 久久中文娱乐网| 欧美一区二区久久| 欧美在线观看一区| 成人午夜av影视| 韩国中文字幕2020精品| 日本不卡123| 亚洲成在线观看| 欧美日韩激情在线| 成人av小说网| 国产在线精品一区二区三区不卡 |