From b2047704ad359447958203810784f4e2f3deeff5 Mon Sep 17 00:00:00 2001 From: Howard Li <bighorn@pursuitofchallenge.com> Date: 周三, 29 4月 2020 03:23:49 +0800 Subject: [PATCH] Avoid directly clearing STB --- libscpi/inc/scpi/types.h | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/libscpi/inc/scpi/types.h b/libscpi/inc/scpi/types.h index 75d187f..6fca535 100644 --- a/libscpi/inc/scpi/types.h +++ b/libscpi/inc/scpi/types.h @@ -78,7 +78,13 @@ SCPI_REG_QUESE, /* QUEStionable status Enable Register */ SCPI_REG_QUESC, /* QUEStionable status Condition Register */ - /* Add device specific registers here*/ +#if USE_CUSTOM_REGISTERS +#ifndef USER_REGISTERS +#error "No user registers defined" +#else + USER_REGISTERS +#endif +#endif /* number of registers */ SCPI_REG_COUNT, @@ -126,7 +132,13 @@ SCPI_REG_GROUP_OPER, SCPI_REG_GROUP_QUES, - /* Add device specific register groups here*/ +#if USE_CUSTOM_REGISTERS +#ifndef USER_REGISTER_GROUPS +#error "No user register groups defined" +#else + USER_REGISTER_GROUPS +#endif +#endif /* last definition - number of register groups */ SCPI_REG_GROUP_COUNT -- Gitblit v1.9.1