Devchannel Team / X_NUCLEO_IDB0XA1

Dependents:   Hello_BLE F446RE-BLE

Fork of X_NUCLEO_IDB0XA1 by ST

Revision:
92:709d44dc869a
Parent:
90:26c0c9807ab4
Child:
93:728699ac5613
Child:
102:a6f233cb1fed
--- a/BlueNRGGattServer.cpp	Thu Jul 23 09:44:24 2015 +0200
+++ b/BlueNRGGattServer.cpp	Thu Jul 23 14:22:55 2015 +0200
@@ -206,7 +206,7 @@
         for(uint8_t descIndex=0; descIndex<p_char->getDescriptorCount(); descIndex++) {
             GattAttribute *descriptor = p_char->getDescriptor(descIndex);
             uint16_t shortUUID = descriptor->getUUID().getShortUUID();
-            const uint8_t uuidArray[] = {(shortUUID>>8)&0xFF, (shortUUID&0xFF)};
+            const uint8_t uuidArray[] = {(uint8_t)((shortUUID>>8)&0xFF), (uint8_t)(shortUUID&0xFF)};
             ret = aci_gatt_add_char_desc(service.getHandle(), p_char->getValueAttribute().getHandle(), 
             CHAR_DESC_TYPE_16_BIT, uuidArray, descriptor->getMaxLength(), descriptor->getInitialLength(), 
             descriptor->getValuePtr(), CHAR_DESC_SECURITY_PERMISSION, CHAR_DESC_ACCESS_PERMISSION, GATT_NOTIFY_ATTRIBUTE_WRITE,