Created
January 23, 2019 06:15
-
-
Save arihantdaga/0ecc7cb9f1aedb47d6041202ec5fce6d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool checkUnreadMessage(bool changeStatusToRead = true, SMSARRAY {Takes a pointer to array of SMS structs} , uint8_t skip = 0,uint8_t limit = 10 ){ | |
sendAT(GF("+CMGL=\"REC UNREAD\","), static_cast<const uint8_t>(!changeStatusToRead)); | |
if (waitResponse(5000L, GF(GSM_NL "+CMGL: \"")) != 1) { | |
stream.readString(); | |
return {}; | |
} | |
// read Messages from this | |
use skip and limit to control what messages to be filled in the sms pointer | |
// SMSARRAY.push(SMS) | |
// return waitResponse() == 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment