Bluetooth Low Energy enabled device with "Switch" feature, compatible with BlueST Protocol.
Bluetooth Low Energy enabled device with "Switch" feature, compatible with BlueST Protocol.
Diff: source/CustomService.h
- Revision:
- 5:1651815d2a74
- Parent:
- 4:67ff1ddd11e2
- Child:
- 6:d00b2e9a016e
--- a/source/CustomService.h Thu May 31 18:30:29 2018 +0000 +++ b/source/CustomService.h Thu May 31 19:02:30 2018 +0000 @@ -43,8 +43,10 @@ #include "ble_utils.h" -#define SWITCH_DATA_LENGTH (sizeof(uint16_t) + sizeof(uint8_t)) -#define SWITCH_DATA_INDEX (sizeof(uint16_t)) +#define TIMESTAMP_LENGTH (sizeof(uint16_t)) +#define SWITCH_LENGTH (sizeof(uint8_t)) +#define SWITCH_DATA_LENGTH (TIMESTAMP_LENGTH + SWITCH_LENGTH) +#define SWITCH_DATA_INDEX (TIMESTAMP_LENGTH) const UUID::LongUUIDBytes_t CUSTOM_SWITCH_SERVICE_UUID = {0x00,0x00,0x00,0x00,0x00,0x01,0x11,0xe1,0xac,0x36,0x00,0x02,0xa5,0xd5,0xc5,0x1b}; const UUID::LongUUIDBytes_t CUSTOM_SWITCH_CHARACTERISTIC_UUID = {0x20,0x00,0x00,0x00,0x00,0x01,0x11,0xe1,0xac,0x36,0x00,0x02,0xa5,0xd5,0xc5,0x1b};