/alps/ipecamera

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/ipecamera

« back to all changes in this revision

Viewing changes to private.h

  • Committer: Suren A. Chilingaryan
  • Date: 2015-08-05 17:27:19 UTC
  • Revision ID: csa@suren.me-20150805172719-nbqb4pig9y135pxy
Introduce API debugging

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# define IPECAMERA_DEBUG_RAW_PACKETS            //**< Store all raw packets read from DMA grouped in frames */
15
15
# define IPECAMERA_DEBUG_HARDWARE               //**< Produce various debugging information about ipecamera operation */
16
16
# define IPECAMERA_DEBUG_FRAME_HEADERS          //**< Print frame headers & footers */
 
17
# define IPECAMERA_DEBUG_API                    //**< Debug IPECamera API calls */
17
18
#endif /* IPECAMERA_DEBUG */
18
19
 
19
20
#define IPECAMERA_BUG_MISSING_PAYLOAD           //**< CMOSIS fails to provide a first payload for each frame, therefore the frame is 32 bit shorter */
108
109
# define IPECAMERA_DEBUG_FRAME_HEADERS_BUFFER(function, ...)
109
110
#endif /* IPECAMERA_DEBUG_RAW_FRAMES */
110
111
 
 
112
#ifdef IPECAMERA_DEBUG_API
 
113
# define IPECAMERA_DEBUG_API_MESSAGE(function, ...)  if (ipecamera_getenv(function##_ENV, #function)) { pcilib_debug_message (#function, __FILE__, __LINE__, __VA_ARGS__); }
 
114
# define IPECAMERA_DEBUG_API_BUFFER(function, ...)  if (ipecamera_getenv(function##_ENV, #function)) { pcilib_debug_data_buffer (#function, __VA_ARGS__); }
 
115
#else /* IPECAMERA_DEBUG_API */
 
116
# define IPECAMERA_DEBUG_API_MESSAGE(function, ...)
 
117
# define IPECAMERA_DEBUG_API_BUFFER(function, ...)
 
118
#endif /* IPECAMERA_DEBUG_API */
 
119
 
111
120
 
112
121
#define ipecamera_debug(function, ...) \
113
122
    IPECAMERA_DEBUG_##function##_MESSAGE(IPECAMERA_DEBUG_##function, PCILIB_LOG_DEFAULT, __VA_ARGS__)