diff options
author | root <root@ipepdvpc4> | 2011-07-27 12:33:34 +0200 |
---|---|---|
committer | root <root@ipepdvpc4> | 2011-07-27 12:33:34 +0200 |
commit | 6880d3f07317d34af6f30515acea128bb19f84a3 (patch) | |
tree | 16721d7645d667cb0fdf71c842ae8fc8942be349 | |
parent | 9a12692fe9e0b3669bc3a120308d3003e5bac8cb (diff) | |
download | pcitool-6880d3f07317d34af6f30515acea128bb19f84a3.tar.gz pcitool-6880d3f07317d34af6f30515acea128bb19f84a3.tar.bz2 pcitool-6880d3f07317d34af6f30515acea128bb19f84a3.tar.xz pcitool-6880d3f07317d34af6f30515acea128bb19f84a3.zip |
Disable debugging
-rw-r--r-- | dma/nwl.h | 2 | ||||
-rw-r--r-- | ipecamera/image.c | 11 | ||||
-rw-r--r-- | ipecamera/model.h | 2 |
3 files changed, 12 insertions, 3 deletions
@@ -15,7 +15,7 @@ typedef struct pcilib_nwl_engine_description_s pcilib_nwl_engine_description_t; #define PCILIB_NWL_DMA_DESCRIPTOR_SIZE 64 // in bytes #define PCILIB_NWL_DMA_PAGES 1024 // 1024 -#define DEBUG_HARDWARE +//#define DEBUG_HARDWARE //#define DEBUG_NWL #include "nwl_dma.h" diff --git a/ipecamera/image.c b/ipecamera/image.c index 0f6afb4..0e4a849 100644 --- a/ipecamera/image.c +++ b/ipecamera/image.c @@ -662,17 +662,26 @@ static int ipecamera_get_image(ipecamera_t *ctx) { if (err == PCILIB_ERROR_TIMEOUT) { if (size > 0) err = 0; else { -// pcilib_error("There is no data received from IPE Camera"); +#ifdef IPECAMERA_DEBUG pcilib_warning("There is no data received from IPE Camera for lines: %i to %i", i, i + num_lines - 1); err = 0; SET_REG(control_reg, IPECAMERA_IDLE); continue; +#else /* IPECAMERA_DEBUG */ + pcilib_error("There is no data received from IPE Camera"); + return err; +#endif /* IPECAMERA_DEBUG */ } } else pcilib_error("DMA read from IPE Camera have failed"); } else if (!size) { +#ifdef IPECAMERA_DEBUG pcilib_warning("There is no data received from IPE Camera for lines: %i to %i", i, i + num_lines - 1); SET_REG(control_reg, IPECAMERA_IDLE); continue; +#else /* IPECAMERA_DEBUG */ + pcilib_warning("There is no data received from IPE Camera for lines: %i to %i", i, i + num_lines - 1); + return err; +#endif /* IPECAMERA_DEBUG */ } pcilib_warning("Reading lines %i to %i: got %i bytes from DMA", i, i + num_lines - 1, size); diff --git a/ipecamera/model.h b/ipecamera/model.h index c102e41..2dec30a 100644 --- a/ipecamera/model.h +++ b/ipecamera/model.h @@ -6,7 +6,7 @@ #include "pcilib.h" #include "image.h" -#define IPECAMERA_DEBUG +//#define IPECAMERA_DEBUG #define IPECAMERA_DMA_R3 #define IPECAMERA_DMA_ADDRESS 1 |