diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/CMakeLists.txt | 1 | ||||
-rw-r--r-- | protocols/default.c | 11 |
2 files changed, 5 insertions, 7 deletions
diff --git a/protocols/CMakeLists.txt b/protocols/CMakeLists.txt index 88a1e8e..e05c454 100644 --- a/protocols/CMakeLists.txt +++ b/protocols/CMakeLists.txt @@ -3,6 +3,7 @@ include_directories( ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/pcilib ${CMAKE_BINARY_DIR}/pcilib + ${LIBXML2_INCLUDE_DIRS} ) set(HEADERS ${HEADERS} default.h software.h) diff --git a/protocols/default.c b/protocols/default.c index dd1da54..5e344cf 100644 --- a/protocols/default.c +++ b/protocols/default.c @@ -13,18 +13,15 @@ int pcilib_default_read(pcilib_t *ctx, pcilib_register_bank_context_t *bank_ctx, pcilib_register_value_t val = 0; const pcilib_register_bank_description_t *b = bank_ctx->bank; - printf("bank name %s\n",b->name); - printf("bank bar %i\n",b->bar); - printf("addr %i\n",addr); + int access = b->access / 8; - printf("access : %i\n",access); + ptr = pcilib_resolve_register_address(ctx, b->bar, b->read_addr + addr); - // printf("ptr %s\n",ptr); default_datacpy(&val, ptr, access, b); - printf("val : %i\n",val); + // *value = val&BIT_MASK(bits); *value = val; - printf("value : %i\n",*value); + return 0; } |