I2C to BLE nano with notifications to pi using original mbed os code
Dependencies: BLE_API mbed nRF51822
Fork of BLE_notifications by
Diff: ButtonService.h
- Revision:
- 14:700ba072d1a0
- Parent:
- 13:d4448d59ab69
- Child:
- 15:d117591084ff
diff -r d4448d59ab69 -r 700ba072d1a0 ButtonService.h --- a/ButtonService.h Wed Apr 19 01:22:46 2017 +0000 +++ b/ButtonService.h Wed Apr 19 01:47:36 2017 +0000 @@ -30,8 +30,10 @@ ble.gattServer().addService(buttonService); } - void updateButtonState(uint8_t newState) { - ble.gattServer().write(buttonState.getValueHandle(), (uint8_t *)&newState, sizeof(uint8_t)); + //void updateButtonState(uint8_t newState) { + void updateButtonState(uint8_t *newState) { + //ble.gattServer().write(buttonState.getValueHandle(), (uint8_t *)&newState, sizeof(uint8_t)); + ble.gattServer().write(buttonState.getValueHandle(), newState, sizeof(uint8_t)*16); } private: