?? microphone.c
字號:
#include "demohs.h"
#include "hal.h"
#include <message.h>
#include <framework.h>
/*
sendMicGainReq
Send a message requesting the lib to send a microphone gain
AT request.
*/
static void sendMicGainReq(int8 increment, uint8 gain)
{
MAKE_MSG(HS_MIC_REQ);
msg->increment = increment;
msg->gain = gain;
putMsg(msg);
}
/*
sendInitialMicGain
Sends the initial mic gain of the headset on connection
establishment. See demohs.h for default values.
*/
void sendInitialMicGain(void)
{
sendMicGainReq(VG_ZERO_INCREMENT, VG_ZERO_GAIN);
}
/*
onMicGainUp
Request to increment the current gain value.
*/
void onMicGainUp(void)
{
sendMicGainReq(VG_VOLUME_UP, VG_ZERO_GAIN);
}
/*
onMicGainDown
Request to decrement the current mic gain value.
*/
void onMicGainDown(void)
{
sendMicGainReq(VG_VOLUME_DOWN, VG_ZERO_GAIN);
}
/*
microphoneGainInd
Called by the headsetframework whenever a VGM is received. This
may be as a result of us sending a HS_MIC_REQ from the app.
*/
void microphoneGainInd(const HS_MIC_IND_T * ind)
{
HALsetMicrophone(ind->gain);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -