Sony's LANC camera control protocol project.

Dependencies:   aconno_LANC aconno_bsp aconno_SEGGER_RTT

Committer:
jurica238814
Date:
Thu Jul 12 16:51:44 2018 +0000
Revision:
11:e5f11b96088e
Parent:
6:8cf24e946b0b
Segger RTT added. Charac. extended on 2B.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jurica238814 6:8cf24e946b0b 1
jurica238814 6:8cf24e946b0b 2 // Template allows you to use 'constant' values on non-constant places (XD)
jurica238814 6:8cf24e946b0b 3 template<uint8_t dataSize>
jurica238814 6:8cf24e946b0b 4
jurica238814 6:8cf24e946b0b 5 class ACKService{
jurica238814 6:8cf24e946b0b 6 public:
jurica238814 6:8cf24e946b0b 7 const static uint16_t ACK_SERVICE_UUID = 0xA000;
jurica238814 6:8cf24e946b0b 8 const static uint16_t ACK_CHARA_UUID = 0xA001;
jurica238814 6:8cf24e946b0b 9
jurica238814 6:8cf24e946b0b 10 ACKService(BLEDevice &_ble, uint8_t *_initValues) : ble(_ble), ACK(ACK_CHARA_UUID, _initValues){
jurica238814 6:8cf24e946b0b 11 GattCharacteristic *charTable[] = {&ACK}; // Add characteristick in table
jurica238814 6:8cf24e946b0b 12 GattService AckService(ACK_SERVICE_UUID, charTable, sizeof(charTable)/sizeof(GattCharacteristic *));
jurica238814 6:8cf24e946b0b 13 ble.addService(AckService); // Add service in the BLE
jurica238814 6:8cf24e946b0b 14 }
jurica238814 6:8cf24e946b0b 15 private:
jurica238814 6:8cf24e946b0b 16 BLEDevice &ble;
jurica238814 6:8cf24e946b0b 17 // Create new characteristic
jurica238814 6:8cf24e946b0b 18 WriteOnlyArrayGattCharacteristic<uint8_t, dataSize> ACK;
jurica238814 6:8cf24e946b0b 19 };