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: nrf51-sdk
Dependents: microbit-dal microbit-ble-open microbit-dal-eddystone microbit-dal-ble-accelerometer-example ... more
Diff: nRF51822n.h
- Revision:
- 370:295f76db798e
- Parent:
- 362:6fa0d4d555f6
- Child:
- 371:8f7d2137727a
--- a/nRF51822n.h Thu Jul 02 09:08:45 2015 +0100
+++ b/nRF51822n.h Mon Jul 06 10:13:26 2015 +0100
@@ -18,44 +18,39 @@
#define __NRF51822_H__
#include "mbed.h"
-#include "ble/blecommon.h"
-#include "ble/BLE.h"
+#include "blecommon.h"
+#include "BLEDevice.h"
#include "nRF51Gap.h"
#include "nRF51GattServer.h"
-#include "nRF51GattClient.h"
-#include "nRF51SecurityManager.h"
#include "btle.h"
+#include "btle_security.h"
-class nRF51822n : public BLEInstanceBase
+class nRF51822n : public BLEDeviceInstanceBase
{
public:
nRF51822n(void);
virtual ~nRF51822n(void);
- virtual ble_error_t init(void);
- virtual ble_error_t shutdown(void);
virtual const char *getVersion(void);
- virtual Gap &getGap() {
- return nRF51Gap::getInstance();
- };
- virtual const Gap &getGap() const {
+ virtual Gap &getGap() {
return nRF51Gap::getInstance();
};
virtual GattServer &getGattServer() {
return nRF51GattServer::getInstance();
};
- virtual const GattServer &getGattServer() const {
- return nRF51GattServer::getInstance();
- };
- virtual GattClient &getGattClient() {
- return nRF51GattClient::getInstance();
- }
- virtual const SecurityManager &getSecurityManager() const {
- return nRF51SecurityManager::getInstance();
- }
- virtual SecurityManager &getSecurityManager() {
- return nRF51SecurityManager::getInstance();
+
+ virtual ble_error_t setTxPower(int8_t txPower);
+ virtual void getPermittedTxPowerValues(const int8_t **valueArrayPP, size_t *countP);
+
+ virtual ble_error_t init(void);
+ virtual ble_error_t shutdown(void);
+ virtual ble_error_t reset(void);
+ virtual ble_error_t initializeSecurity(bool enableBonding = true,
+ bool requireMITM = true,
+ Gap::SecurityIOCapabilities_t iocaps = Gap::IO_CAPS_NONE,
+ const Gap::Passkey_t passkey = NULL) {
+ return btle_initializeSecurity(enableBonding, requireMITM, iocaps, passkey);
}
virtual void waitForEvent(void);
};