17 #ifndef __BLE_DEVICE_INFORMATION_SERVICE_H__ 18 #define __BLE_DEVICE_INFORMATION_SERVICE_H__ 22 #if BLE_FEATURE_GATT_SERVER 52 const char *manufacturersName = NULL,
53 const char *modelNumber = NULL,
54 const char *serialNumber = NULL,
55 const char *hardwareRevision = NULL,
56 const char *firmwareRevision = NULL,
57 const char *softwareRevision = NULL) :
60 (uint8_t *)manufacturersName,
61 (manufacturersName != NULL) ? strlen(manufacturersName) : 0,
62 (manufacturersName != NULL) ? strlen(manufacturersName) : 0,
65 (uint8_t *)modelNumber,
66 (modelNumber != NULL) ? strlen(modelNumber) : 0,
67 (modelNumber != NULL) ? strlen(modelNumber) : 0,
70 (uint8_t *)serialNumber,
71 (serialNumber != NULL) ? strlen(serialNumber) : 0,
72 (serialNumber != NULL) ? strlen(serialNumber) : 0,
75 (uint8_t *)hardwareRevision,
76 (hardwareRevision != NULL) ? strlen(hardwareRevision) : 0,
77 (hardwareRevision != NULL) ? strlen(hardwareRevision) : 0,
80 (uint8_t *)firmwareRevision,
81 (firmwareRevision != NULL) ? strlen(firmwareRevision) : 0,
82 (firmwareRevision != NULL) ? strlen(firmwareRevision) : 0,
85 (uint8_t *)softwareRevision,
86 (softwareRevision != NULL) ? strlen(softwareRevision) : 0,
87 (softwareRevision != NULL) ? strlen(softwareRevision) : 0,
90 static bool serviceAdded =
false;
104 ble.addService(deviceInformationService);
140 #endif // BLE_FEATURE_GATT_SERVER
Abstract away BLE-capable radio transceivers or SOCs.
UUID of the Device Information Service (DIS).
Representation of a GattServer characteristic.
Representation of a GattServer service.
Entry namespace for all BLE API definitions.