HW layer for the Nucleo board, it only work with old BLE_API

Dependents:   Hello_BLE F446RE-BLE

Fork of X_NUCLEO_IDB0XA1 by ST

Revision:
43:b69d2680b716
Parent:
42:1a0220f508ca
Child:
44:b4a986b33c7d
--- a/BlueNRGGap.cpp	Wed Aug 27 11:58:45 2014 +0000
+++ b/BlueNRGGap.cpp	Thu Aug 28 08:30:50 2014 +0000
@@ -98,6 +98,13 @@
             //UnitPayload unitLoad = load.getPayLoadAtIndex(index);
             switch(*loadPtr.getUnitAtIndex(index).getAdTypePtr()) {
                 case GapAdvertisingData::FLAGS:                              /* ref *Flags */                     
+                //Check if Flags are OK. BlueNRG only supports LE Mode.
+                uint8_t *flags = loadPtr.getUnitAtIndex(index).getDataPtr();
+                if((*flags & GapAdvertisingData::BREDR_NOT_SUPPORTED) != GapAdvertisingData::BREDR_NOT_SUPPORTED) {
+                        DEBUG("BlueNRG does not support BR/EDR Mode");
+                        return BLE_ERROR_PARAM_OUT_OF_RANGE;
+                     }
+                
                 break;
                 case GapAdvertisingData::INCOMPLETE_LIST_16BIT_SERVICE_IDS:  /**< Incomplete list of 16-bit Service IDs */
                 break;