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 113:2fb5fde31edc, committed 2015-04-30
- Comitter:
- rgrover1
- Date:
- Thu Apr 30 08:34:38 2015 +0100
- Parent:
- 112:737b08b3b995
- Child:
- 114:711541844357
- Commit message:
- Synchronized with git rev deaa052a
Author: Rohit Grover
Release 0.3.2
=============
Enhancements
~~~~~~~~~~~~
* Changes needed to support v8 of the Nordic SDK.
* provide more detail about BLE spec and fwid in getVersion().
Workarounds
~~~~~~~~~~~
* ble_radio_notification_init requires DISTANCE_800US for now. :(
Changed in this revision
| nRF51822n.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/nRF51822n.cpp Thu Apr 30 08:34:37 2015 +0100
+++ b/nRF51822n.cpp Thu Apr 30 08:34:38 2015 +0100
@@ -48,13 +48,20 @@
const char *nRF51822n::getVersion(void)
{
- static char versionString[10];
+ static char versionString[32];
static bool versionFetched = false;
if (!versionFetched) {
ble_version_t version;
- if (sd_ble_version_get(&version) == NRF_SUCCESS) {
- snprintf(versionString, sizeof(versionString), "%u.%u", version.version_number, version.subversion_number);
+ if ((sd_ble_version_get(&version) == NRF_SUCCESS) && (version.company_id == 0x0059)) {
+ switch (version.version_number) {
+ case 0x07:
+ snprintf(versionString, sizeof(versionString), "Nordic BLE4.1 fw:%04x", version.subversion_number);
+ break;
+ default:
+ snprintf(versionString, sizeof(versionString), "Nordic (spec unknown) fw:%04x", version.subversion_number);
+ break;
+ }
versionFetched = true;
} else {
strncpy(versionString, "unknown", sizeof(versionString));
