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.
Fork of nRF51822 by
Revision 96:f98c65780f4a, committed 2015-03-02
- Comitter:
- rgrover1
- Date:
- Mon Mar 02 11:34:45 2015 +0000
- Parent:
- 95:7f0d80ab964b
- Child:
- 97:e95e35845e1c
- Commit message:
- Synchronized with git rev 3b74d9dc
Author: Rohit Grover
add code to support getPermittedTxValues()
Changed in this revision
| nRF51822n.cpp | Show annotated file Show diff for this revision Revisions of this file |
| nRF51822n.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/nRF51822n.cpp Mon Mar 02 11:34:45 2015 +0000
+++ b/nRF51822n.cpp Mon Mar 02 11:34:45 2015 +0000
@@ -81,6 +81,16 @@
return BLE_ERROR_NONE;
}
+void nRF51822n::getPermittedTxPowerValues(const int8_t **valueArrayPP, size_t *countP)
+{
+ static const int8_t permittedTxValues[] = {
+ -40, -30, -20, -16, -12, -8, -4, 0, 4
+ };
+
+ *valueArrayPP = permittedTxValues;
+ *countP = sizeof(permittedTxValues) / sizeof(int8_t);
+}
+
ble_error_t nRF51822n::init(void)
{
/* ToDo: Clear memory contents, reset the SD, etc. */
--- a/nRF51822n.h Mon Mar 02 11:34:45 2015 +0000
+++ b/nRF51822n.h Mon Mar 02 11:34:45 2015 +0000
@@ -44,6 +44,7 @@
};
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);
