Skip to content

Commit

Permalink
Added BLEClient::desc
Browse files Browse the repository at this point in the history
  • Loading branch information
taks committed Jul 15, 2024
1 parent 3dd7771 commit 3328908
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/client/ble_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -211,6 +211,10 @@ impl BLEClient {
}
}

pub fn desc(&self) -> Result<BLEConnDesc, crate::BLEError> {
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<i8, BLEError> {
Expand Down

0 comments on commit 3328908

Please sign in to comment.