diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2016-02-04 03:24:23 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2016-02-04 03:24:23 +0100 |
commit | 616853e5f2ca5f7306c667bb2bb443f9ad09d853 (patch) | |
tree | c9978cc65d0d4e050b5048ecc82f3fd88d378339 | |
parent | c392c9920f9baadc9267e726b46b9c64c82915c7 (diff) | |
download | ipecamera-616853e5f2ca5f7306c667bb2bb443f9ad09d853.tar.gz ipecamera-616853e5f2ca5f7306c667bb2bb443f9ad09d853.tar.bz2 ipecamera-616853e5f2ca5f7306c667bb2bb443f9ad09d853.tar.xz ipecamera-616853e5f2ca5f7306c667bb2bb443f9ad09d853.zip |
Update to new version of pcitool
-rw-r--r-- | base.c | 9 | ||||
-rw-r--r-- | cmosis.c | 9 | ||||
-rw-r--r-- | events.c | 1 | ||||
-rw-r--r-- | model.c | 6 | ||||
-rw-r--r-- | reader.c | 1 |
5 files changed, 16 insertions, 10 deletions
@@ -16,6 +16,8 @@ #include <pcilib/tools.h> #include <pcilib/error.h> #include <pcilib/event.h> +#include <pcilib/cpu.h> +#include <pcilib/timing.h> #include "private.h" #include "model.h" @@ -131,12 +133,12 @@ pcilib_context_t *ipecamera_init(pcilib_t *pcilib) { switch (value) { case IPECAMERA_FIRMWARE_UFO5: ctx->firmware = value; - err = pcilib_add_registers(pcilib, 0, cmosis_registers); + err = pcilib_add_registers(pcilib, 0, 0, cmosis_registers, NULL); break; case IPECAMERA_FIRMWARE_CMOSIS20: ctx->firmware = value; ctx->buffer_size = IPECAMERA_DEFAULT_CMOSIS20_BUFFER_SIZE; - err = pcilib_add_registers(pcilib, 0, cmosis20000_registers); + err = pcilib_add_registers(pcilib, 0, 0, cmosis20000_registers, NULL); break; default: ctx->firmware = IPECAMERA_FIRMWARE_UNKNOWN; @@ -199,7 +201,7 @@ pcilib_dma_context_t *ipecamera_init_dma(pcilib_context_t *vctx) { } if (ctx->firmware) { - return model_info->dma->api->init(vctx->pcilib, NULL, NULL); + return model_info->dma->api->init(vctx->pcilib, "ipecamera", NULL); } else { return model_info->dma->api->init(vctx->pcilib, "pci", NULL); } @@ -654,7 +656,6 @@ int ipecamera_stop(pcilib_context_t *vctx, pcilib_event_flags_t flags) { free(ctx->buffer); ctx->buffer = NULL; } - memset(&ctx->autostop, 0, sizeof(ipecamera_autostop_t)); @@ -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; @@ -14,6 +14,7 @@ #include <pcilib.h> #include <pcilib/tools.h> #include <pcilib/error.h> +#include <pcilib/timing.h> #include "ipecamera.h" #include "private.h" @@ -15,7 +15,7 @@ enum ipecamera_protocol_s { static const pcilib_register_protocol_api_description_t ipecamera_cmosis_protocol_api = - { IPECAMERA_VERSION, ipecamera_cmosis_open, ipecamera_cmosis_close, ipecamera_cmosis_read, ipecamera_cmosis_write }; + { IPECAMERA_VERSION, ipecamera_cmosis_open, ipecamera_cmosis_close, NULL, ipecamera_cmosis_read, ipecamera_cmosis_write }; /* static const pcilib_dma_description_t ipecamera_dma = @@ -86,7 +86,7 @@ const pcilib_register_description_t cmosis_registers[] = { }; const pcilib_register_description_t cmosis20000_registers[] = { -{15, 0, 2, 1, 0, PCILIB_REGISTER_RW, PCILIB_REGISTER_STANDARD, PCILIB_REGISTER_BANK0, "cmosis_nr_slopes", ""}, +{15, 0, 2, 1, 0, PCILIB_REGISTER_RW, PCILIB_REGISTER_STANDARD, PCILIB_REGISTER_BANK0, "cmosis_nr_slopes_ex", ""}, {22, 0, 16, 1, 0, PCILIB_REGISTER_RW, PCILIB_REGISTER_STANDARD, PCILIB_REGISTER_BANK0, "cmosis_number_frames", ""}, {24, 0, 16, 0, 0, PCILIB_REGISTER_RW, PCILIB_REGISTER_STANDARD, PCILIB_REGISTER_BANK0, "cmosis_start_single", ""}, {26, 0, 16, 3840, 0, PCILIB_REGISTER_RW, PCILIB_REGISTER_STANDARD, PCILIB_REGISTER_BANK0, "cmosis_number_lines_single", ""}, @@ -231,6 +231,8 @@ static const pcilib_model_description_t ipecamera_models[] = {{ ipecamera_banks, ipecamera_protocols, ipecamera_ranges, + NULL, + NULL, ipecamera_events, ipecamera_data_types, "ipecamera", @@ -16,6 +16,7 @@ #include <pcilib.h> #include <pcilib/tools.h> #include <pcilib/error.h> +#include <pcilib/timing.h> #include "model.h" #include "private.h" |