μHAL
|
Go to the source code of this file.
Functions | |
std::optional< struct sdb_device_info > | read_sdb (struct pcie_bars *, device_match_fn, unsigned) |
std::vector< struct sdb_synthesis_info > | get_synthesis_info (struct pcie_bars *) |
This file contains the functions used to query a Self Describing Bus (SDB) filesystem.
std::optional< struct sdb_device_info > read_sdb | ( | struct pcie_bars * | bars, |
device_match_fn | device_match, | ||
unsigned | pos | ||
) |
This function navigates the SDB filesystem and passes decoded SDB product entries to device_match
. When device_match
returns true for the pos
-th time, this function returns that SDB device's information; the address can be used to locate the device's register map, and the version information makes it possible to gate functionality behind version checks. If device_match
is null, pos
is ignored and this function simply prints all SDB information.