Add a STM32F407 version of EmbeddedColorChord
This commit is contained in:
parent
91d8502d23
commit
3c885c8877
101 changed files with 73637 additions and 0 deletions
31
embeddedstm32f407/mp45dt02.h
Normal file
31
embeddedstm32f407/mp45dt02.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
//This is very noisy for some reason, don't use for now.
|
||||
|
||||
#ifndef _MP45DT02
|
||||
#define _MP45DT02
|
||||
|
||||
|
||||
//sampling frequency
|
||||
#define FS DFREQ
|
||||
|
||||
#define VOLUME 10
|
||||
|
||||
//PDM decimation factor
|
||||
#define DECIMATION 64
|
||||
|
||||
#define MIC_IN_BUF_SIZE ((((FS/1000)*DECIMATION)/8)/2)
|
||||
#define MIC_OUT_BUF_SIZE (FS/1000)
|
||||
|
||||
//i2s clock is clock for mic
|
||||
//clock for mic is calculated as Fs*decimation_factor
|
||||
//so we have to divide with 32 (frame_length*num_channels)
|
||||
//to get i2s sampling freq
|
||||
#define I2S_FS ((FS*DECIMATION)/(16*2))
|
||||
|
||||
|
||||
void InitMP45DT02();
|
||||
|
||||
//called from interrpt
|
||||
void GotSample( int s );
|
||||
|
||||
#endif
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue