18 #include "nrf_assert.h"
19 #include "app_timer.h"
40 APP_ERROR_CHECK_BOOL(p_a1 != NULL);
41 APP_ERROR_CHECK_BOOL(p_a2 != NULL);
42 return memcmp(p_a1, p_a2,
sizeof(ble_gap_addr_t)) == 0;
53 uint8_t incremented_index = current_index + 1;
74 APP_ERROR_CHECK_BOOL(p_addr != NULL);
93 APP_ERROR_CHECK_BOOL(p_addr != NULL);
109 APP_ERROR_CHECK(err_code);
139 APP_ERROR_CHECK_BOOL(p_addr != NULL);
150 return NRF_ERROR_INVALID_PARAM;
162 if(err_code != NRF_SUCCESS)
void ptu_dlh_notify_beacon_disabled(void)
Notify distant list handler that the beacon is now disabled.
#define BLE_WPTS_ADV_FLAG_REBOOT_INDICATOR_BITMSK
static ble_gap_addr_t m_distant_list[PTU_DISTANT_LIST_LEN]
static bool m_ignoring_devices
void ptu_dlh_notify_beacon_active(void)
Notify distant list handler that the beacon is now active.
static uint32_t m_ignore_latency_ms
static bool m_address_in_distant_list(ble_gap_addr_t const *p_addr)
Check if given address is in the distant list.
static void m_remove_device(ble_gap_addr_t const *p_addr)
Removes given address from distant list.
bool ptu_dlh_device_is_in_distant_list(ble_gap_addr_t const *p_addr)
Check if device with provided address is in the distant list.
#define BLE_WPTS_ADV_FLAG_REBOOT_INDICATOR_BITPOS
void ptu_dlh_on_wpt_adv_report(ble_gap_addr_t const *p_addr, uint8_t adv_flags)
Distance list handler WPT Advertisement report handler.
#define TIMER_START(timer_id, ms, p_ctx)
uint32_t ignore_latency_ms
static void m_ignore_latency_timer_id_handler(void *p_context)
Hander for the ignore latency timer id.
static uint8_t m_next_index(uint8_t current_index)
Get next index in distant list array.
#define PTU_DISTANT_LIST_LEN
uint32_t ptu_dlh_init(ptu_dlh_init_t const *p_init)
Check if device with provided address is in the distant list.
#define BLE_WPTS_BITFIELD_READ(bitfield, msk, pos)
Read bitfield.
APP_TIMER_DEF(m_ignore_latency_timer_id)
static uint8_t m_distant_list_index
static bool m_address_equals(ble_gap_addr_t const *p_a1, ble_gap_addr_t const *p_a2)
Check if two ble_gap_addr_t addresses are equal.