EDMA3 Driver Advanced APIs
[EDMA3 Driver APIs]


Functions

EDMA3_DRV_Result EDMA3_DRV_linkChannel (EDMA3_DRV_Handle hEdma, unsigned int lCh1, unsigned int lCh2)
 Link two logical channels.
EDMA3_DRV_Result EDMA3_DRV_unlinkChannel (EDMA3_DRV_Handle hEdma, unsigned int lCh)
 Unlink the channel from the earlier linked logical channel.
EDMA3_DRV_Result EDMA3_DRV_chainChannel (EDMA3_DRV_Handle hEdma, unsigned int lCh1, unsigned int lCh2, const EDMA3_DRV_ChainOptions *chainOptions)
 Chain the two specified channels.
EDMA3_DRV_Result EDMA3_DRV_unchainChannel (EDMA3_DRV_Handle hEdma, unsigned int lCh)
 Unchain the two channels.
EDMA3_DRV_Result EDMA3_DRV_setQdmaTrigWord (EDMA3_DRV_Handle hEdma, unsigned int lCh, EDMA3_RM_QdmaTrigWord trigWord)
 Assign a Trigger Word to the specified QDMA channel.
EDMA3_DRV_Result EDMA3_DRV_setPaRAM (EDMA3_DRV_Handle hEdma, unsigned int lCh, const EDMA3_DRV_PaRAMRegs *newPaRAM)
 Copy the user specified PaRAM Set onto the PaRAM Set associated with the logical channel (DMA/QDMA/Link).
EDMA3_DRV_Result EDMA3_DRV_getPaRAM (EDMA3_DRV_Handle hEdma, unsigned int lCh, EDMA3_DRV_PaRAMRegs *currPaRAM)
 Retrieve existing PaRAM set associated with specified logical channel (DMA/QDMA/Link).
EDMA3_DRV_Result EDMA3_DRV_setPaRAMEntry (EDMA3_DRV_Handle hEdma, unsigned int lCh, EDMA3_DRV_PaRAMEntry paRAMEntry, unsigned int newPaRAMEntryVal)
 Set a particular PaRAM set entry of the specified PaRAM set.
EDMA3_DRV_Result EDMA3_DRV_getPaRAMEntry (EDMA3_DRV_Handle hEdma, unsigned int lCh, EDMA3_DRV_PaRAMEntry paRAMEntry, unsigned int *paRAMEntryVal)
 Get a particular PaRAM set entry of the specified PaRAM set.
EDMA3_DRV_Result EDMA3_DRV_setPaRAMField (EDMA3_DRV_Handle hEdma, unsigned int lCh, EDMA3_DRV_PaRAMField paRAMField, unsigned int newPaRAMFieldVal)
 Set a particular PaRAM set field of the specified PaRAM set.
EDMA3_DRV_Result EDMA3_DRV_getPaRAMField (EDMA3_DRV_Handle hEdma, unsigned int lCh, EDMA3_DRV_PaRAMField paRAMField, unsigned int *currPaRAMFieldVal)
 Get a particular PaRAM set field of the specified PaRAM set.
EDMA3_DRV_Result EDMA3_DRV_setEvtQPriority (EDMA3_DRV_Handle hEdma, const EDMA3_DRV_EvtQuePriority *evtQPriObj)
 Sets EDMA TC priority.
EDMA3_DRV_Result EDMA3_DRV_mapChToEvtQ (EDMA3_DRV_Handle hEdma, unsigned int channelId, EDMA3_RM_EventQueue eventQ)
 Associate Channel to Event Queue.
EDMA3_DRV_Result EDMA3_DRV_getMapChToEvtQ (EDMA3_DRV_Handle hEdma, unsigned int channelId, unsigned int *mappedEvtQ)
 Get the Event Queue mapped to the specified DMA/QDMA channel.
EDMA3_DRV_Result EDMA3_DRV_setCCRegister (EDMA3_DRV_Handle hEdma, unsigned int regOffset, unsigned int newRegValue)
 Set the Channel Controller (CC) Register value.
