DAO driver APIs. More...
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... | |
DAO driver APIs.
| #define DAO_CHANNEL_BOTH (DAO_CTRL_RIGHT_EN_MASK | DAO_CTRL_LEFT_EN_MASK) |
#include <drivers/inc/hpm_dao_drv.h>
| #define DAO_CHANNEL_LEFT_ONLY DAO_CTRL_LEFT_EN_MASK |
#include <drivers/inc/hpm_dao_drv.h>
DAO channel selection.
| #define DAO_CHANNEL_RIGHT_ONLY DAO_CTRL_RIGHT_EN_MASK |
#include <drivers/inc/hpm_dao_drv.h>
| #define DAO_DEFAULT_OUTPUT_ALL_HIGH (1U) |
#include <drivers/inc/hpm_dao_drv.h>
| #define DAO_DEFAULT_OUTPUT_ALL_LOW (0U) |
#include <drivers/inc/hpm_dao_drv.h>
DAO default output.
| #define DAO_DEFAULT_OUTPUT_DISABLED (3U) |
#include <drivers/inc/hpm_dao_drv.h>
| #define DAO_DEFAULT_OUTPUT_P_HIGH_N_LOW (2U) |
#include <drivers/inc/hpm_dao_drv.h>
| typedef struct dao_config dao_config_t |
#include <drivers/inc/hpm_dao_drv.h>
DAO config.
| enum dao_channel_t |
#include <drivers/inc/hpm_dao_drv.h>
| Enumerator | |
|---|---|
| dao_right_channel | |
| dao_left_channel | |
|
inlinestatic |
#include <drivers/inc/hpm_dao_drv.h>
config high pass filter
| [in] | ptr | DAO base address |
| [in] | hpf_coef_ma | high pass filter a coefficient's complement |
| [in] | hpf_coef_b | high pass filter b coefficient |
| [in] | enable |
|
|
inlinestatic |
#include <drivers/inc/hpm_dao_drv.h>
disable channel
| [in] | ptr | DAO base address |
| [in] | ch | channel defined in dao_channel_t |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
#include <drivers/inc/hpm_dao_drv.h>
enable channel
| [in] | ptr | DAO base address |
| [in] | ch | channel defined in dao_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_dao_drv.h>
enable false run when false run mode is enabled, the module continues to consume data, no actual output on pads.
| [in] | ptr | DAO base address |
| [in] | enable |
|
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
#include <drivers/inc/hpm_dao_drv.h>
force pads output with certain level
| [in] | ptr | DAO base address |
| [in] | output | output level |
| void dao_get_default_config | ( | DAO_Type * | ptr, |
| dao_config_t * | config | ||
| ) |
#include <drivers/inc/hpm_dao_drv.h>
get default config
| [in] | ptr | DAO base address |
| [out] | config | dao_config_t |
| hpm_stat_t dao_init | ( | DAO_Type * | ptr, |
| dao_config_t * | config | ||
| ) |
#include <drivers/inc/hpm_dao_drv.h>
initlization
| [in] | ptr | DAO base address |
| [in] | config | dao_config_t |
| hpm_stat_t | status_invalid_argument or status_success |
|
inlinestatic |
#include <drivers/inc/hpm_dao_drv.h>
invert output
| [in] | ptr | DAO base address |
| [in] | invert |
|
|
inlinestatic |
#include <drivers/inc/hpm_dao_drv.h>
check whether DAO is running
| [in] | ptr | DAO base address |
| true | if dao is running |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |