extmod/modbluetooth: Support gap_connect(None) to cancel a connection.
Allow cancellation of in-progress peripheral connections.
This commit is contained in:
committed by
Damien George
parent
de7e3cd792
commit
851ecb2da1
@@ -1284,6 +1284,11 @@ int mp_bluetooth_gap_peripheral_connect(uint8_t addr_type, const uint8_t *addr,
|
||||
return btstack_error_to_errno(gap_connect(btstack_addr, addr_type));
|
||||
}
|
||||
|
||||
int mp_bluetooth_gap_peripheral_connect_cancel(void) {
|
||||
DEBUG_printf("mp_bluetooth_gap_peripheral_connect_cancel\n");
|
||||
return btstack_error_to_errno(gap_connect_cancel());
|
||||
}
|
||||
|
||||
#endif // MICROPY_PY_BLUETOOTH_ENABLE_CENTRAL_MODE
|
||||
|
||||
#if MICROPY_PY_BLUETOOTH_ENABLE_GATT_CLIENT
|
||||
|
||||
Reference in New Issue
Block a user