HPM SDK
HPMicro Software Development Kit
hpm_pdmlite_drv.h File Reference
#include "hpm_common.h"
#include "hpm_pdmlite_regs.h"

Go to the source code of this file.

Data Structures

struct  pdm_config
 PDM config. More...
 

Macros

#define PDM_EVENT_OFIFO_OVERFLOW_ERROR   (PDM_ST_OFIFO_OVFL_ERR_MASK)
 PDM event. More...
 
#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 bool pdm_is_running (PDMLITE_Type *ptr)
 check whether PDM is running More...
 
static void pdm_stop (PDMLITE_Type *ptr)
 stop pdm More...
 
static void pdm_start (PDMLITE_Type *ptr)
 start pdm More...
 
static void pdm_disable_channel (PDMLITE_Type *ptr, uint16_t channel_disable_mask)
 disable channel More...
 
static void pdm_enable_channel (PDMLITE_Type *ptr, uint16_t capture_high_level_mask, uint16_t channel_enable_mask)
 enable channel More...
 
static void pdm_disable_pdm_clock_out (PDMLITE_Type *ptr)
 disable pdm clock out More...
 
static void pdm_enable_pdm_clock_out (PDMLITE_Type *ptr)
 enable pdm clock out More...
 
static void pdm_config_cic (PDMLITE_Type *ptr, uint8_t sigma_delta_order, uint8_t dec_ratio, uint8_t post_scale)
 pdm config cic More...
 
static void pdm_software_reset (PDMLITE_Type *ptr)
 pdm software reset More...
 
static void pdm_enable_irq (PDMLITE_Type *ptr, uint8_t mask)
 pdm enable irq More...
 
static void pdm_disable_irq (PDMLITE_Type *ptr, uint8_t mask)
 pdm disable irq More...
 
hpm_stat_t pdm_init (PDMLITE_Type *ptr, pdm_config_t *config)
 pdm initialization More...
 
void pdm_get_default_config (PDMLITE_Type *ptr, pdm_config_t *config)
 pdm get default config More...
 
hpm_stat_t pdm_config_sample_rate (PDMLITE_Type *ptr, uint32_t mclk_in_hz, uint32_t sample_rate_hz)
 pdm config sample rate More...
 
static void pdm_config_divider (PDMLITE_Type *ptr, uint8_t div, bool bypass)
 pdm config clock divider More...