Added support for sending binary AT data
This commit is contained in:
parent
24172b19f1
commit
79b4f6da20
2 changed files with 11 additions and 0 deletions
|
@ -62,6 +62,16 @@ bool Module::ATsendCommand(const char* cmd) {
|
||||||
return(ATgetResponse());
|
return(ATgetResponse());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Module::ATsendData(uint8_t* data, uint32_t len) {
|
||||||
|
ATemptyBuffer();
|
||||||
|
for(uint32_t i = 0; i < len; i++) {
|
||||||
|
ModuleSerial->write(data[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
ModuleSerial->print(AtLineFeed);
|
||||||
|
return(ATgetResponse());
|
||||||
|
}
|
||||||
|
|
||||||
bool Module::ATgetResponse() {
|
bool Module::ATgetResponse() {
|
||||||
String data;
|
String data;
|
||||||
uint32_t start = millis();
|
uint32_t start = millis();
|
||||||
|
|
|
@ -25,6 +25,7 @@ class Module {
|
||||||
bool ATgetResponse();
|
bool ATgetResponse();
|
||||||
bool ATsendCommand(String& cmd);
|
bool ATsendCommand(String& cmd);
|
||||||
bool ATsendCommand(const char* cmd);
|
bool ATsendCommand(const char* cmd);
|
||||||
|
bool ATsendData(uint8_t* data, uint32_t len);
|
||||||
|
|
||||||
uint8_t SPIgetRegValue(uint8_t reg, uint8_t msb = 7, uint8_t lsb = 0);
|
uint8_t SPIgetRegValue(uint8_t reg, uint8_t msb = 7, uint8_t lsb = 0);
|
||||||
uint8_t SPIreadRegisterBurst(uint8_t reg, uint8_t numBytes, uint8_t* inBytes);
|
uint8_t SPIreadRegisterBurst(uint8_t reg, uint8_t numBytes, uint8_t* inBytes);
|
||||||
|
|
Loading…
Add table
Reference in a new issue