diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2015-08-05 19:27:19 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2015-08-05 19:27:19 +0200 |
commit | 5edb8d14272ea2ecd9784a26e150a45954d67e2e (patch) | |
tree | f769aca2c7fc78ccb3a291623ca5c60c124413bb /private.h | |
parent | f290bdc333b01dbc5f695236e0b72db1ac2a67d5 (diff) | |
download | ipecamera-5edb8d14272ea2ecd9784a26e150a45954d67e2e.tar.gz ipecamera-5edb8d14272ea2ecd9784a26e150a45954d67e2e.tar.bz2 ipecamera-5edb8d14272ea2ecd9784a26e150a45954d67e2e.tar.xz ipecamera-5edb8d14272ea2ecd9784a26e150a45954d67e2e.zip |
Introduce API debugging
Diffstat (limited to 'private.h')
-rw-r--r-- | private.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -14,6 +14,7 @@ # 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 */ # define IPECAMERA_DEBUG_FRAME_HEADERS //**< Print frame headers & footers */ +# define IPECAMERA_DEBUG_API //**< Debug IPECamera API calls */ #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 */ @@ -108,6 +109,14 @@ # define IPECAMERA_DEBUG_FRAME_HEADERS_BUFFER(function, ...) #endif /* IPECAMERA_DEBUG_RAW_FRAMES */ +#ifdef IPECAMERA_DEBUG_API +# define IPECAMERA_DEBUG_API_MESSAGE(function, ...) if (ipecamera_getenv(function##_ENV, #function)) { pcilib_debug_message (#function, __FILE__, __LINE__, __VA_ARGS__); } +# define IPECAMERA_DEBUG_API_BUFFER(function, ...) if (ipecamera_getenv(function##_ENV, #function)) { pcilib_debug_data_buffer (#function, __VA_ARGS__); } +#else /* IPECAMERA_DEBUG_API */ +# define IPECAMERA_DEBUG_API_MESSAGE(function, ...) +# define IPECAMERA_DEBUG_API_BUFFER(function, ...) +#endif /* IPECAMERA_DEBUG_API */ + #define ipecamera_debug(function, ...) \ IPECAMERA_DEBUG_##function##_MESSAGE(IPECAMERA_DEBUG_##function, PCILIB_LOG_DEFAULT, __VA_ARGS__) |