123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- /********************************************************************************
- * 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_9
- #define BEEP_PORT GPIOB
- #define SPK_MUTE_PIN GPIO_Pin_15
- #define SPK_MUTE_PORT GPIOA
- #define HEADSET_PIN GPIO_Pin_10 //耳机检测
- #define HEADSET_PORT GPIOB
- #define CHARGE_PIN GPIO_Pin_11 //充电检测
- #define CHARGE_PORT GPIOB
- #define MicEnable()
- #define MicDisable()
- #define HEADSETVOL "AT+CACCP=1,2,2,\"04007e00d3ff000004007f00d6ff00000400b400d9ff00000400b500dcff000004003e00dfff00000400b600e2ff000004007a00e5ff00000400b700e8ff000004002e00ebff00000400b800eeff00000400b800f1ff00000400b900f4ff00000400ba0\
- 0f7ff00000400bc00faff00000400be00fdff00000400f50000000000\"\r\n"
- 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 int cntMeiTiao;
- void SpeakerInit(void);
- void SpeakerCtrl(int en);
- void BeepInit(void);
- void SetBeep(int fre,int tick);
- void SetBeepByNoOS(int fre,int ms);
- void DelayMs(unsigned short ms);
- void SetRingFreq(int fre);
- void SpeakerEnable(void);
- void SpeakerDisable();
- /*********************************begin*****************************************/
- /**********************************end******************************************/
- #endif
|