High level Bluetooth Low Energy API and radio abstraction layer

Dependencies:   nRF51822

Dependents:   LinkNode_LIS3DH

Fork of BLE_API by Bluetooth Low Energy

Files at this revision

API Documentation at this revision

Comitter:
ktownsend
Date:
Wed Dec 18 04:55:56 2013 +0000
Parent:
11:200931be5617
Child:
13:a585c98b6abc
Commit message:
Fixed some simple logic errors

Changed in this revision

hw/nrf51822.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/hw/nrf51822.cpp	Tue Dec 17 17:28:41 2013 +0000
+++ b/hw/nrf51822.cpp	Wed Dec 18 04:55:56 2013 +0000
@@ -115,7 +115,7 @@
     }
     
     /* Check timeout is zero for Connectable Directed */
-    if ((params.getAdvertisingType() == GapAdvertisingParams::ADV_CONNECTABLE_DIRECTED) ||
+    if ((params.getAdvertisingType() == GapAdvertisingParams::ADV_CONNECTABLE_DIRECTED) &&
         (params.getTimeout() != 0))
     {
         #if NRF51822_DEBUG_MODE
@@ -127,7 +127,7 @@
     }
     
     /* Check timeout for other advertising types */
-    if ((params.getAdvertisingType() != GapAdvertisingParams::ADV_CONNECTABLE_DIRECTED) ||
+    if ((params.getAdvertisingType() != GapAdvertisingParams::ADV_CONNECTABLE_DIRECTED) &&
         (params.getTimeout() > GAP_ADV_PARAMS_TIMEOUT_MAX))
     {
         #if NRF51822_DEBUG_MODE
@@ -483,7 +483,7 @@
 ble_error_t nRF51822::reset(void)
 {
     #if NRF51822_DEBUG_MODE
-    printf("Restting the radio ... ");
+    printf("Resetting the radio ... ");
     #endif
     
     /* Command ID = 0x0005, No payload */