summaryrefslogtreecommitdiffstats
path: root/ipecamera/image.c
diff options
context:
space:
mode:
authorroot <root@ipepdvpc4>2011-07-27 12:33:34 +0200
committerroot <root@ipepdvpc4>2011-07-27 12:33:34 +0200
commit6880d3f07317d34af6f30515acea128bb19f84a3 (patch)
tree16721d7645d667cb0fdf71c842ae8fc8942be349 /ipecamera/image.c
parent9a12692fe9e0b3669bc3a120308d3003e5bac8cb (diff)
downloadipecamera-6880d3f07317d34af6f30515acea128bb19f84a3.tar.gz
ipecamera-6880d3f07317d34af6f30515acea128bb19f84a3.tar.bz2
ipecamera-6880d3f07317d34af6f30515acea128bb19f84a3.tar.xz
ipecamera-6880d3f07317d34af6f30515acea128bb19f84a3.zip
Disable debugging
Diffstat (limited to 'ipecamera/image.c')
-rw-r--r--ipecamera/image.c11
1 files changed, 10 insertions, 1 deletions
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);