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.
Fork of nRF51822 by
Diff: nRFDiscoveredCharacteristic.h
- Revision:
- 327:0ea2b4d48212
- Parent:
- 326:77dd705571e2
- Child:
- 330:0a8ebc25b57c
--- a/nRFDiscoveredCharacteristic.h Fri Jun 19 15:55:31 2015 +0100
+++ b/nRFDiscoveredCharacteristic.h Fri Jun 19 15:55:32 2015 +0100
@@ -55,6 +55,7 @@
props._authSignedWrite = propsIn.auth_signed_wr;
}
+#if 0
public:
/**
* Initiate (or continue) a read for the value attribute, optionally at a
@@ -68,8 +69,11 @@
* BLE_ERROR_OPERATION_NOT_PERMITTED due to the characteristic's properties.
*/
virtual ble_error_t read(uint16_t offset = 0) const {
- if (!props.read()) {
- return BLE_ERROR_OPERATION_NOT_PERMITTED;
+
+ printf("in nRFDiscoveredCharacteristic::read\r\n");
+ ble_error_t err = DiscoveredCharacteristic::read(offset);
+ if (err != BLE_ERROR_NONE) {
+ return err;
}
uint32_t rc = sd_ble_gattc_read(connHandle, valueHandle, offset);
@@ -108,8 +112,9 @@
* BLE_ERROR_OPERATION_NOT_PERMITTED due to the characteristic's properties.
*/
virtual ble_error_t writeWoResponse(uint16_t length, const uint8_t *value) const {
- if (!props.writeWoResp()) {
- return BLE_ERROR_OPERATION_NOT_PERMITTED;
+ ble_error_t err = DiscoveredCharacteristic::writeWoResponse(length, value);
+ if (err != BLE_ERROR_NONE) {
+ return err;
}
ble_gattc_write_params_t writeParams = {
@@ -137,6 +142,7 @@
return BLE_ERROR_INVALID_STATE;
}
}
+#endif
};
#endif /* __NRF_DISCOVERED_CHARACTERISTIC_H__ */
\ No newline at end of file
