untested new onewire commands (all except search algos)

This commit is contained in:
2018-01-30 22:16:22 +01:00
parent 55816fc810
commit af35cee030
6 changed files with 250 additions and 35 deletions
+8
View File
@@ -33,6 +33,14 @@ void com_respond_buf(TF_ID frame_id, TF_TYPE type, const uint8_t *buf, uint32_t
}
void com_respond_pb(TF_ID frame_id, TF_TYPE type, PayloadBuilder *pb)
{
uint32_t len;
uint8_t *buf = pb_close(pb, &len);
com_respond_buf(frame_id, type, buf, len);
}
void com_respond_ok(TF_ID frame_id)
{
com_respond_buf(frame_id, MSG_SUCCESS, NULL, 0);
+9
View File
@@ -34,6 +34,15 @@ com_respond_snprintf(TF_ID frame_id, TF_TYPE type, const char *format, ...);
*/
void com_respond_buf(TF_ID frame_id, TF_TYPE type, const uint8_t *buf, uint32_t len);
/**
* Respond using a payload builder's content
*
* @param type - response type byte
* @param frame_id - ID of the original msg
* @param pb - builder
*/
void com_respond_pb(TF_ID frame_id, TF_TYPE type, PayloadBuilder *pb);
/**
* Respond to a TF message with empty body and MSG_SUCCESS type.
*