summaryrefslogtreecommitdiffstats
path: root/cmosis.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2016-02-04 03:24:23 +0100
committerSuren A. Chilingaryan <csa@suren.me>2016-02-04 03:24:23 +0100
commit616853e5f2ca5f7306c667bb2bb443f9ad09d853 (patch)
treec9978cc65d0d4e050b5048ecc82f3fd88d378339 /cmosis.c
parentc392c9920f9baadc9267e726b46b9c64c82915c7 (diff)
downloadipecamera-616853e5f2ca5f7306c667bb2bb443f9ad09d853.tar.gz
ipecamera-616853e5f2ca5f7306c667bb2bb443f9ad09d853.tar.bz2
ipecamera-616853e5f2ca5f7306c667bb2bb443f9ad09d853.tar.xz
ipecamera-616853e5f2ca5f7306c667bb2bb443f9ad09d853.zip
Update to new version of pcitool
Diffstat (limited to 'cmosis.c')
-rw-r--r--cmosis.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/cmosis.c b/cmosis.c
index 49bc1d5..5d98c14 100644
--- a/cmosis.c
+++ b/cmosis.c
@@ -11,6 +11,7 @@
#include <pcilib/error.h>
#include <pcilib/locking.h>
#include <pcilib/model.h>
+#include <pcilib/datacpy.h>
#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;