TMPM4KxA Group Peripheral Driver User Manual  V1.0.4.0
Functions
DMA Exported Functions

Functions

TXZ_Result dma_init (dma_t *p_obj)
 Initialize the DMA object. More...
 
TXZ_Result dma_deinit (dma_t *p_obj)
 Release the DMA object. More...
 
TXZ_Result dma_get_error (dma_t *p_obj, uint32_t *p_err)
 Get Error. More...
 
TXZ_Result dma_clear_error (dma_t *p_obj)
 Clear Error. More...
 
void dma_error_irq_handler (dma_t *p_obj)
 Error IRQ handler. More...
 
void dma_irq_handler (dma_t *p_obj, uint32_t ch)
 IRQ handler. More...
 
TXZ_Result dma_ch_init (dma_t *p_obj, uint32_t ch)
 Initialize the DMA channel object. More...
 
TXZ_Result dma_ch_deinit (dma_t *p_obj, uint32_t ch)
 Release the DMA channel object. More...
 
TXZ_Result dma_startIt (dma_t *p_obj, uint32_t ch, dma_cfg_t *p_cfg)
 Start DMA mode. More...
 
TXZ_Result dma_stopIt (dma_t *p_obj, uint32_t ch)
 Stop DMA mode. More...
 
TXZ_Result dma_sw_request (dma_t *p_obj, uint32_t ch)
 DMA Request Self Trigger. More...
 
TXZ_Result dma_normal_startIt (dma_t *p_obj, uint32_t ch, uint32_t burst, dma_normal_cfg_t *p_cfg)
 Start DMA normal mode. More...
 
TXZ_Result dma_normal_stopIt (dma_t *p_obj, uint32_t ch)
 Stop DMA normal mode. More...
 
TXZ_Result dma_normal_cnt_startIt (dma_t *p_obj, uint32_t ch, uint32_t burst, dma_cnt_cfg_t *p_cfg)
 Start DMA DMA Continuation mode. More...
 
TXZ_Result dma_normal_cnt_stopIt (dma_t *p_obj, uint32_t ch)
 Stop DMA DMA Continuation mode. More...
 
TXZ_Result dma_cnt_chain_startIt (dma_t *p_obj, uint32_t ch, uint32_t burst, dma_chain_cfg_t *p_cfg)
 Start DMA Continuation Chain mode. More...
 
TXZ_Result dma_cnt_chain_stopIt (dma_t *p_obj, uint32_t ch)
 Stop DMA Continuation Chain mode. More...
 
TXZ_Result dma_chain_startIt (dma_t *p_obj, uint32_t ch, uint32_t burst, dma_chain_cfg_t *p_cfg)
 Start DMA Chain mode. More...
 
TXZ_Result dma_chain_stopIt (dma_t *p_obj, uint32_t ch)
 Stop DMA Chain mode. More...
 

Detailed Description

Function Documentation

◆ dma_ch_deinit()

TXZ_Result dma_ch_deinit ( dma_t p_obj,
uint32_t  ch 
)

Release the DMA channel object.

Parameters
p_obj:DMA object.
ch:Channel.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
-
Attention
This function is not available in interrupt.

◆ dma_ch_init()

TXZ_Result dma_ch_init ( dma_t p_obj,
uint32_t  ch 
)

Initialize the DMA channel object.

Parameters
p_obj:DMA object.
ch:Channel.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
-
Attention
This function is not available in interrupt.

◆ dma_chain_startIt()

TXZ_Result dma_chain_startIt ( dma_t p_obj,
uint32_t  ch,
uint32_t  burst,
dma_chain_cfg_t p_cfg 
)

Start DMA Chain mode.

Parameters
p_obj:DMA object.
ch:Channel.
burst:Use burst. Use Burst.
p_cfg:config.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
-
Attention
This function is not available in interrupt.

◆ dma_chain_stopIt()

TXZ_Result dma_chain_stopIt ( dma_t p_obj,
uint32_t  ch 
)

Stop DMA Chain mode.

Parameters
p_obj:DMA object.
ch:Channel.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
-
Attention
This function is not available in interrupt.

◆ dma_clear_error()

TXZ_Result dma_clear_error ( dma_t p_obj)

Clear Error.

