From 3402c81500eecc678c7369ca94067c8d99e22bea Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Wed, 22 Jul 2015 05:22:59 +0200 Subject: Support registers of CMOSIS20000 camera --- base.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'base.c') diff --git a/base.c b/base.c index 8b60b20..f288be0 100644 --- a/base.c +++ b/base.c @@ -98,11 +98,6 @@ pcilib_context_t *ipecamera_init(pcilib_t *pcilib) { FIND_REG(status2_reg, "fpga", "status2"); FIND_REG(status3_reg, "fpga", "status3"); - FIND_REG(n_lines_reg, "cmosis", "cmosis_number_lines"); - FIND_REG(line_reg, "cmosis", "cmosis_start1"); - FIND_REG(exposure_reg, "cmosis", "cmosis_exp_time"); - FIND_REG(flip_reg, "cmosis", "cmosis_image_flipping"); - FIND_REG(firmware_version_reg, "fpga", "firmware_version"); FIND_REG(adc_resolution_reg, "fpga", "adc_resolution"); FIND_REG(output_mode_reg, "fpga", "output_mode"); @@ -114,12 +109,23 @@ pcilib_context_t *ipecamera_init(pcilib_t *pcilib) { switch (value) { case 5: ctx->firmware = value; + err = pcilib_add_registers(pcilib, 0, cmosis_registers); + break; + case 6: + ctx->firmware = value; + err = pcilib_add_registers(pcilib, 0, cmosis20000_registers); break; default: ctx->firmware = 5; pcilib_warning("Unsupported version of firmware (%lu)", value); } +// FIND_REG(n_lines_reg, "cmosis", "cmosis_number_lines"); // cmosis_number_lines_single v.6 ? +// FIND_REG(line_reg, "cmosis", "cmosis_start1"); // cmosis_start_single v.6 ? +// FIND_REG(exposure_reg, "cmosis", "cmosis_exp_time"); +// FIND_REG(flip_reg, "cmosis", "cmosis_image_flipping"); + + #ifdef IPECAMERA_ADJUST_BUFFER_SIZE GET_REG(max_frames_reg, value); if ((value + IPECAMERA_RESERVE_BUFFERS + 3) > ctx->buffer_size) { -- cgit v1.2.3