Browse Source

Add DTMF and audio funcs

v_master
Volodymyr Shymanskyy 7 years ago
parent
commit
89eed1d9bb
1 changed files with 31 additions and 0 deletions
  1. +31
    -0
      TinyGsmClientA6.h

+ 31
- 0
TinyGsmClientA6.h View File

@ -474,6 +474,37 @@ public:
return waitResponse() == 1;
}
// 0-9,*,#,A,B,C,D
bool dtmfSend(char cmd) {
sendAT(GF("+VTS="), cmd);
return waitResponse() == 1;
}
// Duration in milliseconds
bool dtmfSetDuration(unsigned ms) {
sendAT(GF("+VTD="), ms / 100); // VTD accepts in 1/10 of a second
return waitResponse() == 1;
}
/*
* Audio functions
*/
bool audioSetHeadphones() {
sendAT(GF("+SNFS=0"));
return waitResponse() == 1;
}
bool audioSetSpeaker() {
sendAT(GF("+SNFS=1"));
return waitResponse() == 1;
}
bool audioMuteMic(bool mute) {
sendAT(GF("+CMUT="), mute);
return waitResponse() == 1;
}
/*
* Messaging functions
*/


Loading…
Cancel
Save