EDMA3_DRV_Result EDMA3_DRV_getCCRegister (EDMA3_DRV_Handle hEdma, unsigned int regOffset, unsigned int *regValue)
 Get the Channel Controller (CC) Register value.
EDMA3_DRV_Result EDMA3_DRV_waitAndClearTcc (EDMA3_DRV_Handle hEdma, unsigned int tccNo)
 Wait for a transfer completion interrupt to occur and clear it.
EDMA3_DRV_Result EDMA3_DRV_checkAndClearTcc (EDMA3_DRV_Handle hEdma, unsigned int tccNo, unsigned short *tccStatus)
 Returns the status of a previously initiated transfer.
EDMA3_DRV_Result EDMA3_DRV_getPaRAMPhyAddr (EDMA3_DRV_Handle hEdma, unsigned int lCh, unsigned int *paramPhyAddr)
 Get the PaRAM Set Physical Address associated with a logical channel.
EDMA3_DRV_Result EDMA3_DRV_Ioctl (EDMA3_DRV_Handle hEdma, EDMA3_DRV_IoctlCmd cmd, void *cmdArg, void *param)
 EDMA3 Driver IOCTL.
EDMA3_DRV_Handle EDMA3_DRV_getInstHandle (unsigned int phyCtrllerInstId, EDMA3_RM_RegionId regionId, EDMA3_DRV_Result *errorCode)
 Return the previously opened EDMA3 Driver Instance handle.
EDMA3_DRV_Result EDMA3_DRV_registerTccCb (EDMA3_DRV_Handle hEdma, const unsigned int channelId, EDMA3_RM_TccCallback tccCb, void *cbData)
 Registers a transfer completion handler for a specific DMA/QDMA channel.
EDMA3_DRV_Result EDMA3_DRV_unregisterTccCb (EDMA3_DRV_Handle hEdma, const unsigned int channelId)
 Un-register the previously registered callback function against a DMA/QDMA channel.
EDMA3_DRV_Result EDMA3_DRV_setTcErrorInt (unsigned int phyCtrllerInstId, unsigned int tcId, EDMA3_DRV_Tc_Err tcErr)
 Enable/disable specific EDMA3 Transfer Controller Interrupts.
EDMA3_DRV_Result EDMA3_DRV_getChannelStatus (EDMA3_DRV_Handle hEdma, unsigned int lCh, unsigned int *lchStatus)
 Get the current status of the DMA/QDMA channel.
EDMA3_DRV_Result EDMA3_DRV_mapTccLinkCh (EDMA3_DRV_Handle hEdma, unsigned int linkCh, unsigned int tcc)
 Associates a link channel and a TCC.

Function Documentation

EDMA3_DRV_Result EDMA3_DRV_linkChannel ( EDMA3_DRV_Handle  hEdma,
unsigned int  lCh1,
unsigned int  lCh2 
)

Link two logical channels.

This API is used to link two previously allocated logical (DMA/QDMA/Link) channels.

It sets the Link field of the PaRAM set associated with first logical channel (lCh1) to point it to the PaRAM set associated with second logical channel (lCh2).

It also sets the TCC field of PaRAM set of second logical channel to the same as that of the first logical channel, only if the TCC field doesnot contain a valid TCC code. In case the second logical channel has its own TCC, the TCC field remains unchanged.

Parameters:
hEdma [IN] Handle to the EDMA Driver Instance.
lCh1 [IN] Logical Channel to which particular channel will be linked.
lCh2 [IN] Logical Channel which needs to be linked to the first channel. After the transfer based on the PaRAM set of lCh1 is over, the PaRAM set of lCh2 will be copied to the PaRAM set of lCh1 and transfer will resume. For DMA channels, another sync event is required to initiate the transfer on the Link channel.
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
This function is re-entrant for unique lCh1 & lCh2 values. It is non-re-entrant for same lCh1 & lCh2 values.

EDMA3_DRV_Result EDMA3_DRV_unlinkChannel ( EDMA3_DRV_Handle  hEdma,
unsigned int  lCh 
)

