diff options
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__) |