Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BSP_DISCO_F469NI by
Functions | |
| uint32_t | cs43l22_Init (uint16_t DeviceAddr, uint16_t OutputDevice, uint8_t Volume, uint32_t AudioFreq) |
| Initializes the audio codec and the control interface. | |
| void | cs43l22_DeInit (void) |
| Deinitializes the audio codec. | |
| uint32_t | cs43l22_ReadID (uint16_t DeviceAddr) |
| Get the CS43L22 ID. | |
| uint32_t | cs43l22_Play (uint16_t DeviceAddr, uint16_t *pBuffer, uint16_t Size) |
| Start the audio Codec play feature. | |
| uint32_t | cs43l22_Pause (uint16_t DeviceAddr) |
| Pauses playing on the audio codec. | |
| uint32_t | cs43l22_Resume (uint16_t DeviceAddr) |
| Resumes playing on the audio codec. | |
| uint32_t | cs43l22_Stop (uint16_t DeviceAddr, uint32_t Cmd) |
| Stops audio Codec playing. | |
| uint32_t | cs43l22_SetVolume (uint16_t DeviceAddr, uint8_t Volume) |
| Sets higher or lower the codec volume level. | |
| uint32_t | cs43l22_SetFrequency (uint16_t DeviceAddr, uint32_t AudioFreq) |
| Sets new frequency. | |
| uint32_t | cs43l22_SetMute (uint16_t DeviceAddr, uint32_t Cmd) |
| Enables or disables the mute feature on the audio codec. | |
| uint32_t | cs43l22_SetOutputMode (uint16_t DeviceAddr, uint8_t Output) |
| Switch dynamically (while audio file is played) the output target (speaker or headphone). | |
| uint32_t | cs43l22_Reset (uint16_t DeviceAddr) |
| Resets cs43l22 registers. | |
| void | AUDIO_IO_Init (void) |
| Initializes Audio low level. | |
| void | AUDIO_IO_DeInit (void) |
| DeInitializes Audio low level. | |
Function Documentation
| void AUDIO_IO_DeInit | ( | void | ) |
DeInitializes Audio low level.
Definition at line 750 of file stm32469i_discovery.c.
| void AUDIO_IO_Init | ( | void | ) |
Initializes Audio low level.
Definition at line 742 of file stm32469i_discovery.c.
| void cs43l22_DeInit | ( | void | ) |
| uint32_t cs43l22_Init | ( | uint16_t | DeviceAddr, |
| uint16_t | OutputDevice, | ||
| uint8_t | Volume, | ||
| uint32_t | AudioFreq | ||
| ) |
Initializes the audio codec and the control interface.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. OutputDevice,: can be OUTPUT_DEVICE_SPEAKER, OUTPUT_DEVICE_HEADPHONE, OUTPUT_DEVICE_BOTH or OUTPUT_DEVICE_AUTO . Volume,: Initial volume level (from 0 (Mute) to 100 (Max))
- Return values:
-
0 if correct communication, else wrong communication
| uint32_t cs43l22_Pause | ( | uint16_t | DeviceAddr ) |
| uint32_t cs43l22_Play | ( | uint16_t | DeviceAddr, |
| uint16_t * | pBuffer, | ||
| uint16_t | Size | ||
| ) |
| uint32_t cs43l22_ReadID | ( | uint16_t | DeviceAddr ) |
| uint32_t cs43l22_Reset | ( | uint16_t | DeviceAddr ) |
| uint32_t cs43l22_Resume | ( | uint16_t | DeviceAddr ) |
| uint32_t cs43l22_SetFrequency | ( | uint16_t | DeviceAddr, |
| uint32_t | AudioFreq | ||
| ) |
| uint32_t cs43l22_SetMute | ( | uint16_t | DeviceAddr, |
| uint32_t | Cmd | ||
| ) |
Enables or disables the mute feature on the audio codec.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. Cmd,: AUDIO_MUTE_ON to enable the mute or AUDIO_MUTE_OFF to disable the mute mode.
- Return values:
-
0 if correct communication, else wrong communication
| uint32_t cs43l22_SetOutputMode | ( | uint16_t | DeviceAddr, |
| uint8_t | Output | ||
| ) |
Switch dynamically (while audio file is played) the output target (speaker or headphone).
- Note:
- This function modifies a global variable of the audio codec driver: OutputDev.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. Output,: specifies the audio output target: OUTPUT_DEVICE_SPEAKER, OUTPUT_DEVICE_HEADPHONE, OUTPUT_DEVICE_BOTH or OUTPUT_DEVICE_AUTO
- Return values:
-
0 if correct communication, else wrong communication
| uint32_t cs43l22_SetVolume | ( | uint16_t | DeviceAddr, |
| uint8_t | Volume | ||
| ) |
Sets higher or lower the codec volume level.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. Volume,: a byte value from 0 to 255 (refer to codec registers description for more details).
- Return values:
-
0 if correct communication, else wrong communication
| uint32_t cs43l22_Stop | ( | uint16_t | DeviceAddr, |
| uint32_t | CodecPdwnMode | ||
| ) |
Stops audio Codec playing.
It powers down the codec.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. CodecPdwnMode,: selects the power down mode. - CODEC_PDWN_HW: Physically power down the codec. When resuming from this mode, the codec is set to default configuration (user should re-Initialize the codec in order to play again the audio stream).
- Return values:
-
0 if correct communication, else wrong communication
Generated on Wed Jul 13 2022 22:17:00 by
1.7.2
