283
282
char *pcilib_resolve_register_address(pcilib_t *ctx, pcilib_bar_t bar, uintptr_t addr) {
284
283
if (bar == PCILIB_BAR_DETECT) {
286
284
// First checking the default register bar
287
285
size_t offset = addr - ctx->board_info.bar_start[ctx->reg_bar];
288
286
if ((addr > ctx->board_info.bar_start[ctx->reg_bar])&&(offset < ctx->board_info.bar_length[ctx->reg_bar])) {