/** ****************************************************************************** * @file audioplayer_app.h * @author MCD Application Team * @brief header of audio player application file ****************************************************************************** * @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_PLAYER_APP_H#define__AUDIO_PLAYER_APP_H#ifdef__cplusplusextern"C"{#endif/* Includes ------------------------------------------------------------------*/#include"main.h"#include"../Common/audio_if.h"/* #define AUDIO_USE_SPIRIT_EQUALIZER *//* Equalizer support removed for this version */#ifdefAUDIO_USE_SPIRIT_EQUALIZER#undefAUDIO_USE_SPIRIT_EQUALIZER/* Make sure Audio Equalizer support is disabled even if exported outside this file */#endif#ifdefined(AUDIO_USE_SPIRIT_EQUALIZER)#include"spiritEQ.h"#include"spiritLdCtrl.h"/* ... */#endif/* AUDIO_USE_SPIRIT_EQUALIZER */Includes/* Exported constants --------------------------------------------------------*/#defineMUTE_OFF0x00#defineMUTE_ON0x01#defineDEFAULT_AUDIO_VOLUME50#defineCALIBRATION_AUDIOPLAYER_SETTING_BKPRTC_BKP_DR0#defineCALIBRATION_AUDIOPLAYER_EQU1_BKPRTC_BKP_DR1#defineCALIBRATION_AUDIOPLAYER_EQU2_BKPRTC_BKP_DR2#defineCALIBRATION_AUDIOPLAYER_EQU3_BKPRTC_BKP_DR3#defineCALIBRATION_AUDIOPLAYER_EQU4_BKPRTC_BKP_DR4#defineCALIBRATION_AUDIOPLAYER_EQU5_BKPRTC_BKP_DR5#defineCALIBRATION_AUDIOPLAYER_LOUD_BKPRTC_BKP_DR610 defines#ifdefined(AUDIO_USE_SPIRIT_EQUALIZER)#defineEQUI_DB_TO_PERC(x)(((int16_t)(x+SPIRIT_EQ_MAX_GAIN_DB)*100)/40)#definePERC_TO_EQUI_DB(x)(((int16_t)(x-50)*SPIRIT_EQ_MAX_GAIN_DB)/50)#definePERC_TO_LDNS_DB(x)(1<<(SPIRIT_LDCTRL_GAIN_Q_BITS+(int16_t)(50-x)*8/100))/* Equalizer Band Configuration */#defineSET_BAND_PRMS(band,_fltType,_centerHz,_widthHz,_gainDb)\(band)->fltType=_fltType;\(band)->centerHz=_centerHz;\(band)->widthHz=_widthHz;\(band)->gainDb=_gainDb;.../* ... */#endif/* AUDIO_USE_SPIRIT_EQUALIZER */typedefenum{AUDIOPLAYER_ERROR_NONE=0,AUDIOPLAYER_ERROR_IO,AUDIOPLAYER_ERROR_HW,AUDIOPLAYER_ERROR_MEM,AUDIOPLAYER_ERROR_FORMAT_NOTSUPPORTED,...}AUDIOPLAYER_ErrorTypdef;#defineAUDIOPLAYER_StateTypdefOUT_StateTypdefExported constants/* Exported types ------------------------------------------------------------*/Exported types/* Exported macros -----------------------------------------------------------*//* Exported functions ------------------------------------------------------- */AUDIOPLAYER_ErrorTypdefAUDIOPLAYER_Init(uint8_tvolume);AUDIOPLAYER_ErrorTypdefAUDIOPLAYER_Play(uint32_tfrequency);AUDIOPLAYER_ErrorTypdefAUDIOPLAYER_Stop(void);AUDIOPLAYER_ErrorTypdefAUDIOPLAYER_Pause(void);AUDIOPLAYER_ErrorTypdefAUDIOPLAYER_Resume(void);AUDIOPLAYER_ErrorTypdefAUDIOPLAYER_Mute(uint8_tstate);AUDIOPLAYER_ErrorTypdefAUDIOPLAYER_GetFileInfo(char*file,WAV_InfoTypedef*info);AUDIOPLAYER_ErrorTypdefAUDIOPLAYER_SelectFile(char*file);AUDIOPLAYER_StateTypdefAUDIOPLAYER_GetState(void);AUDIOPLAYER_ErrorTypdefAUDIOPLAYER_Process(void);AUDIOPLAYER_ErrorTypdefAUDIOPLAYER_DeInit(void);uint32_tAUDIOPLAYER_GetProgress(void);AUDIOPLAYER_ErrorTypdefAUDIOPLAYER_SetVolume(uint32_tvolume);uint32_tAUDIOPLAYER_GetVolume(void);AUDIOPLAYER_ErrorTypdefAUDIOPLAYER_NotifyEndOfFile(void);AUDIOPLAYER_ErrorTypdefAUDIOPLAYER_SetPosition(uint32_tposition);#ifdefined(AUDIO_USE_SPIRIT_EQUALIZER)voidAUDIO_SetEq(uint8_tBandNum,int16_tNewGainValue);voidAUDIO_SetEqParams(uint32_tloudness_perc);voidAUDIO_SetLoudnessGain(int16_tNewGainValue);/* ... */#endif/* AUDIO_USE_SPIRIT_EQUALIZER */#ifdef__cplusplus}extern "C" { ... }#endif/* ... */#endif/*__AUDIO_PLAYER_APP_H */
Details
Show: from
Types: Columns:
All items filtered out
All items filtered out
This file uses the notable symbols shown below. Click anywhere in the file to view more details.