mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-31 09:32:57 +00:00
le_device_db: add le_device_db_max_count() for index iteration
This commit is contained in:
parent
1882d12dc3
commit
6fc9dda195
@ -260,6 +260,10 @@ int le_device_db_count(void){
|
||||
return counter;
|
||||
}
|
||||
|
||||
int le_device_db_max_count(void){
|
||||
return LE_DEVICE_MEMORY_SIZE;
|
||||
}
|
||||
|
||||
// free device
|
||||
void le_device_db_remove(int index){
|
||||
le_devices[index].addr_type = INVALID_ENTRY_ADDR_TYPE;
|
||||
|
@ -191,6 +191,10 @@ int le_device_db_count(void){
|
||||
return counter;
|
||||
}
|
||||
|
||||
int le_device_db_max_count(void){
|
||||
return NVM_NUM_LE_DEVICES;
|
||||
}
|
||||
|
||||
// get device information: addr type and address
|
||||
void le_device_db_info(int device_index, int * addr_type, bd_addr_t addr, sm_key_t irk){
|
||||
int absolute_index = le_device_db_get_absolute_index_for_device_index(device_index);
|
||||
|
@ -84,11 +84,17 @@ void le_device_db_set_local_bd_addr(bd_addr_t bd_addr);
|
||||
int le_device_db_add(int addr_type, bd_addr_t addr, sm_key_t irk);
|
||||
|
||||
/**
|
||||
* @brief get number of devices in db for enumeration
|
||||
* @brief get number of devices in db
|
||||
* @returns number of device in db
|
||||
*/
|
||||
int le_device_db_count(void);
|
||||
|
||||
/**
|
||||
* @brief get max number of devices in db for enumeration
|
||||
* @returns max number of device in db
|
||||
*/
|
||||
int le_device_db_max_count(void);
|
||||
|
||||
/**
|
||||
* @brief get device information: addr type and address needed to identify device
|
||||
* @param index
|
||||
|
@ -106,6 +106,10 @@ int le_device_db_count(void){
|
||||
return counter;
|
||||
}
|
||||
|
||||
int le_device_db_max_count(void){
|
||||
return MAX_NR_LE_DEVICE_DB_ENTRIES;
|
||||
}
|
||||
|
||||
// free device
|
||||
void le_device_db_remove(int index){
|
||||
le_devices[index].addr_type = INVALID_ENTRY_ADDR_TYPE;
|
||||
|
@ -170,6 +170,10 @@ int le_device_db_count(void){
|
||||
return num_valid_entries;
|
||||
}
|
||||
|
||||
int le_device_db_max_count(void){
|
||||
return NVM_NUM_DEVICE_DB_ENTRIES;
|
||||
}
|
||||
|
||||
void le_device_db_remove(int index){
|
||||
// delete entry in TLV
|
||||
le_device_db_tlv_delete(index);
|
||||
|
Loading…
x
Reference in New Issue
Block a user