From a10c464ba98e980b21185bf084789f6c8df22473 Mon Sep 17 00:00:00 2001 From: Iztok Jeras <iztok.jeras@gmail.com> Date: 周三, 19 7月 2017 21:03:37 +0800 Subject: [PATCH] moving bool choice definition (ON, OFF) to units.c, so it could be used by various applications --- libscpi/src/units.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/libscpi/src/units.c b/libscpi/src/units.c index 3274205..a8bb7f1 100644 --- a/libscpi/src/units.c +++ b/libscpi/src/units.c @@ -285,6 +285,15 @@ SCPI_CHOICE_LIST_END, }; +/* + * Special number values definition + */ +const scpi_choice_def_t scpi_bool_def[] = { + {"OFF", 0}, + {"ON", 1}, + SCPI_CHOICE_LIST_END /* termination of option list */ +}; + /** * Convert string describing unit to its representation * @param units units patterns -- Gitblit v1.9.1