# BLE_ABSTRACTION Function Documentation

## STATIC_ASSERT

STATIC_ASSERT()

Location: bondlist.h:81

## BondList_Size

uint8_t BondList_Size()

Bondlist functions.

Get the number of entries in the bond list stored to flash

Location: bondlist.h:117

Return

Number of entries in the the bond list with a valid bond state

## BondList_GetIRKs

uint8_t BondList_GetIRKs(struct gap_sec_key * irks)

Get the IRKs from bond lists.

Get the IRKs from bond lists having valid bond state

Location: bondlist.h:127

Parameters

Direction | Name | Description
--- | --- | ---
in | irks | Pointer to gap_sec_key structure

Return

Number of IRKs found

## BondList_FindByIRK

const BondInfo_t * BondList_FindByIRK(const uint8_t * irk)

Search for the bond information matching specified IRK in flash.

Location: bondlist.h:136

Parameters

Direction | Name | Description
--- | --- | ---
in | irk | Matching IRK to search for

Return

If found an entry in flash, return its address as a pointer to a const BondInfo_t element NULL otherwise

## BondList_FindByAddr

const BondInfo_t * BondList_FindByAddr(const uint8_t * addr, uint8_t addrType)

Search for the bonding information for a peer device in flash matching specified address and address type.

Location: bondlist.h:147

Parameters

Direction | Name | Description
--- | --- | ---
in | addr | Address of the peer device to search
in | addrType | Address type of the peer device to search

Return

If found an entry in flash, return its address as a pointer to a const BondInfo_t element NULL otherwise

## BondList_FlashDefrag

bool BondList_FlashDefrag()

Squeeze bond information together to make space for a new entry.

Location: bondlist.h:154

Return

True if successful, false otherwise

## BondList_Add

uint16_t BondList_Add(BondInfo_t * bond_info)

Add bond information to the bond list.

Location: bondlist.h:163

Parameters

Direction | Name | Description
--- | --- | ---
in | bond_info | Pointer to bond information

Return

Non-zero if bond information is added to bond list successfully, false otherwise

## BondList_Remove

bool BondList_Remove(uint16_t bondStateIndex)

Remove a bond list entry matching the specified index.

Location: bondlist.h:171

Parameters

Direction | Name | Description
--- | --- | ---
in | bondStateIndex | Index of bond list to remove

Return

True if successful, false otherwise

## BondList_RemoveAll

bool BondList_RemoveAll()

Erase bond list sectors containing bond list information in flash.

Location: bondlist.h:179

Return

If found an error erasing any sector, return false true otherwise