/**
 * Is there a match between the device and a device on the whitelist 
 * 
 * @param addr 
 * @param addr_type Public address (0) or random address (1)
 * 
 * @return int 
 */
int
ble_ll_whitelist_match(uint8_t *addr, uint8_t addr_type)
{
    int rc;
#ifdef BLE_USES_HW_WHITELIST
    rc = ble_hw_whitelist_match();
#else
    rc = ble_ll_is_on_whitelist(addr, addr_type);
#endif
    return rc;
}
/**
 * Is there a match between the device and a device on the whitelist.
 *
 * NOTE: This API uses the HW, if present, to determine if there was a match
 * between a received address and an address in the whitelist. If the HW does
 * not support whitelisting this API is the same as the whitelist search API
 *
 * @param addr
 * @param addr_type Public address (0) or random address (1)
 * @param is_ident  True if addr is an identity address; false otherwise
 *
 * @return int
 */
int
ble_ll_whitelist_match(uint8_t *addr, uint8_t addr_type, int is_ident)
{
    int rc;
#if (BLE_USES_HW_WHITELIST == 1)
    /*
     * XXX: This should be changed. This is HW specific: some HW may be able
     * to both resolve a private address and perform a whitelist check. The
     * current BLE hw cannot support this.
     */
    if (is_ident) {
        rc = ble_ll_whitelist_search(addr, addr_type);
    } else {
        rc = ble_hw_whitelist_match();
    }
#else
    rc = ble_ll_whitelist_search(addr, addr_type);
#endif
    return rc;
}