VSF Documented
|
Go to the source code of this file.
Data Structures | |
struct | vsf_dma_isr_t |
struct | vsf_dma_channel_cfg_t |
dma configuration More... | |
struct | vsf_dma_channel_status_t |
struct | vsf_dma_capability_t |
struct | vsf_dma_op_t |
struct | vsf_dma_t |
Macros | |
#define | VSF_DMA_CFG_MULTI_CLASS ENABLED |
Enable multi-class support by default for maximum availability. | |
#define | VSF_DMA_CFG_PREFIX vsf |
We can redefine macro VSF_DMA_CFG_PREFIX to specify a prefix to call a specific driver directly in the application code. | |
#define | VSF_DMA_CFG_FUNCTION_RENAME ENABLED |
Disable VSF_DMA_CFG_FUNCTION_RENAME to use the original function names (e.g., vsf_dma_init()). | |
#define | VSF_DMA_CFG_REIMPLEMENT_TYPE_CHANNEL_MODE DISABLED |
Enable the option to reimplement channel mode type in specific hardware drivers. | |
#define | VSF_DMA_CFG_REIMPLEMENT_TYPE_IRQ_MASK DISABLED |
Enable the option to reimplement interrupt mask type in specific hardware drivers. | |
#define | VSF_DMA_CFG_REIMPLEMENT_TYPE_CHANNEL_CFG DISABLED |
Enable the option to reimplement channel configuration type. For compatibility, do not delete members when redefining vsf_dma_channel_cfg_t. | |
#define | VSF_DMA_CFG_REIMPLEMENT_TYPE_CFG DISABLED |
Enable the option to reimplement DMA configuration type. For compatibility, do not delete members when redefining vsf_dma_cfg_t The vsf_dma_isr_handler_t type also needs to be redefined. | |
#define | VSF_DMA_CFG_REIMPLEMENT_TYPE_CAPABILITY DISABLED |
Enable the option to reimplement capability type. For compatibility, do not delete members when redefining vsf_dma_capability_t. | |
#define | VSF_DMA_CFG_INHERIT_HAL_CAPABILITY ENABLED |
Enable inheriting HAL capability to reuse common capability definitions. | |
#define | VSF_DMA_APIS(__prefix_name) |
DMA API template, used to generate DMA type, specific prefix function declarations, etc. | |
Typedefs | |
typedef enum vsf_dma_channel_mode_t | vsf_dma_channel_mode_t |
typedef enum vsf_dma_irq_mask_t | vsf_dma_irq_mask_t |
typedef struct vsf_dma_t | vsf_dma_t |
typedef void | vsf_dma_isr_handler_t(void *target_ptr, vsf_dma_t *dma_ptr, int8_t channel, vsf_dma_irq_mask_t irq_mask) |
typedef struct vsf_dma_isr_t | vsf_dma_isr_t |
typedef struct vsf_dma_channel_cfg_t | vsf_dma_channel_cfg_t |
dma configuration | |
typedef struct vsf_dma_channel_status_t | vsf_dma_channel_status_t |
typedef struct vsf_dma_capability_t | vsf_dma_capability_t |
typedef struct vsf_dma_op_t | vsf_dma_op_t |
Functions | |
vsf_err_t | vsf_dma_init (vsf_dma_t *dma_ptr) |
Initialize a DMA instance. | |
void | vsf_dma_fini (vsf_dma_t *dma_ptr) |
Finalize a DMA instance. | |
vsf_dma_capability_t | vsf_dma_capability (vsf_dma_t *dma_ptr) |
Get the capabilities of DMA instance. | |
int8_t | vsf_dma_channel_request (vsf_dma_t *dma_ptr) |
DMA request a new channel. | |
void | vsf_dma_channel_release (vsf_dma_t *dma_ptr, int8_t channel) |
Release a DMA channel. | |
vsf_err_t | vsf_dma_channel_config (vsf_dma_t *dma_ptr, int8_t channel, vsf_dma_channel_cfg_t *cfg_ptr) |
Configure a DMA channel. | |
vsf_err_t | vsf_dma_channel_start (vsf_dma_t *dma_ptr, int8_t channel, uint32_t src_address, uint32_t dst_address, uint32_t count) |
Start a DMA channel transfer. | |
vsf_err_t | vsf_dma_channel_cancel (vsf_dma_t *dma_ptr, int8_t channel) |
Cancel the transmission of a specific DMA channel. | |
uint32_t | vsf_dma_channel_get_transferred_count (vsf_dma_t *dma_ptr, int8_t channel) |
Get the counter of bytes transferred for a specific DMA channel. | |
vsf_dma_channel_status_t | vsf_dma_channel_status (vsf_dma_t *dma_ptr, int8_t channel) |
Get status of a DMA channel. | |
#define VSF_DMA_CFG_MULTI_CLASS ENABLED |
Enable multi-class support by default for maximum availability.
#define VSF_DMA_CFG_PREFIX vsf |
We can redefine macro VSF_DMA_CFG_PREFIX to specify a prefix to call a specific driver directly in the application code.
#define VSF_DMA_CFG_FUNCTION_RENAME ENABLED |
Disable VSF_DMA_CFG_FUNCTION_RENAME to use the original function names (e.g., vsf_dma_init()).
#define VSF_DMA_CFG_REIMPLEMENT_TYPE_CHANNEL_MODE DISABLED |
Enable the option to reimplement channel mode type in specific hardware drivers.
#define VSF_DMA_CFG_REIMPLEMENT_TYPE_IRQ_MASK DISABLED |
Enable the option to reimplement interrupt mask type in specific hardware drivers.
#define VSF_DMA_CFG_REIMPLEMENT_TYPE_CHANNEL_CFG DISABLED |
Enable the option to reimplement channel configuration type. For compatibility, do not delete members when redefining vsf_dma_channel_cfg_t.
#define VSF_DMA_CFG_REIMPLEMENT_TYPE_CFG DISABLED |
Enable the option to reimplement DMA configuration type. For compatibility, do not delete members when redefining vsf_dma_cfg_t The vsf_dma_isr_handler_t type also needs to be redefined.
#define VSF_DMA_CFG_REIMPLEMENT_TYPE_CAPABILITY DISABLED |
Enable the option to reimplement capability type. For compatibility, do not delete members when redefining vsf_dma_capability_t.
#define VSF_DMA_CFG_INHERIT_HAL_CAPABILITY ENABLED |
Enable inheriting HAL capability to reuse common capability definitions.
#define VSF_DMA_APIS | ( | __prefix_name | ) |
DMA API template, used to generate DMA type, specific prefix function declarations, etc.
[in] | __prefix_name | The prefix used for generating DMA functions. |
typedef enum vsf_dma_channel_mode_t vsf_dma_channel_mode_t |
typedef enum vsf_dma_irq_mask_t vsf_dma_irq_mask_t |
typedef void vsf_dma_isr_handler_t(void *target_ptr, vsf_dma_t *dma_ptr, int8_t channel, vsf_dma_irq_mask_t irq_mask) |
typedef struct vsf_dma_isr_t vsf_dma_isr_t |
typedef struct vsf_dma_channel_cfg_t vsf_dma_channel_cfg_t |
dma configuration
typedef struct vsf_dma_channel_status_t vsf_dma_channel_status_t |
typedef struct vsf_dma_capability_t vsf_dma_capability_t |
typedef struct vsf_dma_op_t vsf_dma_op_t |
anonymous enum |
enum vsf_dma_irq_mask_t |
Initialize a DMA instance.
[in] | dma_ptr | a pointer to structure vsf_dma_t |
|
extern |
|
extern |
Get the capabilities of DMA instance.
[in] | dma_ptr | a pointer to structure vsf_dma_t |
DMA request a new channel.
[in] | dma_ptr | a pointer to structure vsf_dma_t |
Release a DMA channel.
[in] | dma_ptr | a pointer to structure vsf_dma_t |
[in] | channel | channel number |
|
extern |
Configure a DMA channel.
[in] | dma_ptr | a pointer to structure vsf_dma_t |
[in] | channel | channel number |
[in] | cfg_ptr | a pointer to DMA channel configuration |
|
extern |
Start a DMA channel transfer.
[in] | dma_ptr | a pointer to structure vsf_dma_t |
[in] | channel | channel number |
[in] | src_address | source address |
[in] | dst_address | destination address |
[in] | count | counter of data to be transferred (in byte) |
Cancel the transmission of a specific DMA channel.
[in] | dma_ptr | a pointer to structure vsf_dma_t |
[in] | channel | channel number |
Get the counter of bytes transferred for a specific DMA channel.
[in] | dma_ptr | a pointer to structure vsf_dma_t |
[in] | channel | channel number |
|
extern |
Get status of a DMA channel.
[in] | dma_ptr | a pointer to structure vsf_dma_t |
[in] | channel | channel number |