|
VSF Documented
|
Go to the source code of this file.
Data Structures | |
| struct | vsf_dma_cfg_t |
| Configuration structure for DMA. More... | |
| struct | vsf_dma_channel_hint_t |
| DMA channel hint structure. More... | |
| struct | vsf_dma_isr_t |
| struct | vsf_dma_channel_cfg_t |
| dma configuration More... | |
| struct | vsf_dma_channel_sg_desc_t |
| DMA scatter-gather descriptor structure. 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_CFG_TYPE_CFG DISABLED |
| Enable the option to reimplement CFG type configuration in specific hardware drivers. | |
| #define | VSF_DMA_CFG_REIMPLEMENT_TYPE_CHANNEL_HINT DISABLED |
| Enable the option to reimplement Channal Hint type configuration 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_CHANNEL_SG_CFG DISABLED |
| Enable the option to reimplement DMA channel scatter-gather configuration type. | |
| #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_CHANNEL_SG_ARRAY(__NAME, __COUNT, ...) |
| DMA scatter-gather configuration macro. | |
| #define | VSF_DMA_CHANNEL_SG_ITEM(__MODE, __SRC_ADDR, __DST_ADDR, __CNT, ...) |
| DMA scatter-gather item configuration macro. | |
| #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_cfg_t | vsf_dma_cfg_t |
| Configuration structure for DMA. | |
| typedef struct vsf_dma_channel_hint_t | vsf_dma_channel_hint_t |
| DMA channel hint structure. | |
| 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_sg_desc_t | vsf_dma_channel_sg_desc_t |
| DMA scatter-gather descriptor structure. | |
| 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, vsf_dma_cfg_t *cfg_ptr) |
| Initialize a DMA instance. | |
| void | vsf_dma_fini (vsf_dma_t *dma_ptr) |
| Finalize a DMA instance. | |
| vsf_err_t | vsf_dma_get_configuration (vsf_dma_t *dma_ptr, vsf_dma_cfg_t *cfg_ptr) |
| Get the current configuration of 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, vsf_dma_channel_hint_t *channel_hint_ptr) |
| DMA request a new channel. | |
| void | vsf_dma_channel_release (vsf_dma_t *dma_ptr, uint8_t channel) |
| Release a DMA channel. | |
| vsf_err_t | vsf_dma_channel_config (vsf_dma_t *dma_ptr, uint8_t channel, vsf_dma_channel_cfg_t *cfg_ptr) |
| Configure a DMA channel. | |
| vsf_err_t | vsf_dma_channel_get_configuration (vsf_dma_t *dma_ptr, uint8_t channel, vsf_dma_channel_cfg_t *cfg_ptr) |
| Get the current configuration of a DMA channel. | |
| vsf_err_t | vsf_dma_channel_start (vsf_dma_t *dma_ptr, uint8_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, uint8_t channel) |
| Cancel the transmission of a specific DMA channel. | |
| vsf_err_t | vsf_dma_channel_sg_config_desc (vsf_dma_t *dma_ptr, uint8_t channel, vsf_dma_isr_t isr, vsf_dma_channel_sg_desc_t *sg_desc_ptr, uint32_t sg_count) |
| Configure a DMA channel for scatter-gather transfer. | |
| vsf_err_t | vsf_dma_channel_sg_start (vsf_dma_t *dma_ptr, uint8_t channel) |
| Start a DMA scatter-gather transfer. | |
| uint32_t | vsf_dma_channel_get_transferred_count (vsf_dma_t *dma_ptr, uint8_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, uint8_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_CFG_TYPE_CFG DISABLED |
Enable the option to reimplement CFG type configuration in specific hardware drivers.
| #define VSF_DMA_CFG_REIMPLEMENT_TYPE_CHANNEL_HINT DISABLED |
Enable the option to reimplement Channal Hint type configuration 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_CHANNEL_SG_CFG DISABLED |
Enable the option to reimplement DMA channel scatter-gather configuration type.
| #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_CHANNEL_SG_ARRAY | ( | __NAME, | |
| __COUNT, | |||
| ... | |||
| ) |
DMA scatter-gather configuration macro.
| #define VSF_DMA_CHANNEL_SG_ITEM | ( | __MODE, | |
| __SRC_ADDR, | |||
| __DST_ADDR, | |||
| __CNT, | |||
| ... | |||
| ) |
DMA scatter-gather item configuration macro.
| #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 struct vsf_dma_cfg_t vsf_dma_cfg_t |
Configuration structure for DMA.
| typedef struct vsf_dma_channel_hint_t vsf_dma_channel_hint_t |
DMA channel hint structure.
| 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_sg_desc_t vsf_dma_channel_sg_desc_t |
DMA scatter-gather descriptor structure.
| 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 |
|
extern |
Initialize a DMA instance.
| [in] | dma_ptr | a pointer to structure vsf_dma_t |
| [in] | cfg_ptr | a pointer to structure vsf_dma_cfg_t |
|
extern |
|
extern |
Get the current configuration of DMA instance.
| [in] | dma_ptr | a pointer to structure vsf_dma_t |
| [out] | cfg_ptr | a pointer to structure vsf_dma_cfg_t to store the current configuration |
|
extern |
Get the capabilities of DMA instance.
| [in] | dma_ptr | a pointer to structure vsf_dma_t |
|
extern |
DMA request a new channel.
| [in] | dma_ptr | a pointer to structure vsf_dma_t |
| [in] | channel_hint_ptr | a pointer to DMA channel hint |
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 |
Get the current configuration of a DMA channel.
| [in] | dma_ptr | a pointer to structure vsf_dma_t |
| [in] | channel | channel number |
| [out] | cfg_ptr | a pointer to structure vsf_dma_channel_cfg_t to store the current 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 |
|
extern |
Configure a DMA channel for scatter-gather transfer.
| [in] | dma_ptr | a pointer to structure vsf_dma_t |
| [in] | channel | channel number |
| [in] | isr | DMA interrupt handler |
| [in] | cfg_ptr | a pointer to DMA channel scatter-gather configuration |
| [in] | sg_count | number of scatter-gather configurations |
Start a DMA scatter-gather transfer.
| [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 |