summaryrefslogtreecommitdiff
path: root/src/jtag/jtag.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/jtag/jtag.h')
-rw-r--r--src/jtag/jtag.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h
index 01ef58cd..90e8ae0b 100644
--- a/src/jtag/jtag.h
+++ b/src/jtag/jtag.h
@@ -561,7 +561,16 @@ static __inline__ void jtag_set_error(int error)
jtag_error=error;
}
-
+/**
+ * Resets jtag_error to ERROR_OK, returning its previous value.
+ * @returns The previous value of @c jtag_error.
+ */
+static inline int jtag_error_clear(void)
+{
+ int temp = jtag_error;
+ jtag_error = ERROR_OK;
+ return temp;
+}
/* can be implemented by hw+sw */
extern int jtag_power_dropout(int* dropout);