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 circular_buffer
AccelService.h
- Committer:
- agufal
- Date:
- 2016-03-08
- Revision:
- 9:3708b94b2312
- Child:
- 10:8c5a246b9045
File content as of revision 9:3708b94b2312:
#ifndef ACCELSERVICE_H
#define ACCELSERVICE_H
#include "BLE.h"
#include "Vector.h"
#define SERVICE_UUID 0xA000
#define CHARACTERISTIC_UUID 0xA001
class AccelService {
public:
AccelService();
void updateAccelState(Vector v);
private:
GattCharacteristic _accelState;
int _values[3];
static void disconnectionCallback(const Gap::DisconnectionCallbackParams_t *params){
BLE::Instance().gap().startAdvertising();
}
static void connectionCallback(const Gap::ConnectionCallbackParams_t *params){
BLE::Instance().gap().stopAdvertising();
}
};
#endif //#ifndef ACCELSERVICE_H
