Skip to content

Commit

Permalink
nimble/host: Add connection handle realated GAP APIs to header file
Browse files Browse the repository at this point in the history
This adds the declarations of two GAP APIs that were previously defined
in the ble_gap.c. Now both APIs can be used in other source files.
  • Loading branch information
m-gorecki authored and KKopyscinski committed Sep 26, 2023
1 parent f9c3512 commit 9616b92
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions nimble/host/include/host/ble_gap.h
Original file line number Diff line number Diff line change
Expand Up @@ -2587,6 +2587,25 @@ int ble_gap_event_listener_register(struct ble_gap_event_listener *listener,
*/
int ble_gap_event_listener_unregister(struct ble_gap_event_listener *listener);

/**
* Calls function defined by the user for every connection that is currently established
*
* @param cb Callback function
* @param arg Callback argument
*/
void ble_gap_conn_foreach_handle(ble_gap_conn_foreach_handle_fn *cb, void *arg);

/**
* Looks for the connection with specified address.
*
* @param addr Address to look for
* @param out_conn_handle Pointer to the variable in which conn_handle will be saved if found
*
* @return 0 on success
* BLE_HS_ENOTCONN if connection with specified address was not found
*/
int ble_gap_conn_find_handle_by_addr(const ble_addr_t *addr, uint16_t *out_conn_handle);

#if MYNEWT_VAL(BLE_POWER_CONTROL)
/**
* Enable Set Path Loss Reporting.
Expand Down

0 comments on commit 9616b92

Please sign in to comment.