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:
- 113:31c73e9b0108
- Parent:
- 112:6dc0ad44750d
- Child:
- 115:3b47df81a56b
--- a/BlueNRGGap.cpp Tue Aug 11 13:11:01 2015 +0200 +++ b/BlueNRGGap.cpp Tue Aug 11 13:20:31 2015 +0200 @@ -102,7 +102,7 @@ } else { PayloadPtr loadPtr(advData.getPayload(), advData.getPayloadLen()); for(uint8_t index=0; index<loadPtr.getPayloadUnitCount(); index++) { - PayloadUnit unit = loadPtr.getUnitAtIndex(index); + 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(unsigned i=0; i<buffSize+1; i++) { + for(int 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, D3); + //btle_init(isSetAddress, D11, D12, D13); //if (ret==BLE_STATUS_SUCCESS) return BLE_ERROR_NONE;