Fix ESP and HCI build

This commit is contained in:
Scott Shawcroft 2022-05-12 15:23:26 -07:00
parent 269d51d023
commit 3e85cfe26b
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA
2 changed files with 8 additions and 0 deletions

View File

@ -57,6 +57,11 @@ bool vm_used_ble;
// }
// }
void bleio_user_reset() {
// HCI doesn't support the BLE workflow so just do a full reset.
bleio_reset();
}
// Turn off BLE on a reset or reload.
void bleio_reset() {
// Create a UUID object for all CCCD's.

View File

@ -574,6 +574,9 @@ void common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool
}
void common_hal_bleio_adapter_stop_advertising(bleio_adapter_obj_t *self) {
if (!common_hal_bleio_adapter_get_advertising(self)) {
return;
}
int err_code = ble_gap_ext_adv_stop(0);
self->user_advertising = false;