fdsf
Fork of nRF51822 by
source/nRF5xn.h@388:db85a09c27ef, 2015-07-21 (annotated)
- Committer:
- rgrover1
- Date:
- Tue Jul 21 13:23:44 2015 +0100
- Revision:
- 388:db85a09c27ef
- Child:
- 458:b42881afcc6e
Synchronized with git rev 0eb58d86
Author: Rohit Grover
rename nRF51... to nRF5x...
This prepares us to support nRF52.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rgrover1 | 388:db85a09c27ef | 1 | /* mbed Microcontroller Library |
rgrover1 | 388:db85a09c27ef | 2 | * Copyright (c) 2006-2013 ARM Limited |
rgrover1 | 388:db85a09c27ef | 3 | * |
rgrover1 | 388:db85a09c27ef | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
rgrover1 | 388:db85a09c27ef | 5 | * you may not use this file except in compliance with the License. |
rgrover1 | 388:db85a09c27ef | 6 | * You may obtain a copy of the License at |
rgrover1 | 388:db85a09c27ef | 7 | * |
rgrover1 | 388:db85a09c27ef | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
rgrover1 | 388:db85a09c27ef | 9 | * |
rgrover1 | 388:db85a09c27ef | 10 | * Unless required by applicable law or agreed to in writing, software |
rgrover1 | 388:db85a09c27ef | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
rgrover1 | 388:db85a09c27ef | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
rgrover1 | 388:db85a09c27ef | 13 | * See the License for the specific language governing permissions and |
rgrover1 | 388:db85a09c27ef | 14 | * limitations under the License. |
rgrover1 | 388:db85a09c27ef | 15 | */ |
rgrover1 | 388:db85a09c27ef | 16 | |
rgrover1 | 388:db85a09c27ef | 17 | #ifndef __NRF51822_H__ |
rgrover1 | 388:db85a09c27ef | 18 | #define __NRF51822_H__ |
rgrover1 | 388:db85a09c27ef | 19 | |
rgrover1 | 388:db85a09c27ef | 20 | #include "mbed.h" |
rgrover1 | 388:db85a09c27ef | 21 | #include "ble/blecommon.h" |
rgrover1 | 388:db85a09c27ef | 22 | #include "ble/BLE.h" |
rgrover1 | 388:db85a09c27ef | 23 | #include "nRF5xGap.h" |
rgrover1 | 388:db85a09c27ef | 24 | #include "nRF5xGattServer.h" |
rgrover1 | 388:db85a09c27ef | 25 | #include "nRF5xGattClient.h" |
rgrover1 | 388:db85a09c27ef | 26 | #include "nRF5xSecurityManager.h" |
rgrover1 | 388:db85a09c27ef | 27 | #include "btle.h" |
rgrover1 | 388:db85a09c27ef | 28 | |
rgrover1 | 388:db85a09c27ef | 29 | class nRF5xn : public BLEInstanceBase |
rgrover1 | 388:db85a09c27ef | 30 | { |
rgrover1 | 388:db85a09c27ef | 31 | public: |
rgrover1 | 388:db85a09c27ef | 32 | nRF5xn(void); |
rgrover1 | 388:db85a09c27ef | 33 | virtual ~nRF5xn(void); |
rgrover1 | 388:db85a09c27ef | 34 | |
rgrover1 | 388:db85a09c27ef | 35 | virtual ble_error_t init(void); |
rgrover1 | 388:db85a09c27ef | 36 | virtual ble_error_t shutdown(void); |
rgrover1 | 388:db85a09c27ef | 37 | virtual const char *getVersion(void); |
rgrover1 | 388:db85a09c27ef | 38 | |
rgrover1 | 388:db85a09c27ef | 39 | virtual Gap &getGap() { |
rgrover1 | 388:db85a09c27ef | 40 | return nRF5xGap::getInstance(); |
rgrover1 | 388:db85a09c27ef | 41 | }; |
rgrover1 | 388:db85a09c27ef | 42 | virtual const Gap &getGap() const { |
rgrover1 | 388:db85a09c27ef | 43 | return nRF5xGap::getInstance(); |
rgrover1 | 388:db85a09c27ef | 44 | }; |
rgrover1 | 388:db85a09c27ef | 45 | virtual GattServer &getGattServer() { |
rgrover1 | 388:db85a09c27ef | 46 | return nRF5xGattServer::getInstance(); |
rgrover1 | 388:db85a09c27ef | 47 | }; |
rgrover1 | 388:db85a09c27ef | 48 | virtual const GattServer &getGattServer() const { |
rgrover1 | 388:db85a09c27ef | 49 | return nRF5xGattServer::getInstance(); |
rgrover1 | 388:db85a09c27ef | 50 | }; |
rgrover1 | 388:db85a09c27ef | 51 | virtual GattClient &getGattClient() { |
rgrover1 | 388:db85a09c27ef | 52 | return nRF5xGattClient::getInstance(); |
rgrover1 | 388:db85a09c27ef | 53 | } |
rgrover1 | 388:db85a09c27ef | 54 | virtual const SecurityManager &getSecurityManager() const { |
rgrover1 | 388:db85a09c27ef | 55 | return nRF5xSecurityManager::getInstance(); |
rgrover1 | 388:db85a09c27ef | 56 | } |
rgrover1 | 388:db85a09c27ef | 57 | virtual SecurityManager &getSecurityManager() { |
rgrover1 | 388:db85a09c27ef | 58 | return nRF5xSecurityManager::getInstance(); |
rgrover1 | 388:db85a09c27ef | 59 | } |
rgrover1 | 388:db85a09c27ef | 60 | virtual void waitForEvent(void); |
rgrover1 | 388:db85a09c27ef | 61 | }; |
rgrover1 | 388:db85a09c27ef | 62 | |
rgrover1 | 388:db85a09c27ef | 63 | #endif |