12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- /********************************************************************************
- * File Name: Audio.h
- * Function Describe: Header file for Audio.c
- * Explain:
- * Writer: ShiLiangWen
- * Date: 2015-6-15
- *******************************************************************************/
- #ifndef __AUDIO_H
- #define __AUDIO_H
- #define BEEP_PIN GPIO_Pin_3
- #define BEEP_PORT GPIOB
- #define SPK_MAIN_MUTE_PIN GPIO_Pin_13
- #define SPK_MAIN_MUTE_PORT GPIOC
- #define SPK_MAIN_MUTE_LOW SPK_MAIN_MUTE_PORT->BRR=SPK_MAIN_MUTE_PIN
- #define SPK_MAIN_MUTE_HIGH SPK_MAIN_MUTE_PORT->BSRR=SPK_MAIN_MUTE_PIN
- #define SPK_MUTE_PIN GPIO_Pin_14
- #define SPK_MUTE_PORT GPIOC
- #define SPK_BOOST_PIN GPIO_Pin_15
- #define SPK_BOOST_PROT GPIOC
- #define MicEnable()
- #define MicDisable()
- //#define SpeakerEnable() SPK_MUTE_PORT->BRR=SPK_MUTE_PIN//Speaker Enable//BSRR
- #define SpeakerDisable() SPK_MUTE_PORT->BRR=SPK_MUTE_PIN//Speaker Disable //BRR
- typedef struct{
- unsigned short freq;
- unsigned short time;
- }SUT_RING_ELEMENT;
- typedef struct{
- unsigned short start;//0-stop 1-start
- unsigned short handle;//µ±Ç°²¥·Åµ½µÄλÖÃ
- unsigned short ElementNum;
- SUT_RING_ELEMENT *pElement;
- }SUT_RING;
- extern SUT_RING sutRing;
- extern unsigned char MuteFlag;
- void SpeakerInit(void);
- void SpeakerCtrl(int en);
- void SetBeep(int fre,int tick);
- void SetBeepByNoOS(int fre,int ms);
- void DelayMs(unsigned short ms);
- void SetRingFreq(int fre);
- extern int cntMeiTiao;
- void SpeakerEnable(void);
- /*********************************begin*****************************************/
- /**********************************end******************************************/
- #endif
|