I2S_Codec Medium-Level Driver Functions; Table 8 - ST STM32F103 Series Application Note

How to use the high-density microcontroller to play audio files with an external i2s audio codec
Hide thumbs Also See for STM32F103 Series:
Table of Contents

Advertisement

AN2739
Medium-level functions
Medium-level functions are used to better control some basic functionality and the audio
stream.

Table 8

Table 8.
I2S_CODEC_DataTransfer
I2S_CODEC_UpdateStatus
GetVar_DataStartAddr
GetVar_AudioDataIndex
ResetVar_AudioDataIndex
IncrementVar_AudioDataIndex
GetVar_AudioPlayStatus
presents these functions.

I2S_CODEC medium-level driver functions

Function name
Sends the audio data using the SPI2 peripheral and checks
the audio play status (if a (Pause/Stop) command is pending)
by calling the I2S_CODEC_UpdateStatus function.
This function should be called in the SPI2 TXE interrupt
subroutine when the interrupt mode is used.
Checks if the current status (through a local variable:
AudioPlayStatus) is Playing, Paused or Stopped. If the
commanded status is Stopped or Paused the function
performs the requested command and updates the local
variables.
Returns the current audio Data Start Address value for the
current stream (depends on the audio file type and the file
header length).
AudioDataIndex is the virtual audio data pointer for the audio
file being played. This function returns the current value of the
AudioDataIndex.
Resets the AudioDataIndex to the current audio file Data Start
Address value.
Increments the AudioDataIndex of the current audio file by a
programmable value step (input of the function).
Returns the current AudioPlayStatus variable value (Playing,
Stopped, Paused).
Implementation example
Description
15/26

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F103 Series and is the answer not in the manual?

Questions and answers

Table of Contents