22 #include "mic_config.h"
35 #define MIC_ADC_ACQ_TIME MIC_CONFIG_ADC_ACQ_TIME
36 #define MIC_ADC_CLOCK_FREQ MIC_CONFIG_ADC_CLOCK_FREQ
56 uint32_t MIC_init ( uint32_t fs, uint16_t *sampleBuffer, size_t len );
uint16_t * MIC_getSampleBuffer(void)
Gets the sample buffer.
bool MIC_isBusy(void)
Checks if the microphone is in use.
void MIC_deInit(void)
Powers down the MEMS microphone stops the ADC and frees up the DMA channel.
float MIC_getSoundLevel(float *var)
Calculates the sound level.
float MIC_getMean(void)
Calculates the average value of the samples in the buffer.
void MIC_start(uint32_t nSamples)
Starts taking samples using DMA from the microphone.