]> sigrok.org Git - libsigrok.git/commitdiff
Add SR_ERR_TIMEOUT
authorBert Vermeulen <redacted>
Thu, 13 Jun 2013 12:23:06 +0000 (14:23 +0200)
committerBert Vermeulen <redacted>
Mon, 17 Jun 2013 14:17:38 +0000 (16:17 +0200)
error.c
libsigrok.h

diff --git a/error.c b/error.c
index d7d792d53bd5f8c6c7dd53170c723648404a8e97..8ccd17dfe337ef8d853556d93131c546e6ba2790 100644 (file)
--- 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;
index 6cda5543223d17cfceb225c0dce40ded25899feb..da6a10118b4afa39c889c474d732deb1155bba1d 100644 (file)
@@ -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