Skip to content

Commit 8282f89

Browse files
committed
BLE : Replace calls to Gap::setAddress with HCIDriver::set_random_static_address
1 parent c66dd7f commit 8282f89

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

features/FEATURE_BLE/targets/TARGET_CORDIO_ODIN_W2/HCIDriver.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,10 +341,7 @@ void ble::vendor::odin_w2::HCIDriver::handle_reset_sequence(uint8_t *pMsg)
341341
memcpy(addr, pMsg, sizeof(addr));
342342
DM_RAND_ADDR_SET(addr, DM_RAND_ADDR_STATIC);
343343
// note: will invoke set rand address
344-
cordio::BLE::deviceInstance().getGap().setAddress(
345-
BLEProtocol::AddressType::RANDOM_STATIC,
346-
addr
347-
);
344+
set_random_static_address(addr);
348345
}
349346
break;
350347

features/FEATURE_BLE/targets/TARGET_Cypress/COMPONENT_CYW43XXX/HCIDriver.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,7 @@ class HCIDriver : public cordio::CordioHCIDriver {
301301
memcpy(addr, pMsg, sizeof(addr));
302302
DM_RAND_ADDR_SET(addr, DM_RAND_ADDR_STATIC);
303303
// note: will invoke set rand address
304-
cordio::BLE::deviceInstance().getGap().setAddress(
305-
BLEProtocol::AddressType::RANDOM_STATIC,
306-
addr
307-
);
304+
set_random_static_address(addr);
308305
}
309306
break;
310307

features/FEATURE_BLE/targets/TARGET_STM/TARGET_CYW4343X/HCIDriver.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,7 @@ class HCIDriver : public cordio::CordioHCIDriver {
265265
memcpy(addr, pMsg, sizeof(addr));
266266
DM_RAND_ADDR_SET(addr, DM_RAND_ADDR_STATIC);
267267
// note: will invoke set rand address
268-
cordio::BLE::deviceInstance().getGap().setAddress(
269-
BLEProtocol::AddressType::RANDOM_STATIC,
270-
addr
271-
);
268+
set_random_static_address(addr);
272269
}
273270
break;
274271

0 commit comments

Comments
 (0)