HPM SDK
HPMicro Software Development Kit
hpm_dao_drv.h File Reference
#include "hpm_common.h"
#include "hpm_dao_regs.h"
#include "hpm_i2s_common.h"
#include "hpm_soc_feature.h"

Go to the source code of this file.

Data Structures

struct  dao_config
 DAO config. More...
 

Macros

#define DAO_CHANNEL_LEFT_ONLY   DAO_CTRL_LEFT_EN_MASK
 DAO channel selection. More...
 
#define DAO_CHANNEL_RIGHT_ONLY   DAO_CTRL_RIGHT_EN_MASK
 
#define DAO_CHANNEL_BOTH    (DAO_CTRL_RIGHT_EN_MASK | DAO_CTRL_LEFT_EN_MASK)
 
#define DAO_DEFAULT_OUTPUT_ALL_LOW   (0U)
 DAO default output. More...
 
#define DAO_DEFAULT_OUTPUT_ALL_HIGH   (1U)
 
#define DAO_DEFAULT_OUTPUT_P_HIGH_N_LOW   (2U)
 
#define DAO_DEFAULT_OUTPUT_DISABLED   (3U)
 

Typedefs

typedef struct dao_config dao_config_t
 DAO config. More...
 

Enumerations

enum  dao_channel_t { dao_right_channel = DAO_CTRL_RIGHT_EN_MASK , dao_left_channel = DAO_CTRL_LEFT_EN_MASK }
 

Functions

static void dao_config_hpf (DAO_Type *ptr, uint32_t hpf_coef_ma, uint32_t hpf_coef_b, bool enable)
 config high pass filter More...
 
static void dao_enable_hpf (DAO_Type *ptr)
 enable high pass filter More...
 
static void dao_disable_hpf (DAO_Type *ptr)
 disable high pass filter More...
 
static void dao_enable_channel (DAO_Type *ptr, uint32_t ch)
 enable channel More...
 
static void dao_disable_channel (DAO_Type *ptr, uint32_t ch)
 disable channel More...
 
static void dao_enable_mono_output (DAO_Type *ptr)
 enable mono output More...
 
static void dao_disable_mono_output (DAO_Type *ptr)
 disable mono output More...
 
static void dao_enable_remap (DAO_Type *ptr)
 enable remap More...
 
static void dao_disable_remap (DAO_Type *ptr)
 disable remap More...
 
static void dao_invert_output (DAO_Type *ptr, bool invert)
 invert output More...
 
static void dao_force_output (DAO_Type *ptr, uint8_t output)
 force pads output with certain level More...
 
static void dao_enable_false_run (DAO_Type *ptr, bool enable)
 enable false run when false run mode is enabled, the module continues to consume data, no actual output on pads. More...
 
static void dao_software_reset (DAO_Type *ptr)
 software reset More...
 
static bool dao_is_running (DAO_Type *ptr)
 check whether DAO is running More...
 
static void dao_start (DAO_Type *ptr)
 start More...
 
static void dao_stop (DAO_Type *ptr)
 stop More...
 
hpm_stat_t dao_init (DAO_Type *ptr, dao_config_t *config)
 initlization More...
 
void dao_get_default_config (DAO_Type *ptr, dao_config_t *config)
 get default config More...