From: Bert Vermeulen Date: Thu, 13 Jun 2013 12:23:06 +0000 (+0200) Subject: Add SR_ERR_TIMEOUT X-Git-Tag: libsigrok-0.2.1~60 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=3e62166ed3d0a2763b3627b5434b599a4b65c479;p=libsigrok.git Add SR_ERR_TIMEOUT --- diff --git a/error.c b/error.c index d7d792d5..8ccd17df 100644 --- a/error.c +++ b/error.c @@ -84,6 +84,9 @@ SR_API const char *sr_strerror(int error_code) case SR_ERR_DEV_CLOSED: str = "device closed but should be open"; break; + case SR_ERR_TIMEOUT: + str = "timeout occurred"; + break; default: str = "unknown error"; break; @@ -144,6 +147,9 @@ SR_API const char *sr_strerror_name(int error_code) case SR_ERR_DEV_CLOSED: str = "SR_ERR_DEV_CLOSED"; break; + case SR_ERR_TIMEOUT: + str = "SR_ERR_TIMEOUT"; + break; default: str = "unknown error code"; break; diff --git a/libsigrok.h b/libsigrok.h index 6cda5543..da6a1011 100644 --- a/libsigrok.h +++ b/libsigrok.h @@ -72,6 +72,7 @@ enum { SR_ERR_SAMPLERATE = -5, /**< Incorrect samplerate. */ SR_ERR_NA = -6, /**< Not applicable. */ SR_ERR_DEV_CLOSED = -7, /**< Device is closed, but needs to be open. */ + SR_ERR_TIMEOUT = -8, /**< A timeout occurred. */ /* * Note: When adding entries here, don't forget to also update the