![]() |
STM32F769IDiscovery
1.00
uDANTE Audio Networking with STM32F7 DISCO board
|
Functions | |
uint32_t | wm8994_Init (uint16_t DeviceAddr, uint16_t OutputInputDevice, uint8_t Volume, uint32_t AudioFreq) |
Initializes the audio codec and the control interface. More... | |
void | wm8994_DeInit (void) |
Deinitializes the audio codec. More... | |
uint32_t | wm8994_ReadID (uint16_t DeviceAddr) |
Get the WM8994 ID. More... | |
uint32_t | wm8994_Play (uint16_t DeviceAddr, uint16_t *pBuffer, uint16_t Size) |
Start the audio Codec play feature. More... | |
uint32_t | wm8994_Pause (uint16_t DeviceAddr) |
Pauses playing on the audio codec. More... | |
uint32_t | wm8994_Resume (uint16_t DeviceAddr) |
Resumes playing on the audio codec. More... | |
uint32_t | wm8994_Stop (uint16_t DeviceAddr, uint32_t Cmd) |
Stops audio Codec playing. It powers down the codec. More... | |
uint32_t | wm8994_SetVolume (uint16_t DeviceAddr, uint8_t Volume) |
Sets higher or lower the codec volume level. More... | |
uint32_t | wm8994_SetMute (uint16_t DeviceAddr, uint32_t Cmd) |
Enables or disables the mute feature on the audio codec. More... | |
uint32_t | wm8994_SetOutputMode (uint16_t DeviceAddr, uint8_t Output) |
Switch dynamically (while audio file is played) the output target (speaker or headphone). More... | |
uint32_t | wm8994_SetFrequency (uint16_t DeviceAddr, uint32_t AudioFreq) |
Sets new frequency. More... | |
uint32_t | wm8994_Reset (uint16_t DeviceAddr) |
Resets wm8994 registers. More... | |
void | AUDIO_IO_Init (void) |
Initializes Audio low level. More... | |
void | AUDIO_IO_DeInit (void) |
DeInitializes Audio low level. More... | |
Variables | |
AUDIO_DrvTypeDef | wm8994_drv |
void AUDIO_IO_DeInit | ( | void | ) |
DeInitializes Audio low level.
Definition at line 558 of file stm32f769i_discovery.c.
void AUDIO_IO_Init | ( | void | ) |
Initializes Audio low level.
Definition at line 550 of file stm32f769i_discovery.c.
void wm8994_DeInit | ( | void | ) |
uint32_t wm8994_Init | ( | uint16_t | DeviceAddr, |
uint16_t | OutputInputDevice, | ||
uint8_t | Volume, | ||
uint32_t | AudioFreq | ||
) |
Initializes the audio codec and the control interface.
DeviceAddr | Device address on communication Bus. |
OutputInputDevice | can be OUTPUT_DEVICE_SPEAKER, OUTPUT_DEVICE_HEADPHONE, OUTPUT_DEVICE_BOTH, OUTPUT_DEVICE_AUTO, INPUT_DEVICE_DIGITAL_MICROPHONE_1, INPUT_DEVICE_DIGITAL_MICROPHONE_2, INPUT_DEVICE_DIGITAL_MIC1_MIC2, INPUT_DEVICE_INPUT_LINE_1 or INPUT_DEVICE_INPUT_LINE_2. |
Volume | Initial volume level (from 0 (Mute) to 100 (Max)) |
AudioFreq | Audio Frequency |
0 | if correct communication, else wrong communication |
uint32_t wm8994_Pause | ( | uint16_t | DeviceAddr | ) |
uint32_t wm8994_Play | ( | uint16_t | DeviceAddr, |
uint16_t * | pBuffer, | ||
uint16_t | Size | ||
) |
uint32_t wm8994_ReadID | ( | uint16_t | DeviceAddr | ) |
uint32_t wm8994_Reset | ( | uint16_t | DeviceAddr | ) |
uint32_t wm8994_Resume | ( | uint16_t | DeviceAddr | ) |
uint32_t wm8994_SetFrequency | ( | uint16_t | DeviceAddr, |
uint32_t | AudioFreq | ||
) |
uint32_t wm8994_SetMute | ( | uint16_t | DeviceAddr, |
uint32_t | Cmd | ||
) |
Enables or disables the mute feature on the audio codec.
DeviceAddr | Device address on communication Bus. |
Cmd | AUDIO_MUTE_ON to enable the mute or AUDIO_MUTE_OFF to disable the mute mode. |
0 | if correct communication, else wrong communication |
uint32_t wm8994_SetOutputMode | ( | uint16_t | DeviceAddr, |
uint8_t | Output | ||
) |
Switch dynamically (while audio file is played) the output target (speaker or headphone).
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 |
0 | if correct communication, else wrong communication |
uint32_t wm8994_SetVolume | ( | uint16_t | DeviceAddr, |
uint8_t | Volume | ||
) |
uint32_t wm8994_Stop | ( | uint16_t | DeviceAddr, |
uint32_t | CodecPdwnMode | ||
) |
Stops audio Codec playing. It powers down the codec.
DeviceAddr | Device address on communication Bus. |
CodecPdwnMode | selects the power down mode.
|
0 | if correct communication, else wrong communication |
AUDIO_DrvTypeDef wm8994_drv |