2018-01-02 02:40 AM
//stm32f4xx.h
//CS4271 audio CODEC//GPIOC _I2S_SDO GPIO_Pin_12
//GPIOC _I2S_SDI GPIO_Pin_11
//GPIOC _I2S_SCK GPIO_Pin_10
//GPIOA _I2S_WS GPIO_Pin_15
#define AUDIO_I2S SPI3
#define AUDIO_I2S_EXT I2S3ext#define AUDIO_I2S_CLK RCC_APB1Periph_SPI3#define AUDIO_I2S_ADDRESS (SPI3_BASE + 0x3C00) //Are these values correct?
#define AUDIO_I2S_EXT_ADDRESS (I2S3ext_BASE + 0x4000) //Are these values correct?#define AUDIO_I2S_GPIO_AF GPIO_AF_SPI3
#define AUDIO_I2S_IRQ SPI3_IRQn#define AUDIO_I2S_EXT_ IRQ SPI3_IRQn#define AUDIO_I2S_IRQHandler SPI3_IRQHandler#define AUDIO_I2S_EXT_IRQHandler SPI3_IRQHandler#define AUDIO_I2S_DMA_CLOCK RCC_AHB1Periph_DMA1#define AUDIO_I2S_DMA_STREAM DMA1_Stream5#define AUDIO_I2S_DMA_DREG AUDIO_I2S_ADDRESS#define AUDIO_I2S_DMA_CHANNEL DMA_Channel_0#define AUDIO_I2S_DMA_IRQ DMA1_Stream5_IRQn#define AUDIO_I2S_DMA_FLAG_TC DMA_FLAG_TCIF5#define AUDIO_I2S_DMA_FLAG_HT DMA_FLAG_HTIF5#define AUDIO_I2S_DMA_FLAG_FE DMA_FLAG_FEIF5#define AUDIO_I2S_DMA_FLAG_TE DMA_FLAG_TEIF5#define AUDIO_I2S_DMA_FLAG_DME DMA_FLAG_DMEIF5#define AUDIO_I2S_EXT_DMA_STREAM DMA1_Stream2#define AUDIO_I2S_EXT_DMA_DREG AUDIO_I2S_EXT_ADDRESS#define AUDIO_I2S_EXT_DMA_CHANNEL DMA_Channel_2#define AUDIO_I2S_EXT_DMA_IRQ DMA1_Stream2_IRQn#define AUDIO_I2S_EXT_DMA_FLAG_TC DMA_FLAG_TCIF2#define AUDIO_I2S_EXT_DMA_FLAG_HT DMA_FLAG_HTIF2#define AUDIO_I2S_EXT_DMA_FLAG_FE DMA_FLAG_FEIF2#define AUDIO_I2S_EXT_DMA_FLAG_TE DMA_FLAG_TEIF2#define AUDIO_I2S_EXT_DMA_FLAG_DME DMA_FLAG_DMEIF2#define I2S_STANDARD I2S_Standard_Phillipsstm32f4xx.h is writing.
(SPI3_BASE + 0x3C00)
(I2S3ext_BASE + 0x4000)
I'm not sure right?
Thank you.
2018-01-02 09:18 AM
Probably no, but that depends on usage of those symbols.
JW