From b4e38d7ea765422bf301980634b7b948fe989ae1 Mon Sep 17 00:00:00 2001 From: Jan Breuer <jan.breuer@jaybee.cz> Date: 周三, 19 6月 2013 23:10:02 +0800 Subject: [PATCH] Convert parameter handling to new lexer --- libscpi/src/ieee488.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libscpi/src/ieee488.c b/libscpi/src/ieee488.c index 2dc0662..5fd7fe9 100644 --- a/libscpi/src/ieee488.c +++ b/libscpi/src/ieee488.c @@ -210,9 +210,9 @@ * @return */ scpi_result_t SCPI_CoreEse(scpi_t * context) { - int32_t new_ESE; - if (SCPI_ParamInt(context, &new_ESE, TRUE)) { - SCPI_RegSet(context, SCPI_REG_ESE, new_ESE); + scpi_parameter_t parameter; + if (SCPI_Parameter(context, ¶meter, TRUE)) { + SCPI_RegSet(context, SCPI_REG_ESE, SCPI_ParamGetIntVal(context, ¶meter)); } return SCPI_RES_OK; } @@ -244,9 +244,9 @@ * @return */ scpi_result_t SCPI_CoreIdnQ(scpi_t * context) { - SCPI_ResultString(context, SCPI_MANUFACTURE); - SCPI_ResultString(context, SCPI_DEV_NAME); - SCPI_ResultString(context, SCPI_DEV_VERSION); + SCPI_ResultText(context, SCPI_MANUFACTURE); + SCPI_ResultText(context, SCPI_DEV_NAME); + SCPI_ResultText(context, SCPI_DEV_VERSION); return SCPI_RES_OK; } @@ -289,9 +289,9 @@ * @return */ scpi_result_t SCPI_CoreSre(scpi_t * context) { - int32_t new_SRE; - if (SCPI_ParamInt(context, &new_SRE, TRUE)) { - SCPI_RegSet(context, SCPI_REG_SRE, new_SRE); + scpi_parameter_t parameter; + if (SCPI_Parameter(context, ¶meter, TRUE)) { + SCPI_RegSet(context, SCPI_REG_SRE, SCPI_ParamGetIntVal(context, ¶meter)); } return SCPI_RES_OK; } -- Gitblit v1.9.1