ST / BSP_DISCO_L4R9I

Dependents:   DISCO_L4R9I-LCD-demo

Embed: (wiki syntax)

« Back to documentation index

cs42l51.c File Reference

cs42l51.c File Reference

This file provides the CS42L51 Audio Codec driver. More...

Go to the source code of this file.

Functions

static uint8_t CODEC_IO_Write (uint8_t Addr, uint8_t Reg, uint8_t Value)
 Write and optionally read back a single data.
uint32_t cs42l51_Init (uint16_t DeviceAddr, uint16_t Device, uint8_t Volume, uint32_t AudioFreq)
 Initialize the audio codec and the control interface.
void cs42l51_DeInit (void)
 Deinitialize the audio codec.
uint32_t cs42l51_ReadID (uint16_t DeviceAddr)
 Get the CS42L51 ID.
uint32_t cs42l51_Play (uint16_t DeviceAddr, uint16_t *pBuffer, uint16_t Size)
 Start the audio Codec play feature.
uint32_t cs42l51_Pause (uint16_t DeviceAddr)
 Pause playing on the audio codec.
uint32_t cs42l51_Resume (uint16_t DeviceAddr)
 Resume playing on the audio codec.
uint32_t cs42l51_Stop (uint16_t DeviceAddr, uint32_t CodecPdwnMode)
 Stop audio Codec playing.
uint32_t cs42l51_SetVolume (uint16_t DeviceAddr, uint8_t Volume)
 Set higher or lower the codec volume level.
uint32_t cs42l51_SetFrequency (uint16_t DeviceAddr, uint32_t AudioFreq)
 Set new frequency.
uint32_t cs42l51_SetMute (uint16_t DeviceAddr, uint32_t Cmd)
 Enable or disable the mute feature on the audio codec.
uint32_t cs42l51_SetOutputMode (uint16_t DeviceAddr, uint8_t Output)
 Switch dynamically (while audio file is played) the output target (speaker, headphone, etc).
uint32_t cs42l51_Reset (uint16_t DeviceAddr)
 Reset CS42L51 registers.

Detailed Description

This file provides the CS42L51 Audio Codec driver.

Author:
MCD Application Team
Attention:

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file cs42l51.c.