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.
Dependencies: BLE_API X_NUCLEO_IDB0XA1 mbed
Fork of N06_NAND by
bricks/updated.h
- Committer:
- hux
- Date:
- 2017-01-08
- Revision:
- 23:2e73c391bb12
File content as of revision 23:2e73c391bb12:
// updated.h - check whether a characteristic has been updated
// note: can only used within 'onWritten' callback
//
// Synopsis:
//
// See also: CHARACTERISTIC, GET, SET, ONWRITTEN
//
#ifndef _UPDATED_H_
#define _UPDATED_H_
#include "ble/Gap.h"
#include "bricks/blob.h"
inline int updated(Blob &o,GattCharacteristic &chr) // has char. been updated?
{
const GattWriteCallbackParams *p = o.pWritten;
if (!p)
return 0; // no update!
else if(p->handle == chr.getValueHandle())
return 1;
else
return 0;
}
#endif // _SET_H_
