69 static uint8_t
Init (uint32_t AudioFreq, uint32_t Volume, uint32_t options);
70 static uint8_t
DeInit (uint32_t options);
71 static uint8_t
AudioCmd (uint8_t* pbuf, uint32_t size, uint8_t
cmd);
113 static uint8_t
Init (uint32_t AudioFreq,
117 static uint32_t Initialized = 0;
120 if (Initialized == 0)
123 if (EVAL_AUDIO_Init(OUTPUT_DEVICE_AUTO, Volume, AudioFreq) != 0)
182 Audio_MAL_Play((uint32_t)pbuf, (size/2));
189 if (EVAL_AUDIO_PauseResume(AUDIO_RESUME, (uint32_t)pbuf, (size/2)) != 0)
212 else if (EVAL_AUDIO_Stop(CODEC_PDWN_SW) != 0)
230 else if (EVAL_AUDIO_PauseResume(AUDIO_PAUSE, (uint32_t)pbuf, (size/2)) != 0)
256 if (EVAL_AUDIO_VolumeCtl(vol) != 0)
274 if (EVAL_AUDIO_Mute(cmd) != 0)
#define AUDIO_STATE_ACTIVE
#define AUDIO_STATE_ERROR
static uint8_t DeInit(uint32_t options)
DeInit Free all resources used by low layer and stops audio-play function.
static uint8_t Init(uint32_t AudioFreq, uint32_t Volume, uint32_t options)
Init Initialize and configures all required resources for audio play function.
#define AUDIO_STATE_PAUSED
static uint8_t MuteCtl(uint8_t cmd)
MuteCtl Mute or Unmute the audio current output.
static uint8_t PeriodicTC(uint8_t cmd)
static uint8_t VolumeCtl(uint8_t vol)
VolumeCtl Set the volume level in %.
static uint8_t AudioState
static uint8_t GetState(void)
GetState Return the current state of the audio machine.
#define AUDIO_STATE_STOPPED
#define AUDIO_STATE_INACTIVE
#define AUDIO_STATE_PLAYING
AUDIO_FOPS_TypeDef AUDIO_OUT_fops
header file for the usbd_audio_out_if.c file.
header file for the usbd_audio_core.c file.
static uint8_t AudioCmd(uint8_t *pbuf, uint32_t size, uint8_t cmd)
AudioCmd Play, Stop, Pause or Resume current file.