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.
Puck/nRF51822/nRF51822n.h@0:b8221deeaa87, 2015-04-30 (annotated)
- Committer:
- Grimmkey
- Date:
- Thu Apr 30 20:46:27 2015 +0000
- Revision:
- 0:b8221deeaa87
Georgia Institute of Technology ECE 4180 Spring 2015 Jazz Hands project, Nordic nRF51822 half
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Grimmkey | 0:b8221deeaa87 | 1 | /* mbed Microcontroller Library |
Grimmkey | 0:b8221deeaa87 | 2 | * Copyright (c) 2006-2013 ARM Limited |
Grimmkey | 0:b8221deeaa87 | 3 | * |
Grimmkey | 0:b8221deeaa87 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
Grimmkey | 0:b8221deeaa87 | 5 | * you may not use this file except in compliance with the License. |
Grimmkey | 0:b8221deeaa87 | 6 | * You may obtain a copy of the License at |
Grimmkey | 0:b8221deeaa87 | 7 | * |
Grimmkey | 0:b8221deeaa87 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
Grimmkey | 0:b8221deeaa87 | 9 | * |
Grimmkey | 0:b8221deeaa87 | 10 | * Unless required by applicable law or agreed to in writing, software |
Grimmkey | 0:b8221deeaa87 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
Grimmkey | 0:b8221deeaa87 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
Grimmkey | 0:b8221deeaa87 | 13 | * See the License for the specific language governing permissions and |
Grimmkey | 0:b8221deeaa87 | 14 | * limitations under the License. |
Grimmkey | 0:b8221deeaa87 | 15 | */ |
Grimmkey | 0:b8221deeaa87 | 16 | |
Grimmkey | 0:b8221deeaa87 | 17 | #ifndef __NRF51822_H__ |
Grimmkey | 0:b8221deeaa87 | 18 | #define __NRF51822_H__ |
Grimmkey | 0:b8221deeaa87 | 19 | |
Grimmkey | 0:b8221deeaa87 | 20 | #include "mbed.h" |
Grimmkey | 0:b8221deeaa87 | 21 | #include "blecommon.h" |
Grimmkey | 0:b8221deeaa87 | 22 | #include "BLEDevice.h" |
Grimmkey | 0:b8221deeaa87 | 23 | #include "nRF51Gap.h" |
Grimmkey | 0:b8221deeaa87 | 24 | #include "nRF51GattServer.h" |
Grimmkey | 0:b8221deeaa87 | 25 | |
Grimmkey | 0:b8221deeaa87 | 26 | class nRF51822n : public BLEDeviceInstanceBase |
Grimmkey | 0:b8221deeaa87 | 27 | { |
Grimmkey | 0:b8221deeaa87 | 28 | public: |
Grimmkey | 0:b8221deeaa87 | 29 | nRF51822n(void); |
Grimmkey | 0:b8221deeaa87 | 30 | virtual ~nRF51822n(void); |
Grimmkey | 0:b8221deeaa87 | 31 | |
Grimmkey | 0:b8221deeaa87 | 32 | virtual const char *getVersion(void); |
Grimmkey | 0:b8221deeaa87 | 33 | |
Grimmkey | 0:b8221deeaa87 | 34 | virtual Gap &getGap() { |
Grimmkey | 0:b8221deeaa87 | 35 | return nRF51Gap::getInstance(); |
Grimmkey | 0:b8221deeaa87 | 36 | }; |
Grimmkey | 0:b8221deeaa87 | 37 | virtual GattServer &getGattServer() { |
Grimmkey | 0:b8221deeaa87 | 38 | return nRF51GattServer::getInstance(); |
Grimmkey | 0:b8221deeaa87 | 39 | }; |
Grimmkey | 0:b8221deeaa87 | 40 | |
Grimmkey | 0:b8221deeaa87 | 41 | virtual ble_error_t setTxPower(int8_t txPower); |
Grimmkey | 0:b8221deeaa87 | 42 | virtual void getPermittedTxPowerValues(const int8_t **valueArrayPP, size_t *countP); |
Grimmkey | 0:b8221deeaa87 | 43 | |
Grimmkey | 0:b8221deeaa87 | 44 | virtual ble_error_t init(void); |
Grimmkey | 0:b8221deeaa87 | 45 | virtual ble_error_t shutdown(void); |
Grimmkey | 0:b8221deeaa87 | 46 | virtual ble_error_t reset(void); |
Grimmkey | 0:b8221deeaa87 | 47 | virtual void waitForEvent(void); |
Grimmkey | 0:b8221deeaa87 | 48 | }; |
Grimmkey | 0:b8221deeaa87 | 49 | |
Grimmkey | 0:b8221deeaa87 | 50 | #endif |