#include "hpm_common.h"#include "hpm_dmamux_drv.h"#include "hpm_dmamux_src.h"#include "hpm_dma_drv.h"#include "hpm_soc_feature.h"Go to the source code of this file.
Data Structures | |
| struct | hpm_dma_mgr_chn_conf |
| struct | hpm_dma_mgr_linked_descriptor |
Typedefs | |
| typedef void(* | dma_mgr_chn_cb_t) (DMA_Type *base, uint32_t channel, void *cb_data_ptr) |
| DMA Channel Interrupt callback. More... | |
| typedef struct _dma_resource | dma_resource_t |
| DMA Resource Structure. More... | |
| typedef struct hpm_dma_mgr_chn_conf | dma_mgr_chn_conf_t |
| typedef struct hpm_dma_mgr_linked_descriptor | dma_mgr_linked_descriptor_t |
Enumerations | |
| enum | { status_dma_mgr_no_resource = MAKE_STATUS(status_group_dma_manager, 0) } |
| DMA Manager status codes. More... | |
Functions | |
| void | dma_mgr_isr_handler (DMA_Type *ptr, uint32_t instance) |
| DMA Manager ISR handler. More... | |
| void | dma_mgr_init (void) |
| Initialize DMA Manager Context. More... | |
| hpm_stat_t | dma_mgr_request_resource (dma_resource_t *resource) |
| Request DMA resource from DMA Manager. More... | |
| hpm_stat_t | dma_mgr_release_resource (const dma_resource_t *resource) |
| Release DMA resource. More... | |
| hpm_stat_t | dma_mgr_enable_dma_irq_with_priority (const dma_resource_t *resource, uint32_t priority) |
| Enable DMA interrupt with priority. More... | |
| hpm_stat_t | dma_mgr_disable_dma_irq (const dma_resource_t *resource) |
| Disable DMA interrupt NOTE: Each DMA instance consists of several DMA channels, disabling the DMA interrupt will disable the global DMA interrupt for all DMA channels. Please be aware of the impact. More... | |
| hpm_stat_t | dma_mgr_install_chn_tc_callback (const dma_resource_t *resource, dma_mgr_chn_cb_t callback, void *user_data) |
| Install Interrupt Callback for DMA channel transfer complete. More... | |
| hpm_stat_t | dma_mgr_install_chn_half_tc_callback (const dma_resource_t *resource, dma_mgr_chn_cb_t callback, void *user_data) |
| Install Interrupt Callback for DMA channel half transfer complete. More... | |
| hpm_stat_t | dma_mgr_install_chn_error_callback (const dma_resource_t *resource, dma_mgr_chn_cb_t callback, void *user_data) |
| Install Interrupt Callback for DMA channel transfer error. More... | |
| hpm_stat_t | dma_mgr_install_chn_abort_callback (const dma_resource_t *resource, dma_mgr_chn_cb_t callback, void *user_data) |
| Install Interrupt Callback for DMA channel transfer abort. More... | |
| void | dma_mgr_get_default_chn_config (dma_mgr_chn_conf_t *config) |
| Get DMA channel default config. More... | |
| hpm_stat_t | dma_mgr_setup_channel (const dma_resource_t *resource, dma_mgr_chn_conf_t *config) |
| Setup channel config. More... | |
| hpm_stat_t | dma_mgr_config_linked_descriptor (const dma_resource_t *resource, dma_mgr_chn_conf_t *config, dma_mgr_linked_descriptor_t *descriptor) |
| Setup chain linked descriptor config. More... | |
| hpm_stat_t | dma_mgr_enable_channel (const dma_resource_t *resource) |
| Enable DMA channel, start transfer. More... | |
| hpm_stat_t | dma_mgr_disable_channel (const dma_resource_t *resource) |
| Disable DMA channel. More... | |
| hpm_stat_t | dma_mgr_check_chn_enable (const dma_resource_t *resource, bool *enable) |
| Check DMA channel enable status. More... | |
| hpm_stat_t | dma_mgr_enable_chn_irq (const dma_resource_t *resource, uint32_t irq_mask) |
| Enable DMA channel interrupt. More... | |
| hpm_stat_t | dma_mgr_disable_chn_irq (const dma_resource_t *resource, uint32_t irq_mask) |
| Disable DMA channel interrupt. More... | |
| hpm_stat_t | dma_mgr_set_chn_priority (const dma_resource_t *resource, uint8_t priority) |
| Set DMA channel priority. More... | |
| hpm_stat_t | dma_mgr_set_chn_src_work_mode (const dma_resource_t *resource, uint8_t mode) |
| Set DMA channel source work mode. More... | |
| hpm_stat_t | dma_mgr_set_chn_dst_work_mode (const dma_resource_t *resource, uint8_t mode) |
| Set DMA channel destination work mode. More... | |
| hpm_stat_t | dma_mgr_set_chn_src_burst_size (const dma_resource_t *resource, uint8_t burstsize) |
| Set DMA channel source burst size. More... | |
| hpm_stat_t | dma_mgr_get_chn_remaining_transize (const dma_resource_t *resource, uint32_t *size) |
| Get DMA channel remaining transfer size. More... | |
| hpm_stat_t | dma_mgr_set_chn_transize (const dma_resource_t *resource, uint32_t size) |
| Set DMA channel transfer size. More... | |
| hpm_stat_t | dma_mgr_set_chn_src_width (const dma_resource_t *resource, uint8_t width) |
| Set DMA channel source width. More... | |
| hpm_stat_t | dma_mgr_set_chn_dst_width (const dma_resource_t *resource, uint8_t width) |
| Set DMA channel destination width. More... | |
| hpm_stat_t | dma_mgr_set_chn_src_addr (const dma_resource_t *resource, uint32_t addr) |
| Set DMA channel source address. More... | |
| hpm_stat_t | dma_mgr_set_chn_dst_addr (const dma_resource_t *resource, uint32_t addr) |
| Set DMA channel destination address. More... | |
| hpm_stat_t | dma_mgr_set_chn_src_addr_ctrl (const dma_resource_t *resource, uint8_t addr_ctrl) |
| Set DMA channel source address control mode. More... | |
| hpm_stat_t | dma_mgr_set_chn_dst_addr_ctrl (const dma_resource_t *resource, uint8_t addr_ctrl) |
| Set DMA channel destination address control mode. More... | |
| hpm_stat_t | dma_mgr_set_chn_infinite_loop_mode (const dma_resource_t *resource, bool infinite_loop) |
| Set DMA channel infinite loop mode. Attention: only DMAV2 support. More... | |
| hpm_stat_t | dma_mgr_set_chn_src_busrt_option (const dma_resource_t *resource, uint8_t burst_opt) |
| Set DMA channel source burst option. Attention: only DMAV2 support. More... | |
| hpm_stat_t | dma_mgr_set_chn_handshake_option (const dma_resource_t *resource, uint8_t handshake_opt) |
| Set DMA channel handshake option. Attention: only DMAV2 support. More... | |
| hpm_stat_t | dma_mgr_abort_chn_transfer (const dma_resource_t *resource) |
| Abort DMA channel transfer. More... | |
| hpm_stat_t | dma_mgr_check_chn_transfer_status (const dma_resource_t *resource, uint32_t *status) |
| Check DMA channel transfer status. More... | |
| hpm_stat_t | dma_mgr_set_source_burst_in_fixed_transize_enable (const dma_resource_t *resource, bool enable) |
| Set DMA channel source burst in fixed transfer size enable or disable. More... | |
| hpm_stat_t | dma_mgr_set_destination_burst_in_fix_transize_enable (const dma_resource_t *resource, bool enable) |
| Set DMA channel destination burst in fixed transfer size enable or disable. More... | |
| hpm_stat_t | dma_mgr_set_swap_mode (const dma_resource_t *resource, uint8_t swap_mode) |
| Set DMA channel swap mode. More... | |
| hpm_stat_t | dma_mgr_set_swap_table (const dma_resource_t *resource, uint32_t swap_table) |
| Set DMA channel swap table. More... | |
| #define DMA_MGR_ADDRESS_CONTROL_DECREMENT DMA_ADDRESS_CONTROL_DECREMENT |
| #define DMA_MGR_ADDRESS_CONTROL_FIXED DMA_ADDRESS_CONTROL_FIXED |
| #define DMA_MGR_ADDRESS_CONTROL_INCREMENT DMA_ADDRESS_CONTROL_INCREMENT |
| #define DMA_MGR_CHANNEL_PRIORITY_HIGH DMA_CHANNEL_PRIORITY_HIGH |
| #define DMA_MGR_CHANNEL_PRIORITY_LOW DMA_CHANNEL_PRIORITY_LOW |
| #define DMA_MGR_CHANNEL_STATUS_ABORT DMA_CHANNEL_STATUS_ABORT |
| #define DMA_MGR_CHANNEL_STATUS_ERROR DMA_CHANNEL_STATUS_ERROR |
| #define DMA_MGR_CHANNEL_STATUS_HALF_TC 0 |
| #define DMA_MGR_CHANNEL_STATUS_ONGOING DMA_CHANNEL_STATUS_ONGOING |
| #define DMA_MGR_CHANNEL_STATUS_TC DMA_CHANNEL_STATUS_TC |
| #define DMA_MGR_HANDSHAKE_MODE_HANDSHAKE DMA_HANDSHAKE_MODE_HANDSHAKE |
| #define DMA_MGR_HANDSHAKE_MODE_NORMAL DMA_HANDSHAKE_MODE_NORMAL |
| #define DMA_MGR_HANDSHAKE_OPT_ALL_TRANSIZE 0 |
| #define DMA_MGR_HANDSHAKE_OPT_ONE_BURST 0 |
| #define DMA_MGR_INTERRUPT_MASK_ABORT DMA_INTERRUPT_MASK_ABORT |
| #define DMA_MGR_INTERRUPT_MASK_ALL DMA_INTERRUPT_MASK_ALL |
| #define DMA_MGR_INTERRUPT_MASK_ERROR DMA_INTERRUPT_MASK_ERROR |
| #define DMA_MGR_INTERRUPT_MASK_HALF_TC 0 |
| #define DMA_MGR_INTERRUPT_MASK_NONE DMA_INTERRUPT_MASK_NONE |
| #define DMA_MGR_INTERRUPT_MASK_TC DMA_INTERRUPT_MASK_TERMINAL_COUNT |
| #define DMA_MGR_NUM_TRANSFER_PER_BURST_1024T DMA_NUM_TRANSFER_PER_BURST_1024T |
| #define DMA_MGR_NUM_TRANSFER_PER_BURST_128T DMA_NUM_TRANSFER_PER_BURST_128T |
| #define DMA_MGR_NUM_TRANSFER_PER_BURST_16T DMA_NUM_TRANSFER_PER_BURST_16T |
| #define DMA_MGR_NUM_TRANSFER_PER_BURST_1T DMA_NUM_TRANSFER_PER_BURST_1T |
| #define DMA_MGR_NUM_TRANSFER_PER_BURST_256T DMA_NUM_TRANSFER_PER_BURST_256T |
| #define DMA_MGR_NUM_TRANSFER_PER_BURST_2T DMA_NUM_TRANSFER_PER_BURST_2T |
| #define DMA_MGR_NUM_TRANSFER_PER_BURST_32T DMA_NUM_TRANSFER_PER_BURST_32T |
| #define DMA_MGR_NUM_TRANSFER_PER_BURST_4T DMA_NUM_TRANSFER_PER_BURST_4T |
| #define DMA_MGR_NUM_TRANSFER_PER_BURST_512T DMA_NUM_TRANSFER_PER_BURST_512T |
| #define DMA_MGR_NUM_TRANSFER_PER_BURST_64T DMA_NUM_TRANSFER_PER_BURST_64T |
| #define DMA_MGR_NUM_TRANSFER_PER_BURST_8T DMA_NUM_TRANSFER_PER_BURST_8T |
| #define DMA_MGR_SRC_BURST_OPT_CUSTOM_SIZE 0 |
| #define DMA_MGR_SRC_BURST_OPT_STANDAND_SIZE 0 |
| #define DMA_MGR_SWAP_MODE_BYTE 0 |
| #define DMA_MGR_SWAP_MODE_HALF_WORD 0 |
| #define DMA_MGR_SWAP_MODE_TABLE 0 |
| #define DMA_MGR_SWAP_MODE_WORD 0 |
| #define DMA_MGR_TRANSFER_WIDTH_BYTE DMA_TRANSFER_WIDTH_BYTE |
| #define DMA_MGR_TRANSFER_WIDTH_DOUBLE_WORD DMA_TRANSFER_WIDTH_DOUBLE_WORD |
| #define DMA_MGR_TRANSFER_WIDTH_HALF_WORD DMA_TRANSFER_WIDTH_HALF_WORD |
| #define DMA_MGR_TRANSFER_WIDTH_WORD DMA_TRANSFER_WIDTH_WORD |
| typedef void(* dma_mgr_chn_cb_t) (DMA_Type *base, uint32_t channel, void *cb_data_ptr) |
DMA Channel Interrupt callback.
| [in] | DMA | base address |
| [in] | channel | DMA channel index |
| [in/out] | cb_data_ptr callback Data pointer |
| typedef struct hpm_dma_mgr_chn_conf dma_mgr_chn_conf_t |
| typedef struct hpm_dma_mgr_linked_descriptor dma_mgr_linked_descriptor_t |
| typedef struct _dma_resource dma_resource_t |
DMA Resource Structure.
| anonymous enum |
| hpm_stat_t dma_mgr_abort_chn_transfer | ( | const dma_resource_t * | resource | ) |
Abort DMA channel transfer.
| [in] | resource | DMA resource |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_check_chn_enable | ( | const dma_resource_t * | resource, |
| bool * | enable | ||
| ) |
Check DMA channel enable status.
| [in] | resource | DMA resource |
| [out] | enable | enable status |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_check_chn_transfer_status | ( | const dma_resource_t * | resource, |
| uint32_t * | status | ||
| ) |
Check DMA channel transfer status.
| [in] | resource | DMA resource |
| [out] | sts | transfer status DMA_MGR_CHANNEL_STATUS_ONGOING if transfer is still ongoing DMA_MGR_CHANNEL_STATUS_ERROR if any error occurred during transferring DMA_MGR_CHANNEL_STATUS_ABORT if transfer is aborted DMA_MGR_CHANNEL_STATUS_TC if transfer is finished without error DMA_MGR_CHANNEL_STATUS_HALF_TC if half transfer complete without error. Attention: only DMAV2 support |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_config_linked_descriptor | ( | const dma_resource_t * | resource, |
| dma_mgr_chn_conf_t * | config, | ||
| dma_mgr_linked_descriptor_t * | descriptor | ||
| ) |
Setup chain linked descriptor config.
| [in] | resource | DMA resource |
| [in] | config | DMA channel config |
| [out] | descriptor | linked descriptor config data pointer |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_disable_channel | ( | const dma_resource_t * | resource | ) |
Disable DMA channel.
| [in] | resource | DMA resource |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_disable_chn_irq | ( | const dma_resource_t * | resource, |
| uint32_t | irq_mask | ||
| ) |
Disable DMA channel interrupt.
| [in] | resource | DMA resource |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_disable_dma_irq | ( | const dma_resource_t * | resource | ) |
Disable DMA interrupt NOTE: Each DMA instance consists of several DMA channels, disabling the DMA interrupt will disable the global DMA interrupt for all DMA channels. Please be aware of the impact.
| [in] | resource | DMA resource |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_enable_channel | ( | const dma_resource_t * | resource | ) |
Enable DMA channel, start transfer.
| [in] | resource | DMA resource |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_enable_chn_irq | ( | const dma_resource_t * | resource, |
| uint32_t | irq_mask | ||
| ) |
Enable DMA channel interrupt.
| [in] | resource | DMA resource |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_enable_dma_irq_with_priority | ( | const dma_resource_t * | resource, |
| uint32_t | priority | ||
| ) |
Enable DMA interrupt with priority.
| [in] | resource | DMA resource |
| [in] | priority | Interrupt Priority |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_get_chn_remaining_transize | ( | const dma_resource_t * | resource, |
| uint32_t * | size | ||
| ) |
Get DMA channel remaining transfer size.
| [in] | resource | DMA resource |
| [out] | size | remaining transfer size of the channel. |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| void dma_mgr_get_default_chn_config | ( | dma_mgr_chn_conf_t * | config | ) |
Get DMA channel default config.
| [out] | config | config data pointer |
| void dma_mgr_init | ( | void | ) |
Initialize DMA Manager Context.
| hpm_stat_t dma_mgr_install_chn_abort_callback | ( | const dma_resource_t * | resource, |
| dma_mgr_chn_cb_t | callback, | ||
| void * | user_data | ||
| ) |
Install Interrupt Callback for DMA channel transfer abort.
| [in] | resource | DMA resource |
| [in] | callback | Interrupt callback for DMA resource |
| [in] | user_data | User data used in the callback |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_install_chn_error_callback | ( | const dma_resource_t * | resource, |
| dma_mgr_chn_cb_t | callback, | ||
| void * | user_data | ||
| ) |
Install Interrupt Callback for DMA channel transfer error.
| [in] | resource | DMA resource |
| [in] | callback | Interrupt callback for DMA resource |
| [in] | user_data | User data used in the callback |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_install_chn_half_tc_callback | ( | const dma_resource_t * | resource, |
| dma_mgr_chn_cb_t | callback, | ||
| void * | user_data | ||
| ) |
Install Interrupt Callback for DMA channel half transfer complete.
| [in] | resource | DMA resource |
| [in] | callback | Interrupt callback for DMA resource |
| [in] | user_data | User data used in the callback |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_install_chn_tc_callback | ( | const dma_resource_t * | resource, |
| dma_mgr_chn_cb_t | callback, | ||
| void * | user_data | ||
| ) |
Install Interrupt Callback for DMA channel transfer complete.
| [in] | resource | DMA resource |
| [in] | callback | Interrupt callback for DMA resource |
| [in] | user_data | User data used in the callback |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| void dma_mgr_isr_handler | ( | DMA_Type * | ptr, |
| uint32_t | instance | ||
| ) |
DMA Manager ISR handler.
| hpm_stat_t dma_mgr_release_resource | ( | const dma_resource_t * | resource | ) |
Release DMA resource.
| [in] | resource | DMA resource |
| status_success | if no error occurred |
| status_invalid_argument | if the parameter is invalid |
| hpm_stat_t dma_mgr_request_resource | ( | dma_resource_t * | resource | ) |
Request DMA resource from DMA Manager.
| [out] | resource | DMA resource |
| status_success | if no error occurred |
| status_invalid_argument | if the parameter is invalid |
| status_dma_mgr_no_resource | if all DMA channels are occupied; |
| hpm_stat_t dma_mgr_set_chn_dst_addr | ( | const dma_resource_t * | resource, |
| uint32_t | addr | ||
| ) |
Set DMA channel destination address.
| [in] | resource | DMA resource |
| [in] | addr | destination address |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_set_chn_dst_addr_ctrl | ( | const dma_resource_t * | resource, |
| uint8_t | addr_ctrl | ||
| ) |
Set DMA channel destination address control mode.
| [in] | resource | DMA resource |
| [in] | addr_ctrl | destination address control mode |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_set_chn_dst_width | ( | const dma_resource_t * | resource, |
| uint8_t | width | ||
| ) |
Set DMA channel destination width.
| [in] | resource | DMA resource |
| [in] | width | transfer destination width of the channel |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_set_chn_dst_work_mode | ( | const dma_resource_t * | resource, |
| uint8_t | mode | ||
| ) |
Set DMA channel destination work mode.
| [in] | resource | DMA resource |
| [in] | mode | DMA destination work mode |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_set_chn_handshake_option | ( | const dma_resource_t * | resource, |
| uint8_t | handshake_opt | ||
| ) |
Set DMA channel handshake option. Attention: only DMAV2 support.
| [in] | resource | DMA resource |
| [in] | handshake_opt | handshake option |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_set_chn_infinite_loop_mode | ( | const dma_resource_t * | resource, |
| bool | infinite_loop | ||
| ) |
Set DMA channel infinite loop mode. Attention: only DMAV2 support.
| [in] | resource | DMA resource |
| [in] | infinite_loop | false - normal mode(single times mode); true - infinite loop mode(cycle mode) |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_set_chn_priority | ( | const dma_resource_t * | resource, |
| uint8_t | priority | ||
| ) |
Set DMA channel priority.
| [in] | resource | DMA resource |
| [in] | priority | DMA channel priority
|
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_set_chn_src_addr | ( | const dma_resource_t * | resource, |
| uint32_t | addr | ||
| ) |
Set DMA channel source address.
| [in] | resource | DMA resource |
| [in] | addr | source address |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_set_chn_src_addr_ctrl | ( | const dma_resource_t * | resource, |
| uint8_t | addr_ctrl | ||
| ) |
Set DMA channel source address control mode.
| [in] | resource | DMA resource |
| [in] | addr_ctrl | source address control mode |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_set_chn_src_burst_size | ( | const dma_resource_t * | resource, |
| uint8_t | burstsize | ||
| ) |
Set DMA channel source burst size.
| [in] | resource | DMA resource |
| [in] | burstsize | DMA source burst size when BURSTOPT is 0, please reference follows:
|
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_set_chn_src_busrt_option | ( | const dma_resource_t * | resource, |
| uint8_t | burst_opt | ||
| ) |
Set DMA channel source burst option. Attention: only DMAV2 support.
| [in] | resource | DMA resource |
| [in] | burst_opt | burst option |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_set_chn_src_width | ( | const dma_resource_t * | resource, |
| uint8_t | width | ||
| ) |
Set DMA channel source width.
| [in] | resource | DMA resource |
| [in] | width | transfer source width of the channel |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_set_chn_src_work_mode | ( | const dma_resource_t * | resource, |
| uint8_t | mode | ||
| ) |
Set DMA channel source work mode.
| [in] | resource | DMA resource |
| [in] | mode | DMA source work mode |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_set_chn_transize | ( | const dma_resource_t * | resource, |
| uint32_t | size | ||
| ) |
Set DMA channel transfer size.
| [in] | resource | DMA resource |
| [in] | size | transfer size of the channel. |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |
| hpm_stat_t dma_mgr_set_destination_burst_in_fix_transize_enable | ( | const dma_resource_t * | resource, |
| bool | enable | ||
| ) |
Set DMA channel destination burst in fixed transfer size enable or disable.
| [in] | resource | DMA resource |
| [in] | enable | false - disable; true - enable |
| hpm_stat_t dma_mgr_set_source_burst_in_fixed_transize_enable | ( | const dma_resource_t * | resource, |
| bool | enable | ||
| ) |
Set DMA channel source burst in fixed transfer size enable or disable.
| [in] | resource | DMA resource |
| [in] | enable | false - disable; true - enable |
| hpm_stat_t dma_mgr_set_swap_mode | ( | const dma_resource_t * | resource, |
| uint8_t | swap_mode | ||
| ) |
Set DMA channel swap mode.
| [in] | resource | DMA resource |
| [in] | swap_mode | swap mode |
| hpm_stat_t dma_mgr_set_swap_table | ( | const dma_resource_t * | resource, |
| uint32_t | swap_table | ||
| ) |
Set DMA channel swap table.
| [in] | resource | DMA resource |
| [in] | swap_table | swap table |
| hpm_stat_t dma_mgr_setup_channel | ( | const dma_resource_t * | resource, |
| dma_mgr_chn_conf_t * | config | ||
| ) |
Setup channel config.
| [in] | resource | DMA resource |
| [in] | config | DMA channel config |
| status_success | if no error occurred |
| status_invalid_argument | if any parameters are invalid |