VSF Documented
|
Go to the source code of this file.
Data Structures | |
struct | vsf_dac_channel_cfg_t |
dac channel configuration More... | |
struct | vsf_dac_isr_t |
DAC interrupt configuration structure. More... | |
struct | vsf_dac_cfg_t |
DAC configuration structure. More... | |
struct | vsf_dac_status_t |
DAC status structure that can be reimplemented in specific HAL drivers. More... | |
struct | vsf_dac_capability_t |
DAC capability structure that can be reimplemented in specific HAL drivers. More... | |
struct | vsf_dac_op_t |
struct | vsf_dac_t |
Macros | |
#define | VSF_DAC_CFG_MULTI_CLASS ENABLED |
Enable multi-class support by default for maximum availability. | |
#define | VSF_DAC_CFG_PREFIX vsf |
Define DAC hardware mask if count is defined. | |
#define | VSF_DAC_CFG_FUNCTION_RENAME ENABLED |
Disable VSF_DAC_CFG_FUNCTION_RENAME to use the original function names (e.g., vsf_dac_init()). | |
#define | VSF_DAC_CFG_REIMPLEMENT_TYPE_IRQ_MASK DISABLED |
Enable VSF_DAC_CFG_REIMPLEMENT_TYPE_IRQ_MASK to reimplement interrupt mask type vsf_dac_irq_mask_t in specific hardware drivers. | |
#define | VSF_DAC_CFG_REIMPLEMENT_TYPE_CHANNEL_CFG DISABLED |
Enable VSF_DAC_CFG_REIMPLEMENT_TYPE_CHANNEL_CFG to reimplement channel configuration type vsf_dac_channel_cfg_t in specific hardware drivers. For compatibility, do not delete members when redefining vsf_dac_channel_cfg_t. | |
#define | VSF_DAC_CFG_REIMPLEMENT_TYPE_CFG DISABLED |
Enable VSF_DAC_CFG_REIMPLEMENT_TYPE_CFG to reimplement DAC configuration type vsf_dac_cfg_t in specific hardware drivers. For compatibility, do not delete members when redefining vsf_dac_cfg_t. The vsf_dac_isr_handler_t type also needs to be redefined. | |
#define | VSF_DAC_CFG_REIMPLEMENT_TYPE_CAPABILITY DISABLED |
Enable VSF_DAC_CFG_REIMPLEMENT_TYPE_CAPABILITY to reimplement capability type vsf_dac_capability_t in specific hardware drivers. For compatibility, do not delete members when redefining vsf_dac_capability_t. | |
#define | VSF_DAC_CFG_INHERIT_HAL_CAPABILITY ENABLED |
In specific hardware driver, we can enable macro VSF_DAC_CFG_INHERIT_HAL_CAPABILITY to inherit structure vsf_peripheral_capability_t. | |
#define | VSF_DAC_APIS(__prefix_name) |
DAC API template, used to generate DAC type, specific prefix function declarations, etc. | |
Typedefs | |
typedef enum vsf_dac_irq_mask_t | vsf_dac_irq_mask_t |
Predefined VSF DAC interrupts that can be reimplemented in specific HAL drivers. Even if the hardware doesn't support these features, these interrupts must be kept: | |
typedef struct vsf_dac_channel_cfg_t | vsf_dac_channel_cfg_t |
dac channel configuration | |
typedef struct vsf_dac_t | vsf_dac_t |
typedef void | vsf_dac_isr_handler_t(void *target_ptr, vsf_dac_t *dac_ptr, vsf_dac_irq_mask_t irq_mask) |
DAC interrupt handler function type. | |
typedef struct vsf_dac_isr_t | vsf_dac_isr_t |
DAC interrupt configuration structure. | |
typedef struct vsf_dac_cfg_t | vsf_dac_cfg_t |
DAC configuration structure. | |
typedef struct vsf_dac_status_t | vsf_dac_status_t |
DAC status structure that can be reimplemented in specific HAL drivers. | |
typedef struct vsf_dac_capability_t | vsf_dac_capability_t |
DAC capability structure that can be reimplemented in specific HAL drivers. | |
typedef struct vsf_dac_op_t | vsf_dac_op_t |
Enumerations | |
enum | vsf_dac_irq_mask_t { VSF_DAC_IRQ_MASK_IDLE = (0x01ul << 0) , VSF_DAC_IRQ_MASK_CPL = (0x1ul << 0) } |
Predefined VSF DAC interrupts that can be reimplemented in specific HAL drivers. Even if the hardware doesn't support these features, these interrupts must be kept: More... | |
enum | { VSF_DAC_IRQ_COUNT = 2 , VSF_DAC_IRQ_ALL_BITS_MASK = VSF_DAC_IRQ_MASK_IDLE | VSF_DAC_IRQ_MASK_CPL } |
Functions | |
vsf_err_t | vsf_dac_init (vsf_dac_t *dac_ptr, vsf_dac_cfg_t *cfg_ptr) |
Initialize a DAC instance. | |
void | vsf_dac_fini (vsf_dac_t *dac_ptr) |
Finalize a DAC instance. | |
fsm_rt_t | vsf_dac_enable (vsf_dac_t *dac_ptr) |
Enable a DAC instance. | |
fsm_rt_t | vsf_dac_disable (vsf_dac_t *dac_ptr) |
Disable a DAC instance. | |
void | vsf_dac_irq_enable (vsf_dac_t *dac_ptr, vsf_dac_irq_mask_t irq_mask) |
Enable interrupt masks of DAC instance. | |
void | vsf_dac_irq_disable (vsf_dac_t *dac_ptr, vsf_dac_irq_mask_t irq_mask) |
Disable interrupt masks of DAC instance. | |
vsf_dac_status_t | vsf_dac_status (vsf_dac_t *dac_ptr) |
Get the status of DAC instance. | |
vsf_dac_capability_t | vsf_dac_capability (vsf_dac_t *dac_ptr) |
Get the capability of DAC instance. | |
vsf_err_t | vsf_dac_channel_request_once (vsf_dac_t *dac_ptr, vsf_dac_channel_cfg_t *channel_cfg, uint_fast16_t value) |
DAC request convert once. | |
vsf_err_t | vsf_dac_channel_config (vsf_dac_t *dac_ptr, vsf_dac_channel_cfg_t *cfgs_ptr, uint_fast8_t cnt) |
DAC channel configuration. | |
vsf_err_t | vsf_dac_channel_request (vsf_dac_t *dac_ptr, void *buffer_ptr, uint_fast32_t count) |
DAC channel request. | |
#define VSF_DAC_CFG_MULTI_CLASS ENABLED |
Enable multi-class support by default for maximum availability.
#define VSF_DAC_CFG_PREFIX vsf |
Define DAC hardware mask if count is defined.
Define DAC hardware count if mask is defined.
We can redefine macro VSF_DAC_CFG_PREFIX to specify a prefix to call a specific driver directly in the application code.
#define VSF_DAC_CFG_FUNCTION_RENAME ENABLED |
Disable VSF_DAC_CFG_FUNCTION_RENAME to use the original function names (e.g., vsf_dac_init()).
#define VSF_DAC_CFG_REIMPLEMENT_TYPE_IRQ_MASK DISABLED |
Enable VSF_DAC_CFG_REIMPLEMENT_TYPE_IRQ_MASK to reimplement interrupt mask type vsf_dac_irq_mask_t in specific hardware drivers.
#define VSF_DAC_CFG_REIMPLEMENT_TYPE_CHANNEL_CFG DISABLED |
Enable VSF_DAC_CFG_REIMPLEMENT_TYPE_CHANNEL_CFG to reimplement channel configuration type vsf_dac_channel_cfg_t in specific hardware drivers. For compatibility, do not delete members when redefining vsf_dac_channel_cfg_t.
#define VSF_DAC_CFG_REIMPLEMENT_TYPE_CFG DISABLED |
Enable VSF_DAC_CFG_REIMPLEMENT_TYPE_CFG to reimplement DAC configuration type vsf_dac_cfg_t in specific hardware drivers. For compatibility, do not delete members when redefining vsf_dac_cfg_t. The vsf_dac_isr_handler_t type also needs to be redefined.
#define VSF_DAC_CFG_REIMPLEMENT_TYPE_CAPABILITY DISABLED |
Enable VSF_DAC_CFG_REIMPLEMENT_TYPE_CAPABILITY to reimplement capability type vsf_dac_capability_t in specific hardware drivers. For compatibility, do not delete members when redefining vsf_dac_capability_t.
#define VSF_DAC_CFG_INHERIT_HAL_CAPABILITY ENABLED |
In specific hardware driver, we can enable macro VSF_DAC_CFG_INHERIT_HAL_CAPABILITY to inherit structure vsf_peripheral_capability_t.
#define VSF_DAC_APIS | ( | __prefix_name | ) |
DAC API template, used to generate DAC type, specific prefix function declarations, etc.
[in] | __prefix_name | The prefix used for generating DAC functions. |
typedef enum vsf_dac_irq_mask_t vsf_dac_irq_mask_t |
Predefined VSF DAC interrupts that can be reimplemented in specific HAL drivers. Even if the hardware doesn't support these features, these interrupts must be kept:
typedef struct vsf_dac_channel_cfg_t vsf_dac_channel_cfg_t |
dac channel configuration
Configuration structure for DAC channel
typedef void vsf_dac_isr_handler_t(void *target_ptr, vsf_dac_t *dac_ptr, vsf_dac_irq_mask_t irq_mask) |
DAC interrupt handler function type.
[in] | target_ptr | User defined target pointer |
[in] | dac_ptr | DAC instance pointer |
[in] | irq_mask | Interrupt mask |
typedef struct vsf_dac_isr_t vsf_dac_isr_t |
DAC interrupt configuration structure.
typedef struct vsf_dac_cfg_t vsf_dac_cfg_t |
DAC configuration structure.
typedef struct vsf_dac_status_t vsf_dac_status_t |
DAC status structure that can be reimplemented in specific HAL drivers.
typedef struct vsf_dac_capability_t vsf_dac_capability_t |
DAC capability structure that can be reimplemented in specific HAL drivers.
typedef struct vsf_dac_op_t vsf_dac_op_t |
enum vsf_dac_irq_mask_t |
|
extern |
Initialize a DAC instance.
[in] | dac_ptr | a pointer to structure vsf_dac_t |
[in] | cfg_ptr | a pointer to structure vsf_dac_cfg_t |
|
extern |
Enable a DAC instance.
[in] | dac_ptr | a pointer to structure vsf_dac_t |
Disable a DAC instance.
[in] | dac_ptr | a pointer to structure vsf_dac_t |
|
extern |
Enable interrupt masks of DAC instance.
[in] | dac_ptr | a pointer to structure vsf_dac_t |
[in] | irq_mask | one or more value of enum vsf_dac_irq_mask_t, vsf_dac_irq_mask_t |
|
extern |
Disable interrupt masks of DAC instance.
[in] | dac_ptr | a pointer to structure vsf_dac_t |
[in] | irq_mask | one or more value of enum vsf_dac_irq_mask_t, vsf_dac_irq_mask_t |
|
extern |
Get the status of DAC instance.
[in] | dac_ptr | a pointer to structure vsf_dac_t |
|
extern |
Get the capability of DAC instance.
[in] | dac_ptr | a pointer to structure vsf_dac_t |
|
extern |
DAC request convert once.
[in] | dac_ptr | a pointer to structure vsf_dac_t |
[in] | channel_cfg | a pointer to convert channel configuration |
[in] | value | value to be converted |
|
extern |
DAC channel configuration.
[in] | dac_ptr | a pointer to structure vsf_dac_t |
[in] | cfgs_ptr | convert channel configuration array |
[in] | cnt | the length of convert channel configuration array |
|
extern |
DAC channel request.
[in] | dac_ptr | a pointer to structure vsf_dac_t |
[out] | buffer_ptr | convert channel data array |
[in] | count | the length of convert channel configuration data array |