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

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

?? cul.h

?? chipcon的cc2430芯片基本操作的全部源代碼
?? H
?? 第 1 頁 / 共 3 頁
字號:
/******************************************************************************
*                                                                             *
*        **********                                                           *
*       ************                                                          *
*      ***        ***                                                         *
*     ***    ++    ***                                                        *
*     ***   +  +   ***                      CHIPCON                           *
*     ***   +                                                                 *
*     ***   +  +   ***                                                        *
*     ***    ++    ***                                                        *
*      ***        ***                                                         *
*       ************                                                          *
*        **********                                                           *
*                                                                             *
*******************************************************************************

Filename:     cul.h
Target:       cc2430
Author:       EFU/ KJA
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.
*

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文一区二区在线观看| 亚洲大片免费看| 一区二区三区在线高清| 丝袜美腿高跟呻吟高潮一区| 国产一区二区三区黄视频| 91麻豆免费在线观看| 日韩一区二区精品| 亚洲日本成人在线观看| 国产真实精品久久二三区| 在线这里只有精品| 国产天堂亚洲国产碰碰| 免费观看成人av| 欧美性猛交一区二区三区精品 | 欧美一区二区三区在| 国产三级欧美三级日产三级99| 亚洲图片有声小说| a在线欧美一区| 精品久久国产老人久久综合| 亚洲福利一区二区三区| 9l国产精品久久久久麻豆| 亚洲精品在线电影| 天堂影院一区二区| 日本高清无吗v一区| 中文字幕五月欧美| 国产盗摄精品一区二区三区在线| 在线电影欧美成精品| 亚洲综合一区在线| av午夜精品一区二区三区| 久久久蜜桃精品| 麻豆国产精品777777在线| 91精品国产欧美一区二区成人 | 日韩精品一区二区三区视频在线观看| 亚洲欧美色一区| caoporn国产精品| 欧美激情艳妇裸体舞| 国产一区二区成人久久免费影院 | 亚洲精选一二三| 成人av电影在线| 亚洲国产精品精华液ab| 国产精品一区三区| 国产欧美一区二区精品性| 狠狠v欧美v日韩v亚洲ⅴ| 欧美精品一区二区三区高清aⅴ| 欧美aaaaa成人免费观看视频| 欧美日韩在线免费视频| 午夜视频一区二区| 欧美一区二区在线免费观看| 日韩成人dvd| 亚洲精品一区二区三区精华液| 久久激情五月激情| 久久蜜臀精品av| 北条麻妃国产九九精品视频| 亚洲日本在线看| 欧美日韩美少妇| 免费成人在线影院| 国产三级一区二区| 91网站最新网址| 激情久久五月天| 国产性做久久久久久| 成人av在线资源| 亚洲国产aⅴ天堂久久| 91精品蜜臀在线一区尤物| 美女视频网站久久| 国产日韩欧美亚洲| 色综合久久99| 日本欧美一区二区三区乱码| 国产欧美日韩在线| 日本精品一区二区三区高清| 奇米777欧美一区二区| 欧美韩国日本不卡| 欧美性色综合网| 国产另类ts人妖一区二区| 亚洲免费观看视频| 3d成人h动漫网站入口| 国产成人在线看| 亚洲国产精品久久艾草纯爱| 精品捆绑美女sm三区| 99久久精品免费| 麻豆视频观看网址久久| 中文字幕在线一区免费| 91精品国产入口| 色综合色综合色综合| 麻豆精品在线观看| 一级中文字幕一区二区| 久久品道一品道久久精品| 色一情一乱一乱一91av| 激情六月婷婷久久| 亚洲一区二区美女| 国产欧美日产一区| 91精品国产日韩91久久久久久| 99v久久综合狠狠综合久久| 美女脱光内衣内裤视频久久影院| 亚洲区小说区图片区qvod| 精品国产sm最大网站免费看| 欧美吻胸吃奶大尺度电影| 波多野结衣中文字幕一区 | 国产精品污污网站在线观看| 欧美放荡的少妇| 91香蕉视频mp4| 国产精品456| 美国一区二区三区在线播放| 午夜电影久久久| 亚洲免费观看高清完整版在线观看 | 在线观看欧美日本| jiyouzz国产精品久久| 国产一区91精品张津瑜| 日本视频一区二区三区| 亚洲国产裸拍裸体视频在线观看乱了 | 久久青草欧美一区二区三区| 宅男在线国产精品| 欧美日韩精品一区二区三区| 97精品视频在线观看自产线路二| 国产精品自拍三区| 寂寞少妇一区二区三区| 日本成人在线看| 日精品一区二区| 婷婷亚洲久悠悠色悠在线播放| 一区二区三区在线视频观看| 亚洲日本韩国一区| 亚洲精品视频免费看| 国产精品高潮呻吟久久| 国产精品久久久久久久久免费桃花 | 色婷婷综合五月| 色综合久久久久久久久久久| 99久久精品免费观看| 99视频精品在线| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 亚洲精品免费在线播放| 一区二区三区中文免费| 一区二区三区四区乱视频| 亚洲一区二区五区| 亚洲国产成人porn| 免费在线欧美视频| 蜜乳av一区二区| 国产成人精品亚洲777人妖| 国产成人综合亚洲91猫咪| 国产69精品久久99不卡| 成人福利电影精品一区二区在线观看 | 99re热视频精品| 在线观看av一区二区| 欧美猛男超大videosgay| 欧美一区二区免费观在线| 日韩欧美一区在线观看| 国产日韩欧美不卡在线| 中文字幕一区二| 亚洲444eee在线观看| 日本不卡中文字幕| 福利一区二区在线| 色成年激情久久综合| 91麻豆精品国产91久久久久| 久久久久国产精品麻豆ai换脸 | 成人app下载| 欧美三级蜜桃2在线观看| 精品裸体舞一区二区三区| 国产精品视频九色porn| 五月婷婷久久综合| 国精产品一区一区三区mba视频| 99久久伊人网影院| 欧美精品粉嫩高潮一区二区| 国产亲近乱来精品视频| 亚洲午夜在线观看视频在线| 激情综合色播激情啊| 99精品久久只有精品| 欧美一区二区成人| 国产精品二三区| 激情伊人五月天久久综合| 99精品视频在线免费观看| 91精品国产美女浴室洗澡无遮挡| 久久久久久久久99精品| 亚洲一区二区三区激情| 国产不卡视频在线观看| 91精品国产手机| 亚洲精品写真福利| 国产成人免费在线观看| 欧美日韩国产精选| 亚洲色图欧美偷拍| 国产一区二区三区久久悠悠色av| 欧美日韩一区二区三区在线看| 欧美韩国日本不卡| 精品伊人久久久久7777人| 欧美日韩在线综合| 亚洲人吸女人奶水| 国产乱码精品一区二区三区av| 欧美日韩久久一区二区| 亚洲精品久久久蜜桃| 成人性视频免费网站| 26uuu国产在线精品一区二区| 亚洲福利一区二区| 色综合天天在线| 中文字幕欧美激情| 国产资源精品在线观看| 日韩一级完整毛片| 偷窥国产亚洲免费视频| 色丁香久综合在线久综合在线观看| 久久久九九九九| 狠狠色狠狠色综合| 精品国产电影一区二区| 免费av成人在线| 欧美一级生活片| 青青草原综合久久大伊人精品|