Skip to content

Commit

Permalink
Change the set_own_addr_type function arguments.
Browse files Browse the repository at this point in the history
  • Loading branch information
taks committed Nov 14, 2023
1 parent 5b603eb commit ab341af
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/ble_device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,18 @@ impl BLEDevice {
}

/// Set the own address type.
pub fn set_own_addr_type(&mut self, own_addr_type: OwnAddrType, use_nrpa: bool) {
pub fn set_own_addr_type(&mut self, own_addr_type: OwnAddrType)
{
self._set_own_addr_type(own_addr_type, false);
}

/// Set the own address type to non-resolvable random address.
pub fn set_own_addr_type_to_non_resolvable_random(&mut self)
{
self._set_own_addr_type(OwnAddrType::Random, true);
}

fn _set_own_addr_type(&mut self, own_addr_type: OwnAddrType, use_nrpa: bool) {
unsafe {
OWN_ADDR_TYPE = own_addr_type;
match own_addr_type {
Expand Down

0 comments on commit ab341af

Please sign in to comment.