test
Dependencies: BLE_API nRF51822 mbed
Fork of KS7 by
Diff: CurrentTimeService.h
- Branch:
- KS3
- Revision:
- 33:d7b53d548c33
- Parent:
- 31:b5e19d153db4
- Child:
- 36:3cca74c30551
--- a/CurrentTimeService.h Mon Aug 01 08:58:31 2016 +0000 +++ b/CurrentTimeService.h Wed Aug 10 06:56:36 2016 +0000 @@ -169,9 +169,23 @@ // for BLE GATT callback (optional) virtual void onDataWritten(const GattWriteCallbackParams *params) { +#ifdef UART_DEBUG + //pc.printf("onDataWritten START\r\n"); +#endif if (params->handle == currentTimeCharacteristic.getValueHandle()) { memcpy((void *)&valueBytes, params->data, params->len); +#ifdef UART_DEBUG + int i; + pc.printf("TIME=>"); + for(i = 0; i < sizeof(valueBytes); i++){ + pc.printf("[%02X]", valueBytes[i]); + } + pc.printf("\r\n"); +#endif } +#ifdef UART_DEBUG + //pc.printf("onDataWritten END\r\n"); +#endif } int getCounter() const { return counter; }