From d811ac6da4ab97088f7560b7999449ecd9b1d81f Mon Sep 17 00:00:00 2001 From: Jan Breuer <jan.breuer@jaybee.cz> Date: 周二, 14 4月 2015 04:04:37 +0800 Subject: [PATCH] Remove problematic test callback --- examples/common/scpi-def.c | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/examples/common/scpi-def.c b/examples/common/scpi-def.c index 562b67b..359fdc4 100644 --- a/examples/common/scpi-def.c +++ b/examples/common/scpi-def.c @@ -186,6 +186,21 @@ return SCPI_RES_OK; } +/** + * Reimplement IEEE488.2 *TST? + * + * Result should be 0 if everything is ok + * Result should be 1 if something goes wrong + * + * Return SCPI_RES_OK + */ +scpi_result_t My_CoreTstQ(scpi_t * context) { + + SCPI_ResultInt(context, 0); + + return SCPI_RES_OK; +} + static const scpi_command_t scpi_commands[] = { /* IEEE Mandated Commands (SCPI std V1999.0 4.1.1) */ { .pattern = "*CLS", .callback = SCPI_CoreCls,}, @@ -199,7 +214,7 @@ { .pattern = "*SRE", .callback = SCPI_CoreSre,}, { .pattern = "*SRE?", .callback = SCPI_CoreSreQ,}, { .pattern = "*STB?", .callback = SCPI_CoreStbQ,}, - { .pattern = "*TST?", .callback = SCPI_CoreTstQ,}, + { .pattern = "*TST?", .callback = My_CoreTstQ,}, { .pattern = "*WAI", .callback = SCPI_CoreWai,}, /* Required SCPI commands (SCPI std V1999.0 4.2.1) */ @@ -249,7 +264,6 @@ .control = SCPI_Control, .flush = SCPI_Flush, .reset = SCPI_Reset, - .test = SCPI_Test, }; #define SCPI_INPUT_BUFFER_LENGTH 256 -- Gitblit v1.9.1