summaryrefslogtreecommitdiff
path: root/hid/src
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-07-11 06:10:23 +0300
committerMaxim Devaev <[email protected]>2022-07-11 06:10:23 +0300
commit1973a1e6e0b7962d0c6e9ad54f41d078923e43d3 (patch)
tree1607e5a9c0d951bd9ff23a88a883f9b86b6ff00f /hid/src
parentdc1bc121c89600e2d5a18458283aa5960aa39e24 (diff)
refactoring, fixed read_block -> update_block
Diffstat (limited to 'hid/src')
-rw-r--r--hid/src/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/hid/src/main.cpp b/hid/src/main.cpp
index 99c533b3..6f84fbc2 100644
--- a/hid/src/main.cpp
+++ b/hid/src/main.cpp
@@ -54,7 +54,7 @@ static DRIVERS::Storage *_storage = nullptr;
static int _readOutputs(void) {
uint8_t data[8];
- _storage->read_block(data, 0, 8);
+ _storage->readBlock(data, 0, 8);
if (data[0] != PROTO::MAGIC || PROTO::crc16(data, 6) != PROTO::merge8(data[6], data[7])) {
return -1;
}
@@ -73,7 +73,7 @@ static void _writeOutputs(uint8_t mask, uint8_t outputs, bool force) {
data[0] = PROTO::MAGIC;
data[1] = (old & ~mask) | outputs;
PROTO::split16(PROTO::crc16(data, 6), &data[6], &data[7]);
- _storage->read_block(data, 0, 8);
+ _storage->updateBlock(data, 0, 8);
}
#endif