1
0
mirror of https://github.com/preble/libpinproc synced 2026-02-24 18:25:23 +01:00

Added log levels. Fixed bug in PRDevice::Open() if VerifyChipID() worked the first time.

This commit is contained in:
Adam Preble
2009-05-30 14:43:48 -04:00
parent 495d688106
commit 87c73a1f06
6 changed files with 69 additions and 59 deletions

View File

@@ -71,9 +71,17 @@ typedef int32_t PRResult; /**< See: #kPRSuccess and #kPRFailure. */
typedef void * PRHandle; /**< Opaque type used to reference an individual P-ROC device. Created with PRCreate() and destroyed with PRDelete(). This value is used as the first parameter to all P-ROC API function calls. */
#define kPRHandleInvalid (0) /**< Value returned by PRCreate() on failure. Indicates an invalid #PRHandle. */
typedef void (*PRLogCallback)(const char *text); /**< Function pointer type for a custom logging callback. See: PRLogSetCallback(). */
typedef enum PRLogLevel {
kPRLogInfo,
kPRLogWarning,
kPRLogError
} PRLogLevel;
typedef void (*PRLogCallback)(PRLogLevel level, const char *text); /**< Function pointer type for a custom logging callback. See: PRLogSetCallback(). */
PR_EXPORT void PRLogSetCallback(PRLogCallback callback); /**< Replaces the default logging handler with the given callback function. */
PR_EXPORT void PRLogSetLevel(PRLogLevel level);
/**
* @defgroup device Device Creation & Deletion
* @{