HW layer for the Nucleo board, it only work with old BLE_API
Dependents: Hello_BLE F446RE-BLE
Fork of X_NUCLEO_IDB0XA1 by
Diff: BlueNRGGap.cpp
- Revision:
- 106:2176f8cfe5b3
- Parent:
- 103:12684d94c3a6
- Child:
- 107:5cc5ac5bfbbb
- Child:
- 113:31c73e9b0108
--- a/BlueNRGGap.cpp Tue Aug 11 11:36:13 2015 +0200 +++ b/BlueNRGGap.cpp Tue Aug 11 11:03:58 2015 +0000 @@ -102,7 +102,7 @@ } else { PayloadPtr loadPtr(advData.getPayload(), advData.getPayloadLen()); for(uint8_t index=0; index<loadPtr.getPayloadUnitCount(); index++) { - loadPtr.getUnitAtIndex(index); + PayloadUnit unit = loadPtr.getUnitAtIndex(index); DEBUG("adData[%d].length=%d\n\r", index,(uint8_t)(*loadPtr.getUnitAtIndex(index).getLenPtr())); DEBUG("adData[%d].AdType=0x%x\n\r", index,(uint8_t)(*loadPtr.getUnitAtIndex(index).getAdTypePtr())); @@ -213,7 +213,7 @@ if(buffSize>ADV_DATA_MAX_SIZE-2) { return BLE_ERROR_PARAM_OUT_OF_RANGE; } - for(int i=0; i<buffSize+1; i++) { + for(unsigned i=0; i<buffSize+1; i++) { DEBUG("Advertising type: SERVICE_DATA loadPtr.getUnitAtIndex(index).getDataPtr()[%d] = 0x%x\n\r", i, loadPtr.getUnitAtIndex(index).getDataPtr()[i]); } AdvLen = buffSize+2; // the total ADV DATA LEN should include two more bytes: the buffer size byte; and the Service Data Type Value byte @@ -563,7 +563,7 @@ //Re-Init the BTLE Device with SetAddress as true //if(BlueNRGDevice::getIsInitialized())//Re-init only initialization is already done // ANDREA - //btle_init(isSetAddress, D11, D12, D13); + //btle_init(isSetAddress, D11, D12, D3); //if (ret==BLE_STATUS_SUCCESS) return BLE_ERROR_NONE;