int16_t parse_cmd_rfm12_ask_1527_send(char *cmd, char *output, uint16_t len) { (void) output; (void) len; uint8_t command[3]; uint8_t delay = 74; uint8_t cnt = 10; uint8_t ret = sscanf_P (cmd, PSTR ("%hhu,%hhu,%hhu %hhu %hhu"),&(command[0]), &(command[1]), &(command[2]), &delay, &cnt); if (ret < 3) return ECMD_ERR_PARSE_ERROR; rfm12_ask_2272_1527_switch(T_1527); rfm12_ask_2272_send(command, delay, cnt); return ECMD_FINAL_OK; }
int16_t parse_cmd_rfm12_ask_2272_send (char *cmd, char *output, uint16_t len) { (void) output; (void) len; uint8_t command[3]; uint8_t delay = 74; uint8_t cnt = 10; #ifdef TEENSY_SUPPORT while (*cmd == ' ') cmd++; command[0] = getIntFromString (cmd); while (*cmd != ',') cmd++; cmd++; command[1] = getIntFromString (cmd); while (*cmd != ',') cmd++; cmd++; command[2] = getIntFromString (cmd); while (*cmd != ' ') cmd++; cmd++; delay = getIntFromString (cmd); while (*cmd != ' ') cmd++; cmd++; cnt = getIntFromString (cmd); int ret = 5; #else int ret = sscanf_P (cmd, PSTR ("%hhu,%hhu,%hhu %hhu %hhu"), &(command[0]), &(command[1]), &(command[2]), &delay, &cnt); #endif RFM12_DEBUG ("ps cmd %u,%u,%u d %u s %u", command[0], command[1], command[2], delay, cnt); if (ret < 3) return ECMD_ERR_PARSE_ERROR; rfm12_ask_2272_send (command, delay, cnt); return ECMD_FINAL_OK; }