PDM driver APIs. More...
Data Structures | |
| struct | pdm_config |
| PDM config. More... | |
Macros | |
| #define | PDM_EVENT_FILT_CRX_ERROR (PDM_ST_FILT_CRX_ERR_MASK) |
| PDM event. More... | |
| #define | PDM_EVENT_OFIFO_OVERFLOW_ERROR (PDM_ST_OFIFO_OVFL_ERR_MASK) |
| #define | PDM_EVENT_CIC_OVERLOAD_ERROR (PDM_ST_CIC_OVLD_ERR_MASK) |
| #define | PDM_EVENT_CIC_SAT_ERROR (PDM_ST_CIC_SAT_ERR_MASK) |
| #define | PDM_CIC_SIGMA_DELTA_ORDER_5 (2U) |
| PDM CIC sidma-delta filter order. More... | |
| #define | PDM_CIC_SIGMA_DELTA_ORDER_6 (1U) |
| #define | PDM_CIC_SIGMA_DELTA_ORDER_7 (0U) |
Typedefs | |
| typedef struct pdm_config | pdm_config_t |
| PDM config. More... | |
Functions | |
| static void | pdm_config_hpf (PDM_Type *ptr, uint32_t hpf_coef_ma, uint32_t hpf_coef_b) |
| config high pass filter More... | |
| static void | pdm_enable_hpf (PDM_Type *ptr) |
| enable high pass filter More... | |
| static void | pdm_disable_hpf (PDM_Type *ptr) |
| disable high pass filter More... | |
| static bool | pdm_is_running (PDM_Type *ptr) |
| check whether PDM is running More... | |
| static void | pdm_stop (PDM_Type *ptr) |
| stop pdm More... | |
| static void | pdm_start (PDM_Type *ptr) |
| start pdm More... | |
| static void | pdm_disable_channel (PDM_Type *ptr, uint16_t channel_disable_mask) |
| disable channel More... | |
| static void | pdm_enable_channel (PDM_Type *ptr, uint16_t capture_high_level_mask, uint16_t channel_enable_mask) |
| enable channel More... | |
| static void | pdm_disable_pdm_clock_out (PDM_Type *ptr) |
| disable pdm clock out More... | |
| static void | pdm_enable_pdm_clock_out (PDM_Type *ptr) |
| enable pdm clock out More... | |
| static void | pdm_config_cic (PDM_Type *ptr, uint8_t sigma_delta_order, uint8_t div, uint8_t post_scale) |
| pdm config cic More... | |
| static void | pdm_software_reset (PDM_Type *ptr) |
| pdm software reset More... | |
| static void | pdm_enable_irq (PDM_Type *ptr, uint8_t mask) |
| pdm enable irq More... | |
| static void | pdm_disable_irq (PDM_Type *ptr, uint8_t mask) |
| pdm disable irq More... | |
| hpm_stat_t | pdm_init (PDM_Type *ptr, pdm_config_t *config) |
| pdm initialization More... | |
| void | pdm_get_default_config (PDM_Type *ptr, pdm_config_t *config) |
| pdm get default config More... | |
PDM driver APIs.
| #define PDM_CIC_SIGMA_DELTA_ORDER_5 (2U) |
#include <drivers/inc/hpm_pdm_drv.h>
PDM CIC sidma-delta filter order.
| #define PDM_CIC_SIGMA_DELTA_ORDER_6 (1U) |
#include <drivers/inc/hpm_pdm_drv.h>
| #define PDM_CIC_SIGMA_DELTA_ORDER_7 (0U) |
#include <drivers/inc/hpm_pdm_drv.h>
| #define PDM_EVENT_CIC_OVERLOAD_ERROR (PDM_ST_CIC_OVLD_ERR_MASK) |
#include <drivers/inc/hpm_pdm_drv.h>
| #define PDM_EVENT_CIC_SAT_ERROR (PDM_ST_CIC_SAT_ERR_MASK) |
#include <drivers/inc/hpm_pdm_drv.h>
| #define PDM_EVENT_FILT_CRX_ERROR (PDM_ST_FILT_CRX_ERR_MASK) |
#include <drivers/inc/hpm_pdm_drv.h>
PDM event.
| #define PDM_EVENT_OFIFO_OVERFLOW_ERROR (PDM_ST_OFIFO_OVFL_ERR_MASK) |
#include <drivers/inc/hpm_pdm_drv.h>
| typedef struct pdm_config pdm_config_t |
#include <drivers/inc/hpm_pdm_drv.h>
PDM config.
|
inlinestatic |
#include <drivers/inc/hpm_pdm_drv.h>
pdm config cic
| [in] | ptr | PDM base address |
| [in] | sigma_delta_order | sidma-delta filter order |
| [in] | div | Rate of down sampling |
| [in] | post_scale | output value post scale |
|
inlinestatic |
#include <drivers/inc/hpm_pdm_drv.h>
config high pass filter
| [in] | ptr | PDM base address |
| [in] | hpf_coef_ma | high pass filter a coefficient's complement |
| [in] | hpf_coef_b | high pass filter b coefficient |
|
inlinestatic |
#include <drivers/inc/hpm_pdm_drv.h>
disable channel
| [in] | ptr | PDM base address |
| [in] | channel_disable_mask | channel mask |
|
inlinestatic |
|
inlinestatic |
#include <drivers/inc/hpm_pdm_drv.h>
pdm disable irq
| [in] | ptr | PDM base address |
| [in] | mask | pdm irq mask in ST register |
|
inlinestatic |
|
inlinestatic |
#include <drivers/inc/hpm_pdm_drv.h>
enable channel
| [in] | ptr | PDM base address |
| [in] | capture_high_level_mask | capture when PDM_CLK is high |
| [in] | channel_enable_mask | channel mask |
|
inlinestatic |
|
inlinestatic |
#include <drivers/inc/hpm_pdm_drv.h>
pdm enable irq
| [in] | ptr | PDM base address |
| [in] | mask | pdm irq mask in ST register |
|
inlinestatic |
| void pdm_get_default_config | ( | PDM_Type * | ptr, |
| pdm_config_t * | config | ||
| ) |
#include <drivers/inc/hpm_pdm_drv.h>
pdm get default config
| [in] | ptr | PDM base address |
| [out] | config | pdm_config_t |
| hpm_stat_t pdm_init | ( | PDM_Type * | ptr, |
| pdm_config_t * | config | ||
| ) |
#include <drivers/inc/hpm_pdm_drv.h>
pdm initialization
| [in] | ptr | PDM base address |
| [in] | config | pdm_config_t |
| hpm_stat_t | status_invalid_argument or status_success |
|
inlinestatic |
#include <drivers/inc/hpm_pdm_drv.h>
check whether PDM is running
| [in] | ptr | PDM base address |
| true | in PDM is running |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |