Classes | Macros | Typedefs | Functions | Variables
stm32h747/stm32h747i-disco/CM7/Drivers/BSP/Components/wm8994/wm8994.h File Reference

This file contains all the functions prototypes for the wm8994.c driver. More...

#include "wm8994_reg.h"
#include <stddef.h>
Include dependency graph for stm32h747/stm32h747i-disco/CM7/Drivers/BSP/Components/wm8994/wm8994.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  WM8994_Drv_t
 
struct  WM8994_Init_t
 
struct  WM8994_IO_t
 
struct  WM8994_Object_t
 

Macros

#define VOLUME_IN_INVERT(Volume)   ((uint8_t)(((Volume) * 100) / 239))
 
#define VOLUME_INPUT   0U
 
#define VOLUME_OUT_INVERT(Volume)   ((uint8_t)(((Volume) * 100) / 63))
 
#define VOLUME_OUTPUT   1U
 
#define WM8994_ERROR   (-1)
 
#define WM8994_FREQUENCY_11K   11025
 
#define WM8994_FREQUENCY_16K   16000
 
#define WM8994_FREQUENCY_176K   176400
 
#define WM8994_FREQUENCY_192K   192000
 
#define WM8994_FREQUENCY_22K   22050
 
#define WM8994_FREQUENCY_32K   32000
 
#define WM8994_FREQUENCY_44K   44100
 
#define WM8994_FREQUENCY_48K   48000
 
#define WM8994_FREQUENCY_88K   88200
 
#define WM8994_FREQUENCY_8K   8000
 
#define WM8994_FREQUENCY_96K   96000
 
#define WM8994_ID   0x8994U
 WM8994 ID
More...
 
#define WM8994_IN_LINE1   0x03U
 
#define WM8994_IN_LINE2   0x04U
 
#define WM8994_IN_MIC1   0x01U
 
#define WM8994_IN_MIC1_MIC2   0x05U
 
#define WM8994_IN_MIC2   0x02U
 
#define WM8994_IN_NONE   0x00U
 
#define WM8994_MUTE_OFF   0U
 
#define WM8994_MUTE_ON   1U
 
#define WM8994_OK   (0)
 
#define WM8994_OUT_AUTO   0x04U
 
#define WM8994_OUT_BOTH   0x03U
 
#define WM8994_OUT_HEADPHONE   0x02U
 
#define WM8994_OUT_NONE   0x00U
 
#define WM8994_OUT_SPEAKER   0x01U
 
#define WM8994_PDWN_HW   0x00U
 
#define WM8994_PDWN_SW   0x01U
 
#define WM8994_PROTOCOL_DSP   ((uint16_t)0x0003)
 
#define WM8994_PROTOCOL_I2S   ((uint16_t)0x0002)
 
#define WM8994_PROTOCOL_L_JUSTIFIED   ((uint16_t)0x0001)
 
#define WM8994_PROTOCOL_R_JUSTIFIED   ((uint16_t)0x0000)
 
#define WM8994_RESOLUTION_16b   0x00U
 
#define WM8994_RESOLUTION_20b   0x01U
 
#define WM8994_RESOLUTION_24b   0x02U
 
#define WM8994_RESOLUTION_32b   0x03U
 

Typedefs

typedef int32_t(* WM8994_DeInit_Func) (void)
 
typedef int32_t(* WM8994_Delay_Func) (uint32_t)
 
typedef int32_t(* WM8994_GetTick_Func) (void)
 
typedef int32_t(* WM8994_Init_Func) (void)
 
typedef int32_t(* WM8994_ReadReg_Func) (uint16_t, uint16_t, uint8_t *, uint16_t)
 
typedef int32_t(* WM8994_WriteReg_Func) (uint16_t, uint16_t, uint8_t *, uint16_t)
 

Functions

int32_t WM8994_DeInit (WM8994_Object_t *pObj)
 Deinitializes the audio codec. More...
 
int32_t WM8994_GetFrequency (WM8994_Object_t *pObj, uint32_t *AudioFreq)
 Get frequency. More...
 
int32_t WM8994_GetProtocol (WM8994_Object_t *pObj, uint32_t *Protocol)
 Get Audio Protocol. More...
 
int32_t WM8994_GetResolution (WM8994_Object_t *pObj, uint32_t *Resolution)
 Get Audio resolution. More...
 
int32_t WM8994_GetVolume (WM8994_Object_t *pObj, uint32_t InputOutput, uint8_t *Volume)
 Get higher or lower the codec volume level. More...
 
int32_t WM8994_Init (WM8994_Object_t *pObj, WM8994_Init_t *pInit)
 Initializes the audio codec and the control interface. More...
 
int32_t WM8994_Pause (WM8994_Object_t *pObj)
 Pauses playing on the audio codec. More...
 
int32_t WM8994_Play (WM8994_Object_t *pObj)
 Start the audio Codec play feature. More...
 
int32_t WM8994_ReadID (WM8994_Object_t *pObj, uint32_t *Id)
 Get the WM8994 ID. More...
 
int32_t WM8994_RegisterBusIO (WM8994_Object_t *pObj, WM8994_IO_t *pIO)
 Function. More...
 
int32_t WM8994_Reset (WM8994_Object_t *pObj)
 Resets wm8994 registers. More...
 
int32_t WM8994_Resume (WM8994_Object_t *pObj)
 Resumes playing on the audio codec. More...
 
int32_t WM8994_SetFrequency (WM8994_Object_t *pObj, uint32_t AudioFreq)
 Sets new frequency. More...
 
int32_t WM8994_SetMute (WM8994_Object_t *pObj, uint32_t Cmd)
 Enables or disables the mute feature on the audio codec. More...
 
int32_t WM8994_SetOutputMode (WM8994_Object_t *pObj, uint32_t Output)
 Switch dynamically (while audio file is played) the output target (speaker or headphone). More...
 
int32_t WM8994_SetProtocol (WM8994_Object_t *pObj, uint32_t Protocol)
 Set Audio Protocol. More...
 
int32_t WM8994_SetResolution (WM8994_Object_t *pObj, uint32_t Resolution)
 Set Audio resolution. More...
 
int32_t WM8994_SetVolume (WM8994_Object_t *pObj, uint32_t InputOutput, uint8_t Volume)
 Set higher or lower the codec volume level. More...
 
int32_t WM8994_Stop (WM8994_Object_t *pObj, uint32_t CodecPdwnMode)
 Stops audio Codec playing. It powers down the codec. More...
 

Variables

WM8994_Drv_t WM8994_Driver
 

Detailed Description

This file contains all the functions prototypes for the wm8994.c driver.

Author
MCD Application Team
Attention

© Copyright (c) 2014 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 stm32h747/stm32h747i-disco/CM7/Drivers/BSP/Components/wm8994/wm8994.h.



picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:15:03