aboutsummaryrefslogtreecommitdiff
path: root/apps/soil-moisture.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/soil-moisture.h')
-rw-r--r--apps/soil-moisture.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/soil-moisture.h b/apps/soil-moisture.h
index 4f19de1..c960f79 100644
--- a/apps/soil-moisture.h
+++ b/apps/soil-moisture.h
@@ -71,8 +71,13 @@ struct sm_set_update_interval_req {
struct sm_set_update_interval_res {
} __attribute__((packed));
+#define SM_REQ_HEADER_SIZE 1
+
struct sm_req {
+ // header
uint8_t code;
+
+ // body
union {
struct sm_get_sensor_count_req get_sensor_count;
struct sm_get_value_req get_value;
@@ -84,7 +89,6 @@ struct sm_req {
} __attribute__((packed));
} __attribute__((packed));
-// len + code
#define SM_RES_HEADER_SIZE 1
struct sm_res {