Parameters
p_obj:DMA object.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
-
Attention
-

◆ dma_cnt_chain_startIt()

TXZ_Result dma_cnt_chain_startIt ( dma_t p_obj,
uint32_t  ch,
uint32_t  burst,
dma_chain_cfg_t p_cfg 
)

Start DMA Continuation Chain mode.

Parameters
p_obj:DMA object.
ch:Channel.
burst:Use burst. Use Burst.
p_cfg:config.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
-
Attention
This function is not available in interrupt.

◆ dma_cnt_chain_stopIt()

TXZ_Result dma_cnt_chain_stopIt ( dma_t p_obj,
uint32_t  ch 
)

Stop DMA Continuation Chain mode.

Parameters
p_obj:DMA object.
ch:Channel.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
-
Attention
This function is not available in interrupt.

◆ dma_deinit()

TXZ_Result dma_deinit ( dma_t p_obj)

Release the DMA object.

Parameters
p_obj:DMA object.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
-
Attention
This function is not available in interrupt.

◆ dma_error_irq_handler()

void dma_error_irq_handler ( dma_t p_obj)

Error IRQ handler.

Parameters
p_obj:DMA object.
Return values
-
Note
-
Attention
-

◆ dma_get_error()

TXZ_Result dma_get_error ( dma_t p_obj,
uint32_t *  p_err 
)

Get Error.

Error bits.

Bit Bit Symbol Function
31-1 - -
0 err_clr Bus Error.
Parameters
p_obj:DMA object.
p_err:Destination address.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
-
Attention
-

◆ dma_init()

TXZ_Result dma_init ( dma_t p_obj)

Initialize the DMA object.

Parameters
p_obj:DMA object.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
-
Attention
This function is not available in interrupt.

◆ dma_irq_handler()

void dma_irq_handler ( dma_t p_obj,
uint32_t  ch 
)

IRQ handler.

Parameters
p_obj:DMA object.
ch:Channel.
Return values
-
Note
-
Attention
-

◆ dma_normal_cnt_startIt()

TXZ_Result dma_normal_cnt_startIt ( dma_t p_obj,
uint32_t  ch,
uint32_t  burst,
dma_cnt_cfg_t p_cfg 
)

Start DMA DMA Continuation mode.

Parameters
p_obj:DMA object.
ch:Channel.
burst:Use burst. Use Burst.
p_cfg:config.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
-
Attention
This function is not available in interrupt.

◆ dma_normal_cnt_stopIt()

TXZ_Result dma_normal_cnt_stopIt ( dma_t p_obj,
uint32_t  ch 
)

Stop DMA DMA Continuation mode.

Parameters
p_obj:DMA object.
ch:Channel.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
-
Attention
This function is not available in interrupt.

◆ dma_normal_startIt()

TXZ_Result dma_normal_startIt ( dma_t p_obj,
uint32_t  ch,
uint32_t  burst,
dma_normal_cfg_t p_cfg 
)

Start DMA normal mode.

Parameters
p_obj:DMA object.
ch:Channel.
burst:Use burst. Use Burst.
p_cfg:config.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
-
Attention
This function is not available in interrupt.

◆ dma_normal_stopIt()

TXZ_Result dma_normal_stopIt ( dma_t p_obj,
uint32_t  ch 
)

Stop DMA normal mode.

Parameters
p_obj:DMA object.
ch:Channel.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
-
Attention
This function is not available in interrupt.

◆ dma_startIt()

TXZ_Result dma_startIt ( dma_t p_obj,
uint32_t  ch,
dma_cfg_t p_cfg 
)

Start DMA mode.

Parameters
p_obj:DMA object.
ch:Channel.
p_cfg:config.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
-
Attention
This function is not available in interrupt.

◆ dma_stopIt()

TXZ_Result dma_stopIt ( dma_t p_obj,
uint32_t  ch 
)

Stop DMA mode.

Parameters
p_obj:DMA object.
ch:Channel.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
-
Attention
This function is not available in interrupt.

◆ dma_sw_request()

TXZ_Result dma_sw_request ( dma_t p_obj,
uint32_t  ch 
)

DMA Request Self Trigger.

Parameters
p_obj:DMA object.
ch:Channel.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
-