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-18
- Revision:
- 17:9eb2b6fbbda9
- Parent:
- 9:124ae067ae27
- Child:
- 22:260313bcf4d0
File content as of revision 17:9eb2b6fbbda9:
#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 BLERadio */
virtual ble_error_t setAdvertising(GapAdvertisingParams &, GapAdvertisingData &, 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);
private:
RawSerial uart;
/* nRF51 Functions */
void uartCallback(void);
};
#endif
