Path: blob/master/arch/arm/mach-bcmring/include/csp/dmacHw.h
10820 views
/*****************************************************************************1* Copyright 2004 - 2008 Broadcom Corporation. All rights reserved.2*3* Unless you and Broadcom execute a separate written software license4* agreement governing use of this software, this software is licensed to you5* under the terms of the GNU General Public License version 2, available at6* http://www.broadcom.com/licenses/GPLv2.php (the "GPL").7*8* Notwithstanding the above, under no circumstances may you combine this9* software in any way with any other Broadcom software provided under a10* license other than the GPL, without Broadcom's express prior written11* consent.12*****************************************************************************/1314/****************************************************************************/15/**16* @file dmacHw.h17*18* @brief API definitions for low level DMA controller driver19*20*/21/****************************************************************************/22#ifndef _DMACHW_H23#define _DMACHW_H2425#include <stddef.h>2627#include <csp/stdint.h>28#include <mach/csp/dmacHw_reg.h>2930/* Define DMA Channel ID using DMA controller number (m) and channel number (c).3132System specific channel ID should be defined as follows3334For example:3536#include <dmacHw.h>37...38#define systemHw_LCD_CHANNEL_ID dmacHw_MAKE_CHANNEL_ID(0,5)39#define systemHw_SWITCH_RX_CHANNEL_ID dmacHw_MAKE_CHANNEL_ID(0,0)40#define systemHw_SWITCH_TX_CHANNEL_ID dmacHw_MAKE_CHANNEL_ID(0,1)41#define systemHw_APM_RX_CHANNEL_ID dmacHw_MAKE_CHANNEL_ID(0,3)42#define systemHw_APM_TX_CHANNEL_ID dmacHw_MAKE_CHANNEL_ID(0,4)43...44#define systemHw_SHARED1_CHANNEL_ID dmacHw_MAKE_CHANNEL_ID(1,4)45#define systemHw_SHARED2_CHANNEL_ID dmacHw_MAKE_CHANNEL_ID(1,5)46#define systemHw_SHARED3_CHANNEL_ID dmacHw_MAKE_CHANNEL_ID(0,6)47...48*/49#define dmacHw_MAKE_CHANNEL_ID(m, c) (m << 8 | c)5051typedef enum {52dmacHw_CHANNEL_PRIORITY_0 = dmacHw_REG_CFG_LO_CH_PRIORITY_0, /* Channel priority 0. Lowest priority DMA channel */53dmacHw_CHANNEL_PRIORITY_1 = dmacHw_REG_CFG_LO_CH_PRIORITY_1, /* Channel priority 1 */54dmacHw_CHANNEL_PRIORITY_2 = dmacHw_REG_CFG_LO_CH_PRIORITY_2, /* Channel priority 2 */55dmacHw_CHANNEL_PRIORITY_3 = dmacHw_REG_CFG_LO_CH_PRIORITY_3, /* Channel priority 3 */56dmacHw_CHANNEL_PRIORITY_4 = dmacHw_REG_CFG_LO_CH_PRIORITY_4, /* Channel priority 4 */57dmacHw_CHANNEL_PRIORITY_5 = dmacHw_REG_CFG_LO_CH_PRIORITY_5, /* Channel priority 5 */58dmacHw_CHANNEL_PRIORITY_6 = dmacHw_REG_CFG_LO_CH_PRIORITY_6, /* Channel priority 6 */59dmacHw_CHANNEL_PRIORITY_7 = dmacHw_REG_CFG_LO_CH_PRIORITY_7 /* Channel priority 7. Highest priority DMA channel */60} dmacHw_CHANNEL_PRIORITY_e;6162/* Source destination master interface */63typedef enum {64dmacHw_SRC_MASTER_INTERFACE_1 = dmacHw_REG_CTL_SMS_1, /* Source DMA master interface 1 */65dmacHw_SRC_MASTER_INTERFACE_2 = dmacHw_REG_CTL_SMS_2, /* Source DMA master interface 2 */66dmacHw_DST_MASTER_INTERFACE_1 = dmacHw_REG_CTL_DMS_1, /* Destination DMA master interface 1 */67dmacHw_DST_MASTER_INTERFACE_2 = dmacHw_REG_CTL_DMS_2 /* Destination DMA master interface 2 */68} dmacHw_MASTER_INTERFACE_e;6970typedef enum {71dmacHw_SRC_TRANSACTION_WIDTH_8 = dmacHw_REG_CTL_SRC_TR_WIDTH_8, /* Source 8 bit (1 byte) per transaction */72dmacHw_SRC_TRANSACTION_WIDTH_16 = dmacHw_REG_CTL_SRC_TR_WIDTH_16, /* Source 16 bit (2 byte) per transaction */73dmacHw_SRC_TRANSACTION_WIDTH_32 = dmacHw_REG_CTL_SRC_TR_WIDTH_32, /* Source 32 bit (4 byte) per transaction */74dmacHw_SRC_TRANSACTION_WIDTH_64 = dmacHw_REG_CTL_SRC_TR_WIDTH_64, /* Source 64 bit (8 byte) per transaction */75dmacHw_DST_TRANSACTION_WIDTH_8 = dmacHw_REG_CTL_DST_TR_WIDTH_8, /* Destination 8 bit (1 byte) per transaction */76dmacHw_DST_TRANSACTION_WIDTH_16 = dmacHw_REG_CTL_DST_TR_WIDTH_16, /* Destination 16 bit (2 byte) per transaction */77dmacHw_DST_TRANSACTION_WIDTH_32 = dmacHw_REG_CTL_DST_TR_WIDTH_32, /* Destination 32 bit (4 byte) per transaction */78dmacHw_DST_TRANSACTION_WIDTH_64 = dmacHw_REG_CTL_DST_TR_WIDTH_64 /* Destination 64 bit (8 byte) per transaction */79} dmacHw_TRANSACTION_WIDTH_e;8081typedef enum {82dmacHw_SRC_BURST_WIDTH_0 = dmacHw_REG_CTL_SRC_MSIZE_0, /* Source No burst */83dmacHw_SRC_BURST_WIDTH_4 = dmacHw_REG_CTL_SRC_MSIZE_4, /* Source 4 X dmacHw_TRANSACTION_WIDTH_xxx bytes per burst */84dmacHw_SRC_BURST_WIDTH_8 = dmacHw_REG_CTL_SRC_MSIZE_8, /* Source 8 X dmacHw_TRANSACTION_WIDTH_xxx bytes per burst */85dmacHw_SRC_BURST_WIDTH_16 = dmacHw_REG_CTL_SRC_MSIZE_16, /* Source 16 X dmacHw_TRANSACTION_WIDTH_xxx bytes per burst */86dmacHw_DST_BURST_WIDTH_0 = dmacHw_REG_CTL_DST_MSIZE_0, /* Destination No burst */87dmacHw_DST_BURST_WIDTH_4 = dmacHw_REG_CTL_DST_MSIZE_4, /* Destination 4 X dmacHw_TRANSACTION_WIDTH_xxx bytes per burst */88dmacHw_DST_BURST_WIDTH_8 = dmacHw_REG_CTL_DST_MSIZE_8, /* Destination 8 X dmacHw_TRANSACTION_WIDTH_xxx bytes per burst */89dmacHw_DST_BURST_WIDTH_16 = dmacHw_REG_CTL_DST_MSIZE_16 /* Destination 16 X dmacHw_TRANSACTION_WIDTH_xxx bytes per burst */90} dmacHw_BURST_WIDTH_e;9192typedef enum {93dmacHw_TRANSFER_TYPE_MEM_TO_MEM = dmacHw_REG_CTL_TTFC_MM_DMAC, /* Memory to memory transfer */94dmacHw_TRANSFER_TYPE_PERIPHERAL_TO_MEM = dmacHw_REG_CTL_TTFC_PM_DMAC, /* Peripheral to memory transfer */95dmacHw_TRANSFER_TYPE_MEM_TO_PERIPHERAL = dmacHw_REG_CTL_TTFC_MP_DMAC, /* Memory to peripheral transfer */96dmacHw_TRANSFER_TYPE_PERIPHERAL_TO_PERIPHERAL = dmacHw_REG_CTL_TTFC_PP_DMAC /* Peripheral to peripheral transfer */97} dmacHw_TRANSFER_TYPE_e;9899typedef enum {100dmacHw_TRANSFER_MODE_PERREQUEST, /* Block transfer per DMA request */101dmacHw_TRANSFER_MODE_CONTINUOUS, /* Continuous transfer of streaming data */102dmacHw_TRANSFER_MODE_PERIODIC /* Periodic transfer of streaming data */103} dmacHw_TRANSFER_MODE_e;104105typedef enum {106dmacHw_SRC_ADDRESS_UPDATE_MODE_INC = dmacHw_REG_CTL_SINC_INC, /* Increment source address after every transaction */107dmacHw_SRC_ADDRESS_UPDATE_MODE_DEC = dmacHw_REG_CTL_SINC_DEC, /* Decrement source address after every transaction */108dmacHw_DST_ADDRESS_UPDATE_MODE_INC = dmacHw_REG_CTL_DINC_INC, /* Increment destination address after every transaction */109dmacHw_DST_ADDRESS_UPDATE_MODE_DEC = dmacHw_REG_CTL_DINC_DEC, /* Decrement destination address after every transaction */110dmacHw_SRC_ADDRESS_UPDATE_MODE_NC = dmacHw_REG_CTL_SINC_NC, /* No change in source address after every transaction */111dmacHw_DST_ADDRESS_UPDATE_MODE_NC = dmacHw_REG_CTL_DINC_NC /* No change in destination address after every transaction */112} dmacHw_ADDRESS_UPDATE_MODE_e;113114typedef enum {115dmacHw_FLOW_CONTROL_DMA, /* DMA working as flow controller (default) */116dmacHw_FLOW_CONTROL_PERIPHERAL /* Peripheral working as flow controller */117} dmacHw_FLOW_CONTROL_e;118119typedef enum {120dmacHw_TRANSFER_STATUS_BUSY, /* DMA Transfer ongoing */121dmacHw_TRANSFER_STATUS_DONE, /* DMA Transfer completed */122dmacHw_TRANSFER_STATUS_ERROR /* DMA Transfer error */123} dmacHw_TRANSFER_STATUS_e;124125typedef enum {126dmacHw_INTERRUPT_DISABLE, /* Interrupt disable */127dmacHw_INTERRUPT_ENABLE /* Interrupt enable */128} dmacHw_INTERRUPT_e;129130typedef enum {131dmacHw_INTERRUPT_STATUS_NONE = 0x0, /* No DMA interrupt */132dmacHw_INTERRUPT_STATUS_TRANS = 0x1, /* End of DMA transfer interrupt */133dmacHw_INTERRUPT_STATUS_BLOCK = 0x2, /* End of block transfer interrupt */134dmacHw_INTERRUPT_STATUS_ERROR = 0x4 /* Error interrupt */135} dmacHw_INTERRUPT_STATUS_e;136137typedef enum {138dmacHw_CONTROLLER_ATTRIB_CHANNEL_NUM, /* Number of DMA channel */139dmacHw_CONTROLLER_ATTRIB_CHANNEL_MAX_BLOCK_SIZE, /* Maximum channel burst size */140dmacHw_CONTROLLER_ATTRIB_MASTER_INTF_NUM, /* Number of DMA master interface */141dmacHw_CONTROLLER_ATTRIB_CHANNEL_BUS_WIDTH, /* Channel Data bus width */142dmacHw_CONTROLLER_ATTRIB_CHANNEL_FIFO_SIZE /* Channel FIFO size */143} dmacHw_CONTROLLER_ATTRIB_e;144145typedef unsigned long dmacHw_HANDLE_t; /* DMA channel handle */146typedef uint32_t dmacHw_ID_t; /* DMA channel Id. Must be created using147"dmacHw_MAKE_CHANNEL_ID" macro148*/149/* DMA channel configuration parameters */150typedef struct {151uint32_t srcPeripheralPort; /* Source peripheral port */152uint32_t dstPeripheralPort; /* Destination peripheral port */153uint32_t srcStatusRegisterAddress; /* Source status register address */154uint32_t dstStatusRegisterAddress; /* Destination status register address of type */155156uint32_t srcGatherWidth; /* Number of bytes gathered before successive gather opearation */157uint32_t srcGatherJump; /* Number of bytes jumpped before successive gather opearation */158uint32_t dstScatterWidth; /* Number of bytes sacattered before successive scatter opearation */159uint32_t dstScatterJump; /* Number of bytes jumpped before successive scatter opearation */160uint32_t maxDataPerBlock; /* Maximum number of bytes to be transferred per block/descrptor.1610 = Maximum possible.162*/163164dmacHw_ADDRESS_UPDATE_MODE_e srcUpdate; /* Source address update mode */165dmacHw_ADDRESS_UPDATE_MODE_e dstUpdate; /* Destination address update mode */166dmacHw_TRANSFER_TYPE_e transferType; /* DMA transfer type */167dmacHw_TRANSFER_MODE_e transferMode; /* DMA transfer mode */168dmacHw_MASTER_INTERFACE_e srcMasterInterface; /* DMA source interface */169dmacHw_MASTER_INTERFACE_e dstMasterInterface; /* DMA destination interface */170dmacHw_TRANSACTION_WIDTH_e srcMaxTransactionWidth; /* Source transaction width */171dmacHw_TRANSACTION_WIDTH_e dstMaxTransactionWidth; /* Destination transaction width */172dmacHw_BURST_WIDTH_e srcMaxBurstWidth; /* Source burst width */173dmacHw_BURST_WIDTH_e dstMaxBurstWidth; /* Destination burst width */174dmacHw_INTERRUPT_e blockTransferInterrupt; /* Block trsnafer interrupt */175dmacHw_INTERRUPT_e completeTransferInterrupt; /* Complete DMA trsnafer interrupt */176dmacHw_INTERRUPT_e errorInterrupt; /* Error interrupt */177dmacHw_CHANNEL_PRIORITY_e channelPriority; /* Channel priority */178dmacHw_FLOW_CONTROL_e flowControler; /* Data flow controller */179} dmacHw_CONFIG_t;180181/****************************************************************************/182/**183* @brief Initializes DMA184*185* This function initializes DMA CSP driver186*187* @note188* Must be called before using any DMA channel189*/190/****************************************************************************/191void dmacHw_initDma(void);192193/****************************************************************************/194/**195* @brief Exit function for DMA196*197* This function isolates DMA from the system198*199*/200/****************************************************************************/201void dmacHw_exitDma(void);202203/****************************************************************************/204/**205* @brief Gets a handle to a DMA channel206*207* This function returns a handle, representing a control block of a particular DMA channel208*209* @return -1 - On Failure210* handle - On Success, representing a channel control block211*212* @note213* None Channel ID must be created using "dmacHw_MAKE_CHANNEL_ID" macro214*/215/****************************************************************************/216dmacHw_HANDLE_t dmacHw_getChannelHandle(dmacHw_ID_t channelId /* [ IN ] DMA Channel Id */217);218219/****************************************************************************/220/**221* @brief Initializes a DMA channel for use222*223* This function initializes and resets a DMA channel for use224*225* @return -1 - On Failure226* 0 - On Success227*228* @note229* None230*/231/****************************************************************************/232int dmacHw_initChannel(dmacHw_HANDLE_t handle /* [ IN ] DMA Channel handle */233);234235/****************************************************************************/236/**237* @brief Estimates number of descriptor needed to perform certain DMA transfer238*239*240* @return On failure : -1241* On success : Number of descriptor count242*243*244*/245/****************************************************************************/246int dmacHw_calculateDescriptorCount(dmacHw_CONFIG_t *pConfig, /* [ IN ] Configuration settings */247void *pSrcAddr, /* [ IN ] Source (Peripheral/Memory) address */248void *pDstAddr, /* [ IN ] Destination (Peripheral/Memory) address */249size_t dataLen /* [ IN ] Data length in bytes */250);251252/****************************************************************************/253/**254* @brief Initializes descriptor ring255*256* This function will initializes the descriptor ring of a DMA channel257*258*259* @return -1 - On failure260* 0 - On success261* @note262* - "len" parameter should be obtained from "dmacHw_descriptorLen"263* - Descriptor buffer MUST be 32 bit aligned and uncached as it264* is accessed by ARM and DMA265*/266/****************************************************************************/267int dmacHw_initDescriptor(void *pDescriptorVirt, /* [ IN ] Virtual address of uncahced buffer allocated to form descriptor ring */268uint32_t descriptorPhyAddr, /* [ IN ] Physical address of pDescriptorVirt (descriptor buffer) */269uint32_t len, /* [ IN ] Size of the pBuf */270uint32_t num /* [ IN ] Number of descriptor in the ring */271);272273/****************************************************************************/274/**275* @brief Finds amount of memory required to form a descriptor ring276*277*278* @return Number of bytes required to form a descriptor ring279*280*281* @note282* None283*/284/****************************************************************************/285uint32_t dmacHw_descriptorLen(uint32_t descCnt /* [ IN ] Number of descriptor in the ring */286);287288/****************************************************************************/289/**290* @brief Configure DMA channel291*292* @return 0 : On success293* -1 : On failure294*/295/****************************************************************************/296int dmacHw_configChannel(dmacHw_HANDLE_t handle, /* [ IN ] DMA Channel handle */297dmacHw_CONFIG_t *pConfig /* [ IN ] Configuration settings */298);299300/****************************************************************************/301/**302* @brief Set descriptors for known data length303*304* When DMA has to work as a flow controller, this function prepares the305* descriptor chain to transfer data306*307* from:308* - Memory to memory309* - Peripheral to memory310* - Memory to Peripheral311* - Peripheral to Peripheral312*313* @return -1 - On failure314* 0 - On success315*316*/317/****************************************************************************/318int dmacHw_setDataDescriptor(dmacHw_CONFIG_t *pConfig, /* [ IN ] Configuration settings */319void *pDescriptor, /* [ IN ] Descriptor buffer */320void *pSrcAddr, /* [ IN ] Source (Peripheral/Memory) address */321void *pDstAddr, /* [ IN ] Destination (Peripheral/Memory) address */322size_t dataLen /* [ IN ] Length in bytes */323);324325/****************************************************************************/326/**327* @brief Indicates whether DMA transfer is in progress or completed328*329* @return DMA transfer status330* dmacHw_TRANSFER_STATUS_BUSY: DMA Transfer ongoing331* dmacHw_TRANSFER_STATUS_DONE: DMA Transfer completed332* dmacHw_TRANSFER_STATUS_ERROR: DMA Transfer error333*334*/335/****************************************************************************/336dmacHw_TRANSFER_STATUS_e dmacHw_transferCompleted(dmacHw_HANDLE_t handle /* [ IN ] DMA Channel handle */337);338339/****************************************************************************/340/**341* @brief Set descriptor carrying control information342*343* This function will be used to send specific control information to the device344* using the DMA channel345*346*347* @return -1 - On failure348* 0 - On success349*350* @note351* None352*/353/****************************************************************************/354int dmacHw_setControlDescriptor(dmacHw_CONFIG_t *pConfig, /* [ IN ] Configuration settings */355void *pDescriptor, /* [ IN ] Descriptor buffer */356uint32_t ctlAddress, /* [ IN ] Address of the device control register */357uint32_t control /* [ IN ] Device control information */358);359360/****************************************************************************/361/**362* @brief Read data DMA transferred to memory363*364* This function will read data that has been DMAed to memory while transferring from:365* - Memory to memory366* - Peripheral to memory367*368* @return 0 - No more data is available to read369* 1 - More data might be available to read370*371*/372/****************************************************************************/373int dmacHw_readTransferredData(dmacHw_HANDLE_t handle, /* [ IN ] DMA Channel handle */374dmacHw_CONFIG_t *pConfig, /* [ IN ] Configuration settings */375void *pDescriptor, /* [ IN ] Descriptor buffer */376void **ppBbuf, /* [ OUT ] Data received */377size_t *pLlen /* [ OUT ] Length of the data received */378);379380/****************************************************************************/381/**382* @brief Prepares descriptor ring, when source peripheral working as a flow controller383*384* This function will form the descriptor ring by allocating buffers, when source peripheral385* has to work as a flow controller to transfer data from:386* - Peripheral to memory.387*388* @return -1 - On failure389* 0 - On success390*391*392* @note393* None394*/395/****************************************************************************/396int dmacHw_setVariableDataDescriptor(dmacHw_HANDLE_t handle, /* [ IN ] DMA Channel handle */397dmacHw_CONFIG_t *pConfig, /* [ IN ] Configuration settings */398void *pDescriptor, /* [ IN ] Descriptor buffer */399uint32_t srcAddr, /* [ IN ] Source peripheral address */400void *(*fpAlloc) (int len), /* [ IN ] Function pointer that provides destination memory */401int len, /* [ IN ] Number of bytes "fpAlloc" will allocate for destination */402int num /* [ IN ] Number of descriptor to set */403);404405/****************************************************************************/406/**407* @brief Program channel register to initiate transfer408*409* @return void410*411*412* @note413* - Descriptor buffer MUST ALWAYS be flushed before calling this function414* - This function should also be called from ISR to program the channel with415* pending descriptors416*/417/****************************************************************************/418void dmacHw_initiateTransfer(dmacHw_HANDLE_t handle, /* [ IN ] DMA Channel handle */419dmacHw_CONFIG_t *pConfig, /* [ IN ] Configuration settings */420void *pDescriptor /* [ IN ] Descriptor buffer */421);422423/****************************************************************************/424/**425* @brief Resets descriptor control information426*427* @return void428*/429/****************************************************************************/430void dmacHw_resetDescriptorControl(void *pDescriptor /* [ IN ] Descriptor buffer */431);432433/****************************************************************************/434/**435* @brief Program channel register to stop transfer436*437* Ensures the channel is not doing any transfer after calling this function438*439* @return void440*441*/442/****************************************************************************/443void dmacHw_stopTransfer(dmacHw_HANDLE_t handle /* [ IN ] DMA Channel handle */444);445446/****************************************************************************/447/**448* @brief Check the existence of pending descriptor449*450* This function confirmes if there is any pending descriptor in the chain451* to program the channel452*453* @return 1 : Channel need to be programmed with pending descriptor454* 0 : No more pending descriptor to programe the channel455*456* @note457* - This function should be called from ISR in case there are pending458* descriptor to program the channel.459*460* Example:461*462* dmac_isr ()463* {464* ...465* if (dmacHw_descriptorPending (handle))466* {467* dmacHw_initiateTransfer (handle);468* }469* }470*471*/472/****************************************************************************/473uint32_t dmacHw_descriptorPending(dmacHw_HANDLE_t handle, /* [ IN ] DMA Channel handle */474void *pDescriptor /* [ IN ] Descriptor buffer */475);476477/****************************************************************************/478/**479* @brief Deallocates source or destination memory, allocated480*481* This function can be called to deallocate data memory that was DMAed successfully482*483* @return -1 - On failure484* 0 - On success485*486* @note487* This function will be called ONLY, when source OR destination address is pointing488* to dynamic memory489*/490/****************************************************************************/491int dmacHw_freeMem(dmacHw_CONFIG_t *pConfig, /* [ IN ] Configuration settings */492void *pDescriptor, /* [ IN ] Descriptor buffer */493void (*fpFree) (void *) /* [ IN ] Function pointer to free data memory */494);495496/****************************************************************************/497/**498* @brief Clears the interrupt499*500* This function clears the DMA channel specific interrupt501*502* @return N/A503*504* @note505* Must be called under the context of ISR506*/507/****************************************************************************/508void dmacHw_clearInterrupt(dmacHw_HANDLE_t handle /* [ IN ] DMA Channel handle */509);510511/****************************************************************************/512/**513* @brief Returns the cause of channel specific DMA interrupt514*515* This function returns the cause of interrupt516*517* @return Interrupt status, each bit representing a specific type of interrupt518* of type dmacHw_INTERRUPT_STATUS_e519* @note520* This function should be called under the context of ISR521*/522/****************************************************************************/523dmacHw_INTERRUPT_STATUS_e dmacHw_getInterruptStatus(dmacHw_HANDLE_t handle /* [ IN ] DMA Channel handle */524);525526/****************************************************************************/527/**528* @brief Indentifies a DMA channel causing interrupt529*530* This functions returns a channel causing interrupt of type dmacHw_INTERRUPT_STATUS_e531*532* @return NULL : No channel causing DMA interrupt533* ! NULL : Handle to a channel causing DMA interrupt534* @note535* dmacHw_clearInterrupt() must be called with a valid handle after calling this function536*/537/****************************************************************************/538dmacHw_HANDLE_t dmacHw_getInterruptSource(void);539540/****************************************************************************/541/**542* @brief Sets channel specific user data543*544* This function associates user data to a specific DMA channel545*546*/547/****************************************************************************/548void dmacHw_setChannelUserData(dmacHw_HANDLE_t handle, /* [ IN ] DMA Channel handle */549void *userData /* [ IN ] User data */550);551552/****************************************************************************/553/**554* @brief Gets channel specific user data555*556* This function returns user data specific to a DMA channel557*558* @return user data559*/560/****************************************************************************/561void *dmacHw_getChannelUserData(dmacHw_HANDLE_t handle /* [ IN ] DMA Channel handle */562);563564/****************************************************************************/565/**566* @brief Displays channel specific registers and other control parameters567*568*569* @return void570*571* @note572* None573*/574/****************************************************************************/575void dmacHw_printDebugInfo(dmacHw_HANDLE_t handle, /* [ IN ] DMA Channel handle */576void *pDescriptor, /* [ IN ] Descriptor buffer */577int (*fpPrint) (const char *, ...) /* [ IN ] Print callback function */578);579580/****************************************************************************/581/**582* @brief Provides DMA controller attributes583*584*585* @return DMA controller attributes586*587* @note588* None589*/590/****************************************************************************/591uint32_t dmacHw_getDmaControllerAttribute(dmacHw_HANDLE_t handle, /* [ IN ] DMA Channel handle */592dmacHw_CONTROLLER_ATTRIB_e attr /* [ IN ] DMA Controller attribute of type dmacHw_CONTROLLER_ATTRIB_e */593);594595#endif /* _DMACHW_H */596597598