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 mbed nRF51822
Fork of SmartPlugBLE by
main.cpp
- Committer:
- Slepnir
- Date:
- 2015-07-08
- Revision:
- 2:6db5c9a2894c
- Parent:
- 0:25ad6eba7916
File content as of revision 2:6db5c9a2894c:
#include "mbed.h"
#include "SmartPlugBLE.h"
#include "BLECommunication.h"
#include "BLE.h"
BLE ble;
void disconnectionCallback(Gap::Handle_t handle, Gap::DisconnectionReason_t reason)
{
printf("reason = x%08x\r\n",reason);
ble.gap().startAdvertising();
}
int main(void)
{
ble.gap().onDisconnection(disconnectionCallback);
Ticker ticker;
SmartPlugBLE smartPlugBLE;
BLECommunication bleComm(smartPlugBLE,ble);
}
