summaryrefslogtreecommitdiffstats
path: root/private.h
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2015-05-03 02:31:15 +0200
committerSuren A. Chilingaryan <csa@suren.me>2015-05-03 02:31:15 +0200
commit88de46052e87ba7b84629163dd4946c9bb24cd22 (patch)
tree3c9c80434fa75558ec86bd072230b5c92f6d8874 /private.h
parent5252a0049e0a509508a8f331222543620db0e6d3 (diff)
downloadipecamera-88de46052e87ba7b84629163dd4946c9bb24cd22.tar.gz
ipecamera-88de46052e87ba7b84629163dd4946c9bb24cd22.tar.bz2
ipecamera-88de46052e87ba7b84629163dd4946c9bb24cd22.tar.xz
ipecamera-88de46052e87ba7b84629163dd4946c9bb24cd22.zip
Report extra padding only if IPECAMERA_DEBUG_HARDWARE is set
Diffstat (limited to 'private.h')
-rw-r--r--private.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/private.h b/private.h
index a7d39e2..46d6c1a 100644
--- a/private.h
+++ b/private.h
@@ -8,9 +8,10 @@
#define IPECAMERA_DEBUG
#ifdef IPECAMERA_DEBUG
-//# define IPECAMERA_DEBUG_RAW_FRAMES
-# define IPECAMERA_DEBUG_BROKEN_FRAMES
-# define IPECAMERA_DEBUG_RAW_PACKETS
+//# define IPECAMERA_DEBUG_RAW_FRAMES //**< Store all raw frames */
+# define IPECAMERA_DEBUG_BROKEN_FRAMES //**< Store broken frames in the specified directory */
+# define IPECAMERA_DEBUG_RAW_PACKETS //**< Store all raw packets read from DMA grouped in frames */
+# define IPECAMERA_DEBUG_HARDWARE //**< Produce various debugging information about ipecamera operation */
#endif /* IPECAMERA_DEBUG */
//#define IPECAMERA_BUG_MISSING_PAYLOAD //**< CMOSIS fails to provide a first payload for each frame, therefore the frame is 32 bit shorter */
@@ -72,13 +73,22 @@
# define IPECAMERA_DEBUG_BROKEN_FRAMES_BUFFER(function, ...)
#endif /* IPECAMERA_DEBUG_BROKEN_FRAMES */
-#ifdef IPECAMERA_IPECAMERA_DEBUG_RAW_PACKETS
+#ifdef IPECAMERA_DEBUG_RAW_PACKETS
# define IPECAMERA_DEBUG_RAW_PACKETS_MESSAGE(function, ...) pcilib_debug_message (#function, __FILE__, __LINE__, __VA_ARGS__)
# define IPECAMERA_DEBUG_RAW_PACKETS_BUFFER(function, ...) pcilib_debug_data_buffer (#function, __VA_ARGS__)
-#else /* IPECAMERA_IPECAMERA_DEBUG_RAW_PACKETS */
+#else /* IPECAMERA_DEBUG_RAW_PACKETS */
# define IPECAMERA_DEBUG_RAW_PACKETS_MESSAGE(function, ...)
# define IPECAMERA_DEBUG_RAW_PACKETS_BUFFER(function, ...)
-#endif /* IPECAMERA_IPECAMERA_DEBUG_RAW_PACKETS */
+#endif /* IPECAMERA_DEBUG_RAW_PACKETS */
+
+#ifdef IPECAMERA_DEBUG_HARDWARE
+# define IPECAMERA_DEBUG_HARDWARE_MESSAGE(function, ...) pcilib_debug_message (#function, __FILE__, __LINE__, __VA_ARGS__)
+# define IPECAMERA_DEBUG_HARDWARE_BUFFER(function, ...) pcilib_debug_data_buffer (#function, __VA_ARGS__)
+#else /* IPECAMERA_DEBUG_HARDWARE */
+# define IPECAMERA_DEBUG_HARDWARE_MESSAGE(function, ...)
+# define IPECAMERA_DEBUG_HARDWARE_BUFFER(function, ...)
+#endif /* IPECAMERA_DEBUG_HARDWARE */
+
#define ipecamera_debug(function, ...) \
IPECAMERA_DEBUG_##function##_MESSAGE(IPECAMERA_DEBUG_##function, __VA_ARGS__)