Unlink the channel from the earlier linked logical channel.

This function breaks the link between the specified channel and the earlier linked logical channel by clearing the Link Address field.

Parameters:
hEdma [IN] Handle to the EDMA Driver Instance.
lCh [IN] Channel for which linking has to be removed
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
This function is re-entrant for unique lCh values. It is non- re-entrant for same lCh value.

EDMA3_DRV_Result EDMA3_DRV_chainChannel ( EDMA3_DRV_Handle  hEdma,
unsigned int  lCh1,
unsigned int  lCh2,
const EDMA3_DRV_ChainOptions chainOptions 
)

Chain the two specified channels.

This API is used to chain a DMA channel to a previously allocated DMA/QDMA channel.

Chaining is different from Linking. The EDMA3 link feature reloads the current channel parameter set with the linked parameter set. The EDMA3 chaining feature does not modify or update any channel parameter set; it provides a synchronization event (or trigger) to the chained DMA channel, as soon as the transfer (final or intermediate) completes on the main DMA/QDMA channel.

Parameters:
hEdma [IN] Handle to the EDMA Driver Instance.
lCh1 [IN] DMA/QDMA channel to which a particular DMA channel will be chained.
lCh2 [IN] DMA channel which needs to be chained to the first DMA/QDMA channel.
chainOptions [IN] Options such as intermediate interrupts are required or not, intermediate/final chaining is enabled or not etc.
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
This function is re-entrant for unique lCh1 & lCh2 values. It is non-re-entrant for same lCh1 & lCh2 values.

EDMA3_DRV_Result EDMA3_DRV_unchainChannel ( EDMA3_DRV_Handle  hEdma,
unsigned int  lCh 
)

Unchain the two channels.

Parameters:
hEdma [IN] Handle to the EDMA Driver Instance.
lCh [IN] Channel whose chaining with the other channel has to be removed.
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
This function is re-entrant for unique lCh values. It is non- re-entrant for same lCh value.

EDMA3_DRV_Result EDMA3_DRV_setQdmaTrigWord ( EDMA3_DRV_Handle  hEdma,
unsigned int  lCh,
EDMA3_RM_QdmaTrigWord  trigWord 
)

Assign a Trigger Word to the specified QDMA channel.

This API sets the Trigger word for the specific QDMA channel in the QCHMAP Register. Default QDMA trigger word is CCNT.

Parameters:
hEdma [IN] Handle to the EDMA Instance object
lCh [IN] QDMA Channel which needs to be assigned the Trigger Word
trigWord [IN] The Trigger Word for the QDMA channel. Trigger Word is the word in the PaRAM Register Set which, when written to by CPU, will start the QDMA transfer automatically.
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
This function is re-entrant for unique lCh values. It is non- re-entrant for same lCh value.

EDMA3_DRV_Result EDMA3_DRV_setPaRAM ( EDMA3_DRV_Handle  hEdma,
unsigned int  lCh,
const EDMA3_DRV_PaRAMRegs newPaRAM 
)

Copy the user specified PaRAM Set onto the PaRAM Set associated with the logical channel (DMA/QDMA/Link).

This API takes a PaRAM Set as input and copies it onto the actual PaRAM Set associated with the logical channel. OPT field of the PaRAM Set is written first and the CCNT field is written last.

Caution: It should be used carefully when programming the QDMA channels whose trigger words are not CCNT field.

Parameters:
hEdma [IN] Handle to the EDMA Instance object
lCh [IN] Logical Channel for which new PaRAM set is specified
newPaRAM [IN] Parameter RAM set to be copied onto existing PaRAM
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
This function is re-entrant for unique lCh values. It is non- re-entrant for same lCh value.

EDMA3_DRV_Result EDMA3_DRV_getPaRAM ( EDMA3_DRV_Handle  hEdma,
unsigned int  lCh,
EDMA3_DRV_PaRAMRegs currPaRAM 
)

Retrieve existing PaRAM set associated with specified logical channel (DMA/QDMA/Link).

