1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 06:23:53 +01:00

pkg/nimble/scanlist: implement _get_by_pos()

This commit is contained in:
Hauke Petersen 2019-05-17 11:40:56 +02:00
parent 7f7993f1d6
commit e1e62ffff7

View File

@ -55,6 +55,15 @@ void nimble_scanlist_init(void)
}
}
nimble_scanlist_entry_t *nimble_scanlist_get_by_pos(unsigned pos)
{
nimble_scanlist_entry_t *e = nimble_scanlist_get_next(NULL);
for (unsigned i = 0; (i < pos) && e; i++) {
e = nimble_scanlist_get_next(e);
}
return e;
}
void nimble_scanlist_update(const ble_addr_t *addr, int8_t rssi,
const uint8_t *ad, size_t len)
{