📄 csl_idma.h
字号:
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
Uint32 cnt1;
// Initialize IDMA Channel 1
// Set Chan 1 to have Priority 7 and Interrupt Event Gen On
...
cnt1 = IDMA1_init( IDMA_PRI_7, IDMA_INT_EN);
@endverbatim
* ============================================================================
*/
int IDMA1_init (
IDMA_priSet priority,
IDMA_intEn interr
);
/**
@}
*/
/**
@defgroup CSL_IDMA1_COPY_API IDMA1 Copy API
@ingroup CSL_IDMA_FUNCTION
@{*/
/** ===========================================================================
* @n@b IDMA1_copy
*
* @b Description
* @n IDMA1_copy() transfers "byteCnt" bytes from a source "src"
* to a destination "dst". It is assumed that both the source and
* destination addresses are in internal memory. Transfers from
* addresses that are not in the internal memory will raise an
* exception. No checking is performed by this function to check
* the correctness of any of the passed in arguments.
*
* Used to transfer "byteCnt" bytes from source "src" to destination "dst"
*
* @b Arguments
* @verbatim
src Pointer to the source address
dst Pointer to the destination address
byteCnt Number of bytes to be transferred.
@endverbatim
*
* <b> Return Value </b> IDMA handle status.
* @li zero
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n The hardware registers of IDMA.
*
* @b Example
* @verbatim
Uint32 src;
Uint32 dst;
...
// Copy src to dst1 - 80 bytes - 20 words
IDMA1_copy(src, dst1, 80);
@endverbatim
* ============================================================================
*/
int IDMA1_copy (
unsigned int *src,
unsigned int *dst,
unsigned int byteCnt
);
/**
@}
*/
/**
@defgroup CSL_IDMA1_FILL_API IDMA1 Fill API
@ingroup CSL_IDMA_FUNCTION
@{*/
/** ===========================================================================
* @n@b IDMA1_fill
*
* @b Description
* @n IDMA1_fill() Takes a fill value in "fill_value" and fills
* "byteCnt" bytes of the "fill_value" to destination "dst".
*
* Used to write "byteCnt" bytes of the fill value "fill_value" to
* destination "dst"
*
* @b Arguments
* @verbatim
dst Pointer to the destination address
byteCnt Number of bytes to be transferred.
fill_value Data to be filled
@endverbatim
*
* <b> Return Value </b> IDMA handle status.
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n The hardware registers of IDMA.
*
* @b Example
* @verbatim
Uint32 dst1;
...
IDMA1_fill(dst1, 0x800, 0xAAAABABA);
@endverbatim
* ============================================================================
*/
int IDMA1_fill (
unsigned int *dst,
unsigned int byteCnt,
unsigned int fill_value
);
/**
@}
*/
/**
@defgroup CSL_IDMA1_GET_STATUS_API IDMA1 Get Status API
@ingroup CSL_IDMA_FUNCTION
@{*/
/** ===========================================================================
* @n@b IDMA1_getStatus
*
* @b Description
* @n IDMA1_getStatus() gets the active and pending status of IMDA
* Channel 1 and returns ACTV in the least significant bit and PEND
* in the 2nd least significant bit
*
* Gets the active and pending status of IDMA channel 1
*
* @b Arguments
* @n None
*
* <b> Return Value </b> IDMA channel 1 status.
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
Uint32 stat;
...
stat = IDMA1_getStatus();
@endverbatim
* ============================================================================
*/
Uint32 IDMA1_getStatus(void);
/**
@}
*/
/**
@defgroup CSL_IDMA1_WAIT_API IDMA1 Wait API
@ingroup CSL_IDMA_FUNCTION
@{*/
/** ===========================================================================
* @n@b IDMA1_wait
*
* @b Description
* @n IDMA1_wait() waits until all previous transfers for IDMA Channel
* 1 have been completed by making sure that both active and pend
* bits are zero. These are the two least significant bits of the
* status register for the channel.
*
* Waits until previous transfers have completed for IDMA channel 1
* before returning.
*
* @b Arguments
* @n None
*
* <b> Return Value </b>
* @n None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
Uint32 stat;
...
stat = IDMA1_getStatus();
IDMA1_wait();
@endverbatim
* ============================================================================
*/
void IDMA1_wait(void);
/**
@}
*/
/**
@defgroup CSL_IDMA1_SET_PRIORITY_API IDMA1 Set Priority API
@ingroup CSL_IDMA_FUNCTION
@{*/
/** ===========================================================================
* @n@b IDMA1_setPriority
*
* @b Description
* @n IDMA1_setPriority() sets a "3-bit" priority field which has
* a valid range of 0-7 for priorities 0-7. It returns the a
* "32-bit" count register field back to the user. This 32-bit
* register field will be used in IDMA1_copy() and IDMA1_fill()
* to program the Priority and Interrupt options for IDMA Chan 1
*
* Sets the priority level for IDMA channel 1 transfers
*
* @b Arguments
* @verbatim
priority Priority 0-7 of handle
@endverbatim
*
* <b> Return Value </b> idma1_handle_priv.cnt
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
Uint32 tempCnt;
...
// Set and test Priority level for IDMA1
tempCnt = IDMA1_setPriority(IDMA_PRI_2);
@endverbatim
* ============================================================================
*/
int IDMA1_setPriority(
IDMA_priSet priority
);
/**
@}
*/
/**
@defgroup CSL_IDMA1_SET_PRIORITY_API IDMA1 Set Priority API
@ingroup CSL_IDMA_FUNCTION
@{*/
/** ===========================================================================
* @n@b IDMA1_setInt
*
* @b Description
* @n IDMA1_setInt() sets a the interrupt enable field which
* is used to enable/disable interrupts for IDMA Channel 1.
* It returns the a "32-bit" count register field back to the
* user. This 32-bit register field will be used in IDMA1_copy()
* and IDMA1_fill() to program the Priority and Interrupt options
* for IDMA Channel 1
*
* Enables/Disables interrupt event generation for IDMA channel 1
* transfers
*
* @b Arguments
* @verbatim
interr interrupt event generated on/off
@endverbatim
*
* <b> Return Value </b> idma1_handle_priv.cnt
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
Uint32 tempCnt;
...
// Set and test Interrupt event gen for IDMA1
tempCnt = IDMA1_setInt(IDMA_INT_DIS);
@endverbatim
* ============================================================================
*/
int IDMA1_setInt(
IDMA_intEn interr
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -