From 616853e5f2ca5f7306c667bb2bb443f9ad09d853 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Thu, 4 Feb 2016 03:24:23 +0100 Subject: Update to new version of pcitool --- cmosis.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'cmosis.c') diff --git a/cmosis.c b/cmosis.c index 49bc1d5..5d98c14 100644 --- a/cmosis.c +++ b/cmosis.c @@ -11,6 +11,7 @@ #include #include #include +#include #include "cmosis.h" #include "private.h" @@ -75,8 +76,8 @@ int ipecamera_cmosis_read(pcilib_t *ctx, pcilib_register_bank_context_t *reg_ban assert(addr < 128); - wr = pcilib_resolve_register_address(ctx, bank->bar, bank->write_addr); - rd = pcilib_resolve_register_address(ctx, bank->bar, bank->read_addr); + wr = pcilib_resolve_bar_address(ctx, bank->bar, bank->write_addr); + rd = pcilib_resolve_bar_address(ctx, bank->bar, bank->read_addr); if ((!rd)||(!wr)) { pcilib_error("Error resolving addresses of read & write registers"); return PCILIB_ERROR_INVALID_ADDRESS; @@ -171,8 +172,8 @@ int ipecamera_cmosis_write(pcilib_t *ctx, pcilib_register_bank_context_t *reg_ba assert(addr < 128); assert(value < 256); - wr = pcilib_resolve_register_address(ctx, bank->bar, bank->write_addr); - rd = pcilib_resolve_register_address(ctx, bank->bar, bank->read_addr); + wr = pcilib_resolve_bar_address(ctx, bank->bar, bank->write_addr); + rd = pcilib_resolve_bar_address(ctx, bank->bar, bank->read_addr); if ((!rd)||(!wr)) { pcilib_error("Error resolving addresses of read & write registers"); return PCILIB_ERROR_INVALID_ADDRESS; -- cgit v1.2.3