1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- /********************************************************************************
- * 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_8
- #define BEEP_PORT GPIOB
- #define SPK_MUTE_PIN GPIO_Pin_2
- #define SPK_MUTE_PORT GPIOB
- #define HEADSET_PIN GPIO_Pin_13 //耳机检测
- #define HEADSET_PORT GPIOC
- #define CHARGE_PIN GPIO_Pin_3 //充电检测
- #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
|