Select one of the symbols to view example projects that use it.
 
Outline
#define __AUDIO_IF_H
Includes
#include "main.h"
Exported constants
#define AUDIO_BUFFER_SIZE
#define AUDIO_DEFAULT_VOLUME
#define AUDIO_FILE_SIZE
#define AUDIO_FILE_ADDRESS
Exported types
AUDIO_PLAYBACK_StateTypeDef
AUDIO_ErrorTypeDef
BUFFER_StateTypeDef
AUDIO_BufferTypeDef
Exported functions
AUDIO_Init();
AUDIO_Start();
AUDIO_Process();
AUDIO_Stop();
Files
loading...
SourceVuSTM32 Libraries and SamplesI2S_AudioInc/audio_if.h
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/** ****************************************************************************** * @file I2S/I2S_Audio/Inc/audio_if.h * @author MCD Application Team * @brief Header for audio_if.c module ****************************************************************************** * @attention * * Copyright (c) 2017 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** *//* ... */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __AUDIO_IF_H #define __AUDIO_IF_H /* Includes ------------------------------------------------------------------*/ #include "main.h" Includes /* Exported constants --------------------------------------------------------*/ #define AUDIO_BUFFER_SIZE 1000 #define AUDIO_DEFAULT_VOLUME 70 /* Audio file size and start offset address are defined here since the audio wave file is stored in Flash memory as a constant table of 16-bit data *//* ... */ #define AUDIO_FILE_SIZE 147500 /* Size of audio file */ #define AUDIO_FILE_ADDRESS 0x08080000 /* Audio file address */ Exported constants /* Exported types ------------------------------------------------------------*/ typedef enum { AUDIO_STATE_IDLE = 0, AUDIO_STATE_INIT, AUDIO_STATE_PLAYING, ...}AUDIO_PLAYBACK_StateTypeDef; typedef enum { AUDIO_ERROR_NONE = 0, AUDIO_ERROR_NOTREADY, AUDIO_ERROR_IO, AUDIO_ERROR_EOF, ...}AUDIO_ErrorTypeDef; typedef enum { BUFFER_OFFSET_NONE = 0, BUFFER_OFFSET_HALF, BUFFER_OFFSET_FULL, ...}BUFFER_StateTypeDef; typedef struct { uint8_t buff[AUDIO_BUFFER_SIZE]; uint32_t fptr; BUFFER_StateTypeDef state; ...}AUDIO_BufferTypeDef; Exported types /* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ AUDIO_ErrorTypeDef AUDIO_Init(void); AUDIO_ErrorTypeDef AUDIO_Start(void); AUDIO_ErrorTypeDef AUDIO_Process(void); AUDIO_ErrorTypeDef AUDIO_Stop(void);Exported functions /* ... */#endif /* __AUDIO_IF_H */
Details