aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-02-22 16:16:48 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2015-02-22 16:16:48 +0100
commitd0fb1850606ce003887259675e271a9aade4fda0 (patch)
tree0bf3be59348c0fd64f17c9e9a727e85ffc7bd98b /include
parentba6324930118a62e05d3869f99543c4a7507f105 (diff)
downloadble-toys-d0fb1850606ce003887259675e271a9aade4fda0.tar.gz
ble-toys-d0fb1850606ce003887259675e271a9aade4fda0.tar.bz2
ble-toys-d0fb1850606ce003887259675e271a9aade4fda0.tar.xz
ble-toys-d0fb1850606ce003887259675e271a9aade4fda0.zip
o Starting a new class for all SoilMoisture GATT stuff.
Diffstat (limited to 'include')
-rw-r--r--include/ble/ByteBuffer.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/ble/ByteBuffer.h b/include/ble/ByteBuffer.h
index f884d6e..74a1bf7 100644
--- a/include/ble/ByteBuffer.h
+++ b/include/ble/ByteBuffer.h
@@ -39,8 +39,9 @@ public:
return end - ptr;
}
- inline void setCursor(size_t newCursor) {
+ inline ByteBuffer &setCursor(size_t newCursor) {
ptr = (uint8_t *) &zero[newCursor];
+ return *this;
}
inline void skip(size_t length) {
@@ -52,8 +53,8 @@ public:
ByteBuffer &write16le(uint16_t value);
/**
- * Appends the entire buffer. Make a view if you want to write a part of it.
- */
+ * Appends the entire buffer. Make a view if you want to write a part of it.
+ */
ByteBuffer &write(const ByteBuffer &value);
ByteBuffer &write(const uint8_t *bytes, size_t len);