HPM SDK
HPMicro Software Development Kit
hpm_dac_drv.c File Reference
#include "hpm_dac_drv.h"

Functions

void dac_get_default_config (dac_config_t *config)
 Get default DAC configuration. More...
 
hpm_stat_t dac_init (DAC_Type *ptr, dac_config_t *config)
 Initialize DAC. More...
 
hpm_stat_t dac_set_step_config (DAC_Type *ptr, uint8_t step_cfg_idx, dac_step_config_t *config)
 Set DAC step mode configuration. More...
 
hpm_stat_t dac_set_buffer_config (DAC_Type *ptr, dac_buffer_config_t *config)
 Set DAC buffer mode configuration. More...
 
hpm_stat_t dac_set_direct_config (DAC_Type *ptr, uint16_t data)
 Set DAC direct mode configuration. More...
 
hpm_stat_t dac_set_output_frequency (DAC_Type *ptr, uint32_t dac_input_freq, uint32_t dac_output_freq)
 Set DAC output frequency. More...
 
hpm_stat_t dac_set_step_sw_trigger (DAC_Type *ptr, uint8_t step_sw_trig_idx)
 Set DAC step software trigger. More...
 
void dac_set_buffer_sw_trigger (DAC_Type *ptr)
 Set DAC buffer software trigger. More...
 
void dac_set_buffer_dma_reset (DAC_Type *ptr)
 Reset DAC buffer DMA. More...
 
void dac_set_hw_trigger_enable (DAC_Type *ptr, bool enable)
 Enable or disable DAC hardware trigger. More...
 
void dac_enable_conversion (DAC_Type *ptr, bool enable)
 Enable or disable DAC conversion. More...
 
hpm_stat_t dac_external_dma_request_enable (DAC_Type *ptr, uint8_t buf_idx, bool enable)
 Enable or disable DAC external DMA request. More...
 
void dac_enable_interrupts (DAC_Type *ptr, uint32_t mask)
 Enable DAC interrupts. More...
 
uint32_t dac_get_status_flags (DAC_Type *ptr)
 Get DAC status flags. More...
 
void dac_set_status_flags (DAC_Type *ptr, uint32_t mask)
 Clear DAC status flags. More...
 
uint8_t dac_get_current_buffer_index (DAC_Type *ptr)
 Get current DAC buffer index. More...
 
uint16_t dac_get_current_buffer_offset (DAC_Type *ptr)
 Get current DAC buffer offset. More...