This commit is contained in:
2025-02-20 21:59:33 +03:00
parent eba7ac39c9
commit b6161ed03f
7 changed files with 123 additions and 21 deletions

View File

@@ -90,6 +90,19 @@ int SStextcmd(const char *cmd, data_t *answer){
return MountWriteRead(&d, answer);
}
// the same as SStextcmd, but not adding EOL - send raw 'cmd'
int SSrawcmd(const char *cmd, data_t *answer){
if(!cmd){
DBG("try to send empty command");
return FALSE;
}
data_t d;
d.buf = (uint8_t*) cmd;
d.len = d.maxlen = strlen(cmd);
DBG("send %zd bytes: %s", d.len, d.buf);
return MountWriteReadRaw(&d, answer);
}
/**
* @brief SSgetint - send text command and return integer answer
* @param cmd (i) - command to send