From 3328908b7e8a2da0dc54630f6cbe1543f58f0150 Mon Sep 17 00:00:00 2001 From: taks <857tn859@gmail.com> Date: Mon, 15 Jul 2024 23:37:08 +0900 Subject: [PATCH] Added BLEClient::desc --- src/client/ble_client.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/ble_client.rs b/src/client/ble_client.rs index 7b0a5ec..9965ba9 100644 --- a/src/client/ble_client.rs +++ b/src/client/ble_client.rs @@ -3,7 +3,7 @@ use crate::{ ble_device::OWN_ADDR_TYPE, ble_error::return_code_to_string, utilities::{as_void_ptr, voidp_to_ref, ArcUnsafeCell, BleUuid}, - BLEAddress, BLEDevice, BLEError, BLERemoteService, Signal, + BLEAddress, BLEConnDesc, BLEDevice, BLEError, BLERemoteService, Signal, }; use alloc::{boxed::Box, string::ToString, vec::Vec}; use core::{cell::UnsafeCell, ffi::c_void}; @@ -211,6 +211,10 @@ impl BLEClient { } } + pub fn desc(&self) -> Result { + crate::utilities::ble_gap_conn_find(self.conn_handle()) + } + /// Retrieves the most-recently measured RSSI. /// A connection’s RSSI is updated whenever a data channel PDU is received. pub fn get_rssi(&self) -> Result {