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.
Dependents: microbit_rubber_ducky microbit_mouse_BLE microbit_mouse_BLE_daybreak_version microbit_presenter
Fork of nRF51822 by
Diff: nRF51GattServer.cpp
- Revision:
- 175:d0385f84ef92
- Parent:
- 162:ba351b0adc4b
- Child:
- 180:5082f66bb16e
--- a/nRF51GattServer.cpp Wed May 13 08:49:35 2015 +0100
+++ b/nRF51GattServer.cpp Wed May 13 08:49:35 2015 +0100
@@ -271,12 +271,10 @@
/* 1.) Handle CCCD changes */
handle_value = gattsEventP->params.write.handle;
- for (uint8_t i = 0; i<characteristicCount; i++) {
+ for (uint8_t i = 0; i < characteristicCount; i++) {
if ((p_characteristics[i]->getProperties() & (GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_INDICATE | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY)) &&
(nrfCharacteristicHandles[i].cccd_handle == handle_value)) {
- uint16_t cccd_value =
- (gattsEventP->params.write.data[1] << 8) |
- gattsEventP->params.write.data[0]; /* Little Endian but M0 may be mis-aligned */
+ uint16_t cccd_value = (gattsEventP->params.write.data[1] << 8) | gattsEventP->params.write.data[0]; /* Little Endian but M0 may be mis-aligned */
if (((p_characteristics[i]->getProperties() & GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_INDICATE) && (cccd_value & BLE_GATT_HVX_INDICATION)) ||
((p_characteristics[i]->getProperties() & GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY) && (cccd_value & BLE_GATT_HVX_NOTIFICATION))) {
