Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
dmic.h File Reference

Public API header file for Digital Microphones. More...

#include <kernel.h>
#include <device.h>

Go to the source code of this file.

Data Structures

struct  pdm_io_cfg
 
struct  pcm_stream_cfg
 
struct  pdm_chan_cfg
 
struct  dmic_cfg
 

Enumerations

enum  dmic_state {
  DMIC_STATE_UNINIT , DMIC_STATE_INITIALIZED , DMIC_STATE_CONFIGURED , DMIC_STATE_ACTIVE ,
  DMIC_STATE_PAUSED
}
 
enum  dmic_trigger {
  DMIC_TRIGGER_STOP , DMIC_TRIGGER_START , DMIC_TRIGGER_PAUSE , DMIC_TRIGGER_RELEASE ,
  DMIC_TRIGGER_RESET
}
 
enum  pdm_lr { PDM_CHAN_LEFT , PDM_CHAN_RIGHT }
 

Functions

static uint32_t dmic_build_channel_map (uint8_t channel, uint8_t pdm, enum pdm_lr lr)
 
static void dmic_parse_channel_map (uint32_t channel_map_lo, uint32_t channel_map_hi, uint8_t channel, uint8_t *pdm, enum pdm_lr *lr)
 
static uint32_t dmic_build_clk_skew_map (uint8_t pdm, uint8_t skew)
 
static int dmic_configure (const struct device *dev, struct dmic_cfg *cfg)
 
static int dmic_trigger (const struct device *dev, enum dmic_trigger cmd)
 
static int dmic_read (const struct device *dev, uint8_t stream, void **buffer, size_t *size, int32_t timeout)
 

Detailed Description

Public API header file for Digital Microphones.

This file contains the Digital Microphone APIs