From 6ae1b9875e0b804eabdeb10fda23fd8db5fc9f1c Mon Sep 17 00:00:00 2001 From: Jan Breuer <jan.breuer@jaybee.cz> Date: 周三, 01 2月 2023 18:21:12 +0800 Subject: [PATCH] build: allow compilation by C++ compiler --- libscpi/inc/scpi/types.h | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/libscpi/inc/scpi/types.h b/libscpi/inc/scpi/types.h index 75d187f..eb9b215 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 @@ -416,6 +428,7 @@ scpi_interface_t * interface; int_fast16_t output_count; int_fast16_t input_count; + scpi_bool_t first_output; scpi_bool_t cmd_error; scpi_fifo_t error_queue; #if USE_DEVICE_DEPENDENT_ERROR_INFORMATION && !USE_MEMORY_ALLOCATION_FREE @@ -426,7 +439,7 @@ void * user_context; scpi_parser_state_t parser_state; const char * idn[4]; - size_t arbitrary_reminding; + size_t arbitrary_remaining; }; enum _scpi_array_format_t { -- Gitblit v1.9.1