Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: aconno_LANC aconno_bsp aconno_SEGGER_RTT
AckService.h
00001 00002 // Template allows you to use 'constant' values on non-constant places (XD) 00003 template<uint8_t dataSize> 00004 00005 class ACKService{ 00006 public: 00007 const static uint16_t ACK_SERVICE_UUID = 0xA000; 00008 const static uint16_t ACK_CHARA_UUID = 0xA001; 00009 00010 ACKService(BLEDevice &_ble, uint8_t *_initValues) : ble(_ble), ACK(ACK_CHARA_UUID, _initValues){ 00011 GattCharacteristic *charTable[] = {&ACK}; // Add characteristick in table 00012 GattService AckService(ACK_SERVICE_UUID, charTable, sizeof(charTable)/sizeof(GattCharacteristic *)); 00013 ble.addService(AckService); // Add service in the BLE 00014 } 00015 private: 00016 BLEDevice &ble; 00017 // Create new characteristic 00018 WriteOnlyArrayGattCharacteristic<uint8_t, dataSize> ACK; 00019 };
Generated on Tue Jul 26 2022 04:57:25 by
1.7.2