MicroBit as BLE gamepad
Fork of nRF51822 by
Diff: source/nRF5xGap.h
- Revision:
- 571:bbf6410b6a89
- Parent:
- 570:f162898cb6c4
- Child:
- 575:7023a8204a1b
diff -r f162898cb6c4 -r bbf6410b6a89 source/nRF5xGap.h --- a/source/nRF5xGap.h Mon Jan 11 10:19:21 2016 +0000 +++ b/source/nRF5xGap.h Mon Jan 11 10:19:22 2016 +0000 @@ -44,6 +44,8 @@ class nRF5xGap : public Gap { public: + static nRF5xGap &getInstance(); + /* Functions that must be implemented from Gap */ virtual ble_error_t setAddress(AddressType_t type, const Address_t address); virtual ble_error_t getAddress(AddressType_t *typeP, Address_t address); @@ -74,8 +76,6 @@ virtual ble_error_t setPreferredConnectionParams(const ConnectionParams_t *params); virtual ble_error_t updateConnectionParams(Handle_t handle, const ConnectionParams_t *params); - virtual ble_error_t reset(void); - virtual ble_error_t initRadioNotification(void) { if (ble_radio_notification_init(NRF_APP_PRIORITY_HIGH, NRF_RADIO_NOTIFICATION_DISTANCE_800US, radioNotificationStaticCallback) == NRF_SUCCESS) { return BLE_ERROR_NONE; @@ -196,12 +196,6 @@ private: uint16_t m_connectionHandle; - - /* - * Allow instantiation from nRF5xn when required. - */ - friend class nRF5xn; - nRF5xGap() { m_connectionHandle = BLE_CONN_HANDLE_INVALID; }