24#include "periph_cpu.h"
34#ifndef HAVE_PDM_MODE_T
46# define PDM_GAIN_MIN (-20)
53# define PDM_GAIN_MAX (20)
60# define PDM_BUF_SIZE (64U)
74#ifndef HAVE_PDM_ISR_CTX_T
void pdm_deinit(void)
Disable the PDM peripheral.
int32_t pdm_init(pdm_mode_t mode, uint32_t rate, int8_t gain, pdm_data_cb_t cb, void *arg)
Initialize and enable the PDM peripheral.
void pdm_stop(void)
Stop the PDM peripheral.
void(* pdm_data_cb_t)(void *arg, int16_t *buf)
Signature for data received interrupt callback.
pdm_mode_t
PDM operation modes.
void pdm_start(void)
Start the PDM peripheral.
@ PDM_MODE_STEREO
Stereo mode.
@ PDM_MODE_MONO
Mono mode.
Interrupt context for a PDM device.
pdm_data_cb_t cb
data received interrupt callback
void * arg
context passed to the callback