1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
32
36
37
38
39
40
41
42
43
44
49
50
51
57
62
69
70
75
82
83
88
/* ... */
#include "audio_if.h"
/* ... */
/* ... */
Includes
static AUDIO_IFTypeDef AudioIf;
AUDIO_ProcessTypdef haudio;
External variables
/* ... */
void AUDIO_IF_RegisterCallbacks(pFunc tc_cb,
pFunc ht_cb,
pFunc err_cb)
{
AudioIf.TransferComplete_CallBack = tc_cb;
AudioIf.HalfTransfer_CallBack = ht_cb;
AudioIf.Error_CallBack = err_cb;
}{ ... }
/* ... */
void BSP_AUDIO_OUT_TransferComplete_CallBack(void)
{
if(AudioIf.TransferComplete_CallBack)
{
AudioIf.TransferComplete_CallBack();
}if (AudioIf.TransferComplete_CallBack) { ... }
}{ ... }
/* ... */
void BSP_AUDIO_OUT_HalfTransfer_CallBack(void)
{
if (AudioIf.HalfTransfer_CallBack )
{
AudioIf.HalfTransfer_CallBack();
}if (AudioIf.HalfTransfer_CallBack) { ... }
}{ ... }
/* ... */
void BSP_AUDIO_OUT_Error_CallBack(void)
{
if(AudioIf.Error_CallBack)
{
AudioIf.Error_CallBack();
}if (AudioIf.Error_CallBack) { ... }
}{ ... }