1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
26
27
28
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
61
/* ... */
#ifndef __WAVEPLAYER_H
#define __WAVEPLAYER_H
#include "main.h"
Includes
typedef enum
{
BUFFER_OFFSET_NONE = 0,
BUFFER_OFFSET_HALF,
BUFFER_OFFSET_FULL,
...}BUFFER_StateTypeDef;
typedef struct
{
uint32_t ChunkID;
uint32_t FileSize;
uint32_t FileFormat;
uint32_t SubChunk1ID;
uint32_t SubChunk1Size;
uint16_t AudioFormat;
uint16_t NbrChannels;
uint32_t SampleRate;
uint32_t ByteRate;
uint16_t BlockAlign;
uint16_t BitPerSample;
uint32_t SubChunk2ID;
uint32_t SubChunk2Size;
...}WAVE_FormatTypeDef;Exported types
void WavePlayBack(uint32_t AudioFreq);
int WavePlayerInit(uint32_t AudioFreq);
void WavePlayerStop(void);
void WavePlayerPauseResume(uint32_t state);
void WavePlayerStart(void);
void WavePlayer_CallBack(void);Exported functions
/* ... */#endif