Sony's LANC camera control protocol project.
Dependencies: aconno_LANC aconno_bsp aconno_SEGGER_RTT
AckService.h
- Committer:
- jurica238814
- Date:
- 2018-07-12
- Revision:
- 11:e5f11b96088e
- Parent:
- 6:8cf24e946b0b
File content as of revision 11:e5f11b96088e:
// Template allows you to use 'constant' values on non-constant places (XD) template<uint8_t dataSize> class ACKService{ public: const static uint16_t ACK_SERVICE_UUID = 0xA000; const static uint16_t ACK_CHARA_UUID = 0xA001; ACKService(BLEDevice &_ble, uint8_t *_initValues) : ble(_ble), ACK(ACK_CHARA_UUID, _initValues){ GattCharacteristic *charTable[] = {&ACK}; // Add characteristick in table GattService AckService(ACK_SERVICE_UUID, charTable, sizeof(charTable)/sizeof(GattCharacteristic *)); ble.addService(AckService); // Add service in the BLE } private: BLEDevice &ble; // Create new characteristic WriteOnlyArrayGattCharacteristic<uint8_t, dataSize> ACK; };