Parameters:
hEdma [IN] Handle to the EDMA Instance object
lCh [IN] Logical Channel whose PaRAM set is requested
currPaRAM [IN/OUT] User gets the existing PaRAM here
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
This function is re-entrant.

EDMA3_DRV_Result EDMA3_DRV_setPaRAMEntry ( EDMA3_DRV_Handle  hEdma,
unsigned int  lCh,
EDMA3_DRV_PaRAMEntry  paRAMEntry,
unsigned int  newPaRAMEntryVal 
)

Set a particular PaRAM set entry of the specified PaRAM set.

Parameters:
hEdma [IN] Handle to the EDMA Driver Instance
lCh [IN] Logical Channel bound to the Parameter RAM set whose specified field needs to be set
paRAMEntry [IN] Specify the PaRAM set entry which needs to be set
newPaRAMEntryVal [IN] The new field setting
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
This API should be used while setting the PaRAM set entry for QDMA channels. If EDMA3_DRV_setPaRAMField () used, it will trigger the QDMA channel before complete PaRAM set entry is written. For DMA channels, no such constraint is there.
This function is re-entrant for unique lCh values. It is non- re-entrant for same lCh value.

EDMA3_DRV_Result EDMA3_DRV_getPaRAMEntry ( EDMA3_DRV_Handle  hEdma,
unsigned int  lCh,
EDMA3_DRV_PaRAMEntry  paRAMEntry,
unsigned int *  paRAMEntryVal 
)

Get a particular PaRAM set entry of the specified PaRAM set.

Parameters:
hEdma [IN] Handle to the EDMA Driver Instance
lCh [IN] Logical Channel bound to the Parameter RAM set whose specified field value is needed
paRAMEntry [IN] Specify the PaRAM set entry which needs to be obtained
paRAMEntryVal [IN/OUT] The value of the field is returned here
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
This function is re-entrant.

EDMA3_DRV_Result EDMA3_DRV_setPaRAMField ( EDMA3_DRV_Handle  hEdma,
unsigned int  lCh,
EDMA3_DRV_PaRAMField  paRAMField,
unsigned int  newPaRAMFieldVal 
)

Set a particular PaRAM set field of the specified PaRAM set.

Parameters:
hEdma [IN] Handle to the EDMA Driver Instance
lCh [IN] Logical Channel bound to the PaRAM set whose specified field needs to be set
paRAMField [IN] Specify the PaRAM set field which needs to be set
newPaRAMFieldVal [IN] The new field setting
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
This API CANNOT be used while setting the PaRAM set field for QDMA channels. It can trigger the QDMA channel before complete PaRAM set ENTRY (4-bytes field) is written (for eg, as soon one sets the ACNT field for QDMA channel, transfer is started, before one modifies the BCNT field). For DMA channels, no such constraint is there.
This function is re-entrant for unique lCh values. It is non- re-entrant for same lCh value.

EDMA3_DRV_Result EDMA3_DRV_getPaRAMField ( EDMA3_DRV_Handle  hEdma,
unsigned int  lCh,
EDMA3_DRV_PaRAMField  paRAMField,
unsigned int *  currPaRAMFieldVal 
)

Get a particular PaRAM set field of the specified PaRAM set.

Parameters:
hEdma [IN] Handle to the EDMA Driver Instance
lCh [IN] Logical Channel bound to the PaRAM set whose specified field value is needed
paRAMField [IN] Specify the PaRAM set field which needs to be obtained
currPaRAMFieldVal [IN/OUT] The value of the field is returned here
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
This function is re-entrant.

EDMA3_DRV_Result EDMA3_DRV_setEvtQPriority ( EDMA3_DRV_Handle  hEdma,
const EDMA3_DRV_EvtQuePriority evtQPriObj 
)

Sets EDMA TC priority.

User can program the priority of the Event Queues at a system-wide level. This means that the user can set the priority of an IO initiated by either of the TCs (Transfer Ctrllers) relative to IO initiated by the other bus masters on the device (ARM, DSP, USB, etc)

