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.
Dependents: BLE_iBeacon_Exercise
Fork of BLE_API_Native by
hw/nRF51822n/nRF51822n.h@8:b346eddb9346, 2014-02-14 (annotated)
- Committer:
- ktownsend
- Date:
- Fri Feb 14 10:50:45 2014 +0000
- Revision:
- 8:b346eddb9346
- Parent:
- 4:2f1f20c755ed
Added experimental notify/indicate support to updateValue
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ktownsend | 0:4c3097c65247 | 1 | /* mbed Microcontroller Library |
ktownsend | 0:4c3097c65247 | 2 | * Copyright (c) 2006-2013 ARM Limited |
ktownsend | 0:4c3097c65247 | 3 | * |
ktownsend | 0:4c3097c65247 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
ktownsend | 0:4c3097c65247 | 5 | * you may not use this file except in compliance with the License. |
ktownsend | 0:4c3097c65247 | 6 | * You may obtain a copy of the License at |
ktownsend | 0:4c3097c65247 | 7 | * |
ktownsend | 0:4c3097c65247 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
ktownsend | 0:4c3097c65247 | 9 | * |
ktownsend | 0:4c3097c65247 | 10 | * Unless required by applicable law or agreed to in writing, software |
ktownsend | 0:4c3097c65247 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
ktownsend | 0:4c3097c65247 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
ktownsend | 0:4c3097c65247 | 13 | * See the License for the specific language governing permissions and |
ktownsend | 0:4c3097c65247 | 14 | * limitations under the License. |
ktownsend | 0:4c3097c65247 | 15 | */ |
ktownsend | 0:4c3097c65247 | 16 | |
ktownsend | 0:4c3097c65247 | 17 | #ifndef __NRF51822_H__ |
ktownsend | 0:4c3097c65247 | 18 | #define __NRF51822_H__ |
ktownsend | 0:4c3097c65247 | 19 | |
ktownsend | 4:2f1f20c755ed | 20 | #define NRF51 |
ktownsend | 4:2f1f20c755ed | 21 | #define DEBUG_NRF_USER |
ktownsend | 4:2f1f20c755ed | 22 | #define BLE_STACK_SUPPORT_REQD |
ktownsend | 4:2f1f20c755ed | 23 | #define BOARD_PCA10001 |
ktownsend | 4:2f1f20c755ed | 24 | |
ktownsend | 0:4c3097c65247 | 25 | #include "mbed.h" |
ktownsend | 0:4c3097c65247 | 26 | #include "blecommon.h" |
ktownsend | 0:4c3097c65247 | 27 | #include "hw/BLEDevice.h" |
ktownsend | 0:4c3097c65247 | 28 | #include "hw/nRF51822n/nRF51Gap.h" |
ktownsend | 0:4c3097c65247 | 29 | #include "hw/nRF51822n/nRF51GattServer.h" |
ktownsend | 0:4c3097c65247 | 30 | |
ktownsend | 0:4c3097c65247 | 31 | /**************************************************************************/ |
ktownsend | 0:4c3097c65247 | 32 | /*! |
ktownsend | 0:4c3097c65247 | 33 | \brief |
ktownsend | 0:4c3097c65247 | 34 | |
ktownsend | 0:4c3097c65247 | 35 | */ |
ktownsend | 0:4c3097c65247 | 36 | /**************************************************************************/ |
ktownsend | 0:4c3097c65247 | 37 | class nRF51822n : public BLEDevice |
ktownsend | 0:4c3097c65247 | 38 | { |
ktownsend | 0:4c3097c65247 | 39 | public: |
ktownsend | 0:4c3097c65247 | 40 | nRF51822n(void); |
ktownsend | 0:4c3097c65247 | 41 | virtual ~nRF51822n(void); |
ktownsend | 0:4c3097c65247 | 42 | |
ktownsend | 8:b346eddb9346 | 43 | virtual Gap& getGap() { return nRF51Gap::getInstance(); }; |
ktownsend | 0:4c3097c65247 | 44 | virtual GattServer& getGattServer() { return nRF51GattServer::getInstance(); }; |
ktownsend | 0:4c3097c65247 | 45 | virtual ble_error_t init(void); |
ktownsend | 0:4c3097c65247 | 46 | virtual ble_error_t reset(void); |
ktownsend | 0:4c3097c65247 | 47 | }; |
ktownsend | 0:4c3097c65247 | 48 | |
ktownsend | 0:4c3097c65247 | 49 | #endif |