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.
Fork of BLE_API by
hw/nrf51822.h
- Committer:
- ktownsend
- Date:
- 2013-12-10
- Revision:
- 2:ffc5216bd2cc
- Parent:
- 1:fd3ec64b2345
- Child:
- 7:5e1f0d7f7c7d
File content as of revision 2:ffc5216bd2cc:
#ifndef __NRF51822_H__
#define __NRF51822_H__
#include "mbed.h"
#include "blecommon.h"
#include "bleradio.h"
#include "GattService.h"
class nRF51822 : public BLERadio
{
public:
nRF51822();
virtual ~nRF51822(void);
/* Functions that mus be implemented from NRFRadio */
virtual ble_error_t setAdvertising(GapAdvertisingParams &, GapAdvertisingData &);
virtual ble_error_t addService(GattService &);
virtual ble_error_t readCharacteristic(GattService &, GattCharacteristic &, uint8_t[], uint16_t);
virtual ble_error_t writeCharacteristic(GattService &, GattCharacteristic &, uint8_t[], uint16_t);
virtual ble_error_t start(void);
virtual ble_error_t stop(void);
virtual ble_error_t reset(void);
void test(void);
private:
Serial uart;
/* nRF51 Functions */
void uartCallback(void);
};
#endif
