Go to the source code of this file.
Data Structures | |
| struct | dma_linked_descriptor |
| Linked descriptor. More... | |
| struct | dma_channel_config |
| struct | dma_handshake_config |
Typedefs | |
| typedef struct dma_linked_descriptor | dma_linked_descriptor_t |
| Linked descriptor. More... | |
| typedef struct dma_channel_config | dma_channel_config_t |
| typedef struct dma_handshake_config | dma_handshake_config_t |
Enumerations | |
| enum | { dmav2_state_idle = 0 , dmav2_state_read , dmav2_state_read_ack , dmav2_state_write , dmav2_state_write_ack , dmav2_state_ll , dmav2_state_end , dmav2_state_end_wait } |
| enum | { status_dma_transfer_done = ((uint32_t)( status_group_dma )*1000U + (uint32_t)( 0 )) , status_dma_transfer_error = ((uint32_t)( status_group_dma )*1000U + (uint32_t)( 1 )) , status_dma_transfer_abort = ((uint32_t)( status_group_dma )*1000U + (uint32_t)( 2 )) , status_dma_transfer_ongoing = ((uint32_t)( status_group_dma )*1000U + (uint32_t)( 3 )) , status_dma_alignment_error = ((uint32_t)( status_group_dma )*1000U + (uint32_t)( 4 )) , status_dma_transfer_half_done = ((uint32_t)( status_group_dma )*1000U + (uint32_t)( 5 )) } |
Functions | |
| static void | dma_reset (DMAV2_Type *ptr) |
| Reset DMA. More... | |
| static hpm_stat_t | dma_enable_channel (DMAV2_Type *ptr, uint32_t ch_index) |
| Enable DMA channel. More... | |
| static void | dma_disable_channel (DMAV2_Type *ptr, uint32_t ch_index) |
| Disable DMA channel. More... | |
| static bool | dma_channel_is_enable (DMAV2_Type *ptr, uint32_t ch_index) |
| Check whether DMA channel is enable. More... | |
| static void | dma_set_priority (DMAV2_Type *ptr, uint32_t ch_index, uint8_t priority) |
| Set DMA channel priority. More... | |
| static void | dma_set_source_work_mode (DMAV2_Type *ptr, uint32_t ch_index, uint8_t mode) |
| Set DMA channel source work mode. More... | |
| static void | dma_set_destination_work_mode (DMAV2_Type *ptr, uint32_t ch_index, uint8_t mode) |
| Set DMA channel destination work mode. More... | |
| static void | dma_set_source_burst_size (DMAV2_Type *ptr, uint32_t ch_index, uint8_t burstsize) |
| Set DMA channel source burst size. More... | |
| static uint32_t | dma_get_remaining_transfer_size (DMAV2_Type *ptr, uint32_t ch_index) |
| Get DMA channel remaining transfer size. More... | |
| static void | dma_set_transfer_size (DMAV2_Type *ptr, uint32_t ch_index, uint32_t size_in_width) |
| Set DMA channel transfer size. More... | |
| static void | dma_set_source_width (DMAV2_Type *ptr, uint32_t ch_index, uint8_t width) |
| Set DMA channel source width. More... | |
| static void | dma_set_destination_width (DMAV2_Type *ptr, uint32_t ch_index, uint8_t width) |
| Set DMA channel destination width. More... | |
| static void | dma_set_transfer_src_width_byte_size (DMAV2_Type *ptr, uint32_t ch_index, uint8_t src_width, uint32_t size_in_byte) |
| Set DMA channel transfer width and size in byte. More... | |
| static void | dma_set_source_address (DMAV2_Type *ptr, uint32_t ch_index, uint32_t addr) |
| Set DMA channel source address. More... | |
| static void | dma_set_destination_address (DMAV2_Type *ptr, uint32_t ch_index, uint32_t addr) |
| Set DMA channel destination address. More... | |
| static void | dma_set_source_address_ctrl (DMAV2_Type *ptr, uint32_t ch_index, uint8_t addr_ctrl) |
| Set DMA channel source address control mode. More... | |
| static void | dma_set_destination_address_ctrl (DMAV2_Type *ptr, uint32_t ch_index, uint8_t addr_ctrl) |
| Set DMA channel destination address control mode. More... | |
| static void | dma_set_infinite_loop_mode (DMAV2_Type *ptr, uint32_t ch_index, bool infinite_loop) |
| Set DMA channel infinite loop mode. More... | |
| static void | dma_set_src_busrt_option (DMAV2_Type *ptr, uint32_t ch_index, uint8_t burst_opt) |
| Set DMA channel source burst option. More... | |
| static void | dma_set_handshake_option (DMAV2_Type *ptr, uint32_t ch_index, uint8_t handshake_opt) |
| Set DMA channel handshake option. More... | |
| static void | dma_abort_channel (DMAV2_Type *ptr, uint32_t ch_index_mask) |
| Abort channel transfer with mask. More... | |
| static uint32_t | dma_check_enabled_channel (DMAV2_Type *ptr, uint32_t ch_index_mask) |
| Check if channels are enabled with mask. More... | |
| static bool | dma_has_linked_pointer_configured (DMAV2_Type *ptr, uint32_t ch_index) |
| Check if linked pointer has been configured. More... | |
| static uint32_t | dma_check_transfer_status (DMAV2_Type *ptr, uint8_t ch_index) |
| Check transfer status. More... | |
| static void | dma_clear_transfer_status (DMAV2_Type *ptr, uint8_t ch_index) |
| Clear transfer status. More... | |
| static void | dma_enable_channel_interrupt (DMAV2_Type *ptr, uint8_t ch_index, int32_t interrupt_mask) |
| Enable DMA Channel interrupt. More... | |
| static void | dma_disable_channel_interrupt (DMAV2_Type *ptr, uint8_t ch_index, int32_t interrupt_mask) |
| Disable DMA Channel interrupt. More... | |
| static uint32_t | dma_check_channel_interrupt_mask (DMAV2_Type *ptr, uint8_t ch_index) |
| Check Channel interrupt master. More... | |
| void | dma_default_channel_config (DMAV2_Type *ptr, dma_channel_config_t *ch) |
| Get default channel config. More... | |
| hpm_stat_t | dma_setup_channel (DMAV2_Type *ptr, uint8_t ch_num, dma_channel_config_t *ch, bool start_transfer) |
| Setup DMA channel. More... | |
| hpm_stat_t | dma_config_linked_descriptor (DMAV2_Type *ptr, dma_linked_descriptor_t *descriptor, uint8_t ch_num, dma_channel_config_t *config) |
| Config linked descriptor function. More... | |
| hpm_stat_t | dma_start_memcpy (DMAV2_Type *ptr, uint8_t ch_num, uint32_t dst, uint32_t src, uint32_t size_in_byte, uint32_t burst_len_in_byte) |
| Start DMA copy. More... | |
| void | dma_default_handshake_config (DMAV2_Type *ptr, dma_handshake_config_t *config) |
| Get default handshake config. More... | |
| hpm_stat_t | dma_setup_handshake (DMAV2_Type *ptr, dma_handshake_config_t *pconfig, bool start_transfer) |
| config dma handshake function More... | |
| static bool | dma_is_idle (DMAV2_Type *ptr) |
| Check whether DMA is idle. More... | |