Parameters:
hEdma [IN] Handle to the EDMA Driver Instance
evtQPriObj [IN] Priority of the Event Queues
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
This function disables the global interrupts while modifying the global CC Registers, to make it re-entrant.

EDMA3_DRV_Result EDMA3_DRV_mapChToEvtQ ( EDMA3_DRV_Handle  hEdma,
unsigned int  channelId,
EDMA3_RM_EventQueue  eventQ 
)

Associate Channel to Event Queue.

Parameters:
hEdma [IN] Handle to the EDMA Driver Instance
channelId [IN] Logical Channel to which the Event Queue is to be mapped
eventQ [IN] The Event Queue which is to be mapped to the DMA channel
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
There should not be any data transfer going on while setting the mapping. Results could be unpredictable.
This function disables the global interrupts while modifying the global CC Registers, to make it re-entrant.

EDMA3_DRV_Result EDMA3_DRV_getMapChToEvtQ ( EDMA3_DRV_Handle  hEdma,
unsigned int  channelId,
unsigned int *  mappedEvtQ 
)

Get the Event Queue mapped to the specified DMA/QDMA channel.

Parameters:
hEdma [IN] Handle to the EDMA Driver Instance
channelId [IN] Logical Channel whose associated Event Queue is needed
mappedEvtQ [IN/OUT] The Event Queue which is mapped to the DMA/QDMA channel
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
This function is re-entrant.

EDMA3_DRV_Result EDMA3_DRV_setCCRegister ( EDMA3_DRV_Handle  hEdma,
unsigned int  regOffset,
unsigned int  newRegValue 
)

Set the Channel Controller (CC) Register value.

Parameters:
hEdma [IN] Handle to the EDMA Driver Instance
regOffset [IN] CC Register offset whose value needs to be set
newRegValue [IN] New CC Register Value
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
This function is non re-entrant for users using the same EDMA handle i.e. working on the same shadow region. Before modifying a register, it tries to acquire a semaphore (Driver instance specific), to protect simultaneous modification of the same register by two different users. After the successful change, it releases the semaphore. For users working on different shadow regions, thus different EDMA handles, this function is re-entrant.

EDMA3_DRV_Result EDMA3_DRV_getCCRegister ( EDMA3_DRV_Handle  hEdma,
unsigned int  regOffset,
unsigned int *  regValue 
)

Get the Channel Controller (CC) Register value.

Parameters:
hEdma [IN] Handle to the EDMA Driver Instance
regOffset [IN] CC Register offset whose value is needed
regValue [IN/OUT] CC Register Value
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
This function is re-entrant.

EDMA3_DRV_Result EDMA3_DRV_waitAndClearTcc ( EDMA3_DRV_Handle  hEdma,
unsigned int  tccNo 
)

Wait for a transfer completion interrupt to occur and clear it.

This is a blocking function that returns when the IPR/IPRH bit corresponding to the tccNo specified, is SET. It clears the corresponding bit while returning also.

This function waits for the specific bit indefinitely in a tight loop, with out any delay in between. USE IT CAUTIOUSLY.

Parameters:
hEdma [IN] Handle to the EDMA Driver Instance
tccNo [IN] TCC, specific to which the function waits on a IPR/IPRH bit.
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
This function is re-entrant for different tccNo.

EDMA3_DRV_Result EDMA3_DRV_checkAndClearTcc ( EDMA3_DRV_Handle  hEdma,
unsigned int  tccNo,
unsigned short *  tccStatus 
)

Returns the status of a previously initiated transfer.

This is a non-blocking function that returns the status of a previously initiated transfer, based on the IPR/IPRH bit. This bit corresponds to the tccNo specified by the user. It clears the corresponding bit, if SET, while returning also.

Parameters:
hEdma [IN] Handle to the EDMA Driver Instance
tccNo [IN] TCC, specific to which the function checks the status of the IPR/IPRH bit.
tccStatus [IN/OUT] Status of the transfer is returned here. Returns "TRUE" if the transfer has completed (IPR/IPRH bit SET), "FALSE" if the transfer has not completed successfully (IPR/IPRH bit NOT SET).
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
This function is re-entrant for different tccNo.

EDMA3_DRV_Result EDMA3_DRV_getPaRAMPhyAddr ( EDMA3_DRV_Handle  hEdma,
unsigned int  lCh,
unsigned int *  paramPhyAddr 
)

Get the PaRAM Set Physical Address associated with a logical channel.

This function returns the PaRAM Set Phy Address (unsigned 32 bits). The returned address could be used by the advanced users to program the PaRAM Set directly without using any APIs.

Least significant 16 bits of this address could be used to program the LINK field in the PaRAM Set. Users which program the LINK field directly SHOULD use this API to get the associated PaRAM Set address with the LINK channel.

Parameters:
hEdma [IN] Handle to the EDMA Driver Instance
lCh [IN] Logical Channel for which the PaRAM set physical address is required
paramPhyAddr [IN/OUT] PaRAM Set physical address is returned here.
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
This function is re-entrant.

EDMA3_DRV_Result EDMA3_DRV_Ioctl ( EDMA3_DRV_Handle  hEdma,
EDMA3_DRV_IoctlCmd  cmd,
void *  cmdArg,
void *  param 
)

EDMA3 Driver IOCTL.

This function provides IOCTL functionality for EDMA3 Driver.

Parameters:
hEdma [IN] Handle to the EDMA Driver Instance
cmd [IN] IOCTL command to be performed
cmdArg [IN/OUT] IOCTL command argument (if any)
param [IN/OUT] Device/Cmd specific argument
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
For 'EDMA3_DRV_IOCTL_GET_PARAM_CLEAR_OPTION', this function is re-entrant. For 'EDMA3_DRV_IOCTL_SET_PARAM_CLEAR_OPTION', this function is re-entrant for different EDMA3 Driver Instances (handles).

EDMA3_DRV_Handle EDMA3_DRV_getInstHandle ( unsigned int  phyCtrllerInstId,
EDMA3_RM_RegionId  regionId,
EDMA3_DRV_Result *  errorCode 
)

Return the previously opened EDMA3 Driver Instance handle.

This API is used to return the previously opened EDMA3 Driver's Instance Handle (region specific), which could be used to call other EDMA3 Driver APIs. Since EDMA3 Driver does not allow multiple instances, for a single shadow region, this API is provided. This API is meant for users who DO NOT want to / could not open a new Driver Instance and hence re-use the existing Driver Instance to allocate EDMA3 resources and use various other EDMA3 Driver APIs.

In case the Driver Instance is not yet opened, NULL is returned as the function return value whereas EDMA3_DRV_E_INST_NOT_OPENED is returned in the errorCode.

Parameters:
phyCtrllerInstId [IN] EDMA3 Controller Instance Id (Hardware instance id, starting from 0).
regionId [IN] Shadow Region id for which the previously opened driver's instance handle is required.
errorCode [OUT] Error code while returning Driver Instance Handle.
Returns:
EDMA3_DRV_Handle : If successful, this API will return the driver's instance handle.
Note:
1) This API returns the previously opened EDMA3 Driver's Instance handle. The instance, if exists, could have been opened by some other user (most probably) or may be by the same user calling this API. If it was opened by some other user, then that user can very well close this instance anytime, without even knowing that the same instance handle is being used by other users as well. In that case, the handle becomes INVALID and user has to open a valid driver instance for his/her use.
2) This function is re-entrant.

EDMA3_DRV_Result EDMA3_DRV_registerTccCb ( EDMA3_DRV_Handle  hEdma,
const unsigned int  channelId,
EDMA3_RM_TccCallback  tccCb,
void *  cbData 
)

Registers a transfer completion handler for a specific DMA/QDMA channel.

This function registers a non-NULL callback function for a specific DMA or QDMA channel and enables the completion interrupt for the TCC associated with the underlying channel in the IER/IERH register. It also sets the DRAE/DRAEH register for the TCC associated with the specified DMA/QDMA channel. If user enables the transfer completion interrupts (intermediate or final) in the OPT field of the associated PaRAM Set, the registered callback function will be called by the EDMA3 Resource Manager.

If a call-back function is already registered for the channel, the API fails with the error code EDMA3_RM_E_CALLBACK_ALREADY_REGISTERED.

Parameters:
hEdma [IN] Handle to the EDMA Driver Instance.
channelId [IN] DMA/QDMA channel for which the callback function needs to be registered.
tccCb [IN] The callback function to be registered.
cbData [IN] Callback data to be passed while calling the callback function.
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
This function is re-entrant for unique channelId values. It is non- re-entrant for same channelId value.

EDMA3_DRV_Result EDMA3_DRV_unregisterTccCb ( EDMA3_DRV_Handle  hEdma,
const unsigned int  channelId 
)

Un-register the previously registered callback function against a DMA/QDMA channel.

This function un-registers the previously registered callback function for the DMA/QDMA channel by removing any stored callback function. Moreover, it clears the: Interrupt Enable Register (IER/IERH) by writing to the IECR/IECRH register, for the TCC associated with that particular channel, DRA/DRAEH register for the TCC associated with the specified DMA/QDMA channel

Parameters:
hEdma [IN] Handle to the EDMA Driver Instance.
channelId [IN] DMA/QDMA channel for which the callback function needs to be un-registered.
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
This function is re-entrant for unique channelId. It is non-re-entrant for same channelId.

EDMA3_DRV_Result EDMA3_DRV_setTcErrorInt ( unsigned int  phyCtrllerInstId,
unsigned int  tcId,
EDMA3_DRV_Tc_Err  tcErr 
)

Enable/disable specific EDMA3 Transfer Controller Interrupts.

This function allows one to enable/disable specific EDMA3 Transfer Controller Interrupts. Since these interrupts don't get enabled by default, this API can be used to achieve the same.

Parameters:
phyCtrllerInstId [IN] EDMA3 Controller Instance Id (Hardware instance id, starting from 0).
tcId [IN] Transfer Controller Id. It starts from 0 for each EDMA3 hardware and can go upto (TCs available on EDMA3 Hardware - 1).
tcErr [IN] TC Error Interrupts which need to be enabled/disabled.
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error code
Note:
This function is re-entrant for unique combination of EDMA3 hw and TC. It is non-re-entrant for same combination.

EDMA3_DRV_Result EDMA3_DRV_getChannelStatus ( EDMA3_DRV_Handle  hEdma,
unsigned int  lCh,
unsigned int *  lchStatus 
)

Get the current status of the DMA/QDMA channel.

This function returns the current status of the specific DMA/QDMA channel. For a DMA channel, it checks whether an event is pending in ER, transfer completion interrupt is pending in IPR and event miss error interrupt is pending in EMR or not. For a QDMA channel, it checks whether a transfer completion interrupt is pending in IPR and event miss error interrupt is pending in QEMR or not.

Parameters:
hEdma [IN] Handle to the EDMA Driver Instance.
lCh [IN] DMA/QDMA channel for which the current status is required.
lchStatus [IN/OUT]Status of the channel. Defines mentioned above are used (and may be combined) to return the actual status.
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
This function is re-entrant.

EDMA3_DRV_Result EDMA3_DRV_mapTccLinkCh ( EDMA3_DRV_Handle  hEdma,
unsigned int  linkCh,
unsigned int  tcc 
)

Associates a link channel and a TCC.

This API is used to map a TCC to a LINK channel. It should be used with LINK channels ONLY else it will fail. It will copy the TCC code in the OPT field of the param set associated with the link channel.

Parameters:
hEdma [IN] Handle to the EDMA Driver Instance.
linkCh [IN] Link Channel to which a particular TCC needs to be mapped.
tcc [IN] TCC which needs to be mapped.
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error Code
Note:
This function is re-entrant for unique linkCh values. It is non-re-entrant for same linkCh values.


Generated on Wed Apr 7 12:01:42 2010 for EDMA3 Driver by  doxygen 1.5.5