HPM SDK
HPMicro Software Development Kit
hpm_pdm_drv.h File Reference
#include "hpm_common.h"
#include "hpm_pdm_regs.h"

Go to the source code of this file.

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...