From f8536daee65bdd87d004771c787a6f42a1397859 Mon Sep 17 00:00:00 2001
From: Jan Breuer <jan.breuer@jaybee.cz>
Date: 周三, 18 3月 2015 17:16:31 +0800
Subject: [PATCH] Add new AUTO special value, resolve #20

---
 examples/test-parser/main.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/examples/test-parser/main.c b/examples/test-parser/main.c
index 0ab2b2a..c4b3155 100644
--- a/examples/test-parser/main.c
+++ b/examples/test-parser/main.c
@@ -65,9 +65,16 @@
     return SCPI_RES_OK;
 }
 
-scpi_result_t SCPI_Test(scpi_t * context) {
+/**
+ * Callback for *TST? command
+ * 
+ * It returns directly the result of the test
+ * @param context
+ * @return 0 means "test was OK", other values means, that some error bits are set
+ */
+int32_t SCPI_Test(scpi_t * context) {
     fprintf(stderr, "**Test\r\n");
-    return SCPI_RES_OK;
+    return 0;
 }
 
 scpi_result_t SCPI_Reset(scpi_t * context) {
@@ -101,9 +108,9 @@
     TEST_SCPI_INPUT(""); // emulate command timeout
 
     TEST_SCPI_INPUT("*ESE\r\n"); // cause error -109, missing parameter
-    TEST_SCPI_INPUT("*ESE 0x20\r\n");
+    TEST_SCPI_INPUT("*ESE #H20\r\n");
 
-    TEST_SCPI_INPUT("*SRE 0xFF\r\n");
+	TEST_SCPI_INPUT("*SRE #HFF\r\n");
     
     TEST_SCPI_INPUT("IDN?\r\n"); // cause error -113, undefined header
 

--
Gitblit v1.9.1