Nordic stack and drivers for the mbed BLE API Modified for HRM1017 for library 0.1.0

Fork of nRF51822 by Nordic Semiconductor

Files at this revision

API Documentation at this revision

Comitter:
Rohit Grover
Date:
Fri May 30 13:32:48 2014 +0100
Parent:
15:11b0c15979d1
Child:
17:c3e11bb6cb72
Commit message:
reset() should be called automatically by init()

Changed in this revision

nRF51822n.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/nRF51822n.cpp	Fri May 30 08:44:28 2014 +0100
+++ b/nRF51822n.cpp	Fri May 30 13:32:48 2014 +0100
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-  
+
 #include "mbed.h"
 #include "nRF51822n.h"
 
@@ -54,12 +54,12 @@
 /**************************************************************************/
 /*!
     @brief  Initialises anything required to start using BLE
-            
+
     @returns    ble_error_t
-    
+
     @retval     BLE_ERROR_NONE
                 Everything executed properly
-                
+
     @section EXAMPLE
 
     @code
@@ -72,6 +72,8 @@
   /* ToDo: Clear memory contents, reset the SD, etc. */
   btle_init();
 
+  reset();
+
   return BLE_ERROR_NONE;
 }
 
@@ -79,12 +81,12 @@
 /*!
     @brief  Resets the BLE HW, removing any existing services and
             characteristics
-            
+
     @returns    ble_error_t
-    
+
     @retval     BLE_ERROR_NONE
                 Everything executed properly
-                
+
     @section EXAMPLE
 
     @code
@@ -95,9 +97,9 @@
 ble_error_t nRF51822n::reset(void)
 {
     wait(0.5);
-    
+
     /* Wait for the radio to come back up */
     wait(1);
-    
+
     return BLE_ERROR_NONE;
 }