aboutsummaryrefslogtreecommitdiff
path: root/apps/soil-moisture.h
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-02-21 23:58:39 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2015-02-21 23:58:39 +0100
commit5926b05afa21eaac36c185e7fc458710efa30b02 (patch)
tree1d835b53fcb3dbc44b07084155a37874ce8325dc /apps/soil-moisture.h
parenta76e09808905d280282a81958cb4c68f71f18ca4 (diff)
downloadble-toys-5926b05afa21eaac36c185e7fc458710efa30b02.tar.gz
ble-toys-5926b05afa21eaac36c185e7fc458710efa30b02.tar.bz2
ble-toys-5926b05afa21eaac36c185e7fc458710efa30b02.tar.xz
ble-toys-5926b05afa21eaac36c185e7fc458710efa30b02.zip
o Support for reading and writing characteristics.
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 {