Add guards around the implementation of ES51919 chip support for LCR, as
well as modbus and SCPI over serial. To accept when the source files get
compiled in the absence of their dependencies, end up with an empty
implementation in that case.
This approach can simplify build rules when several optional external
dependencies result in differing sets of supported communication means.
#define LOG_PREFIX "es51919"
+#ifdef HAVE_SERIAL_COMM
+
struct dev_buffer {
/** Total size of the buffer. */
size_t size;
return SR_OK;
}
+
+#endif
#define LOG_PREFIX "modbus_serial"
+#ifdef HAVE_SERIAL_COMM
+
#define BUFFER_SIZE 1024
struct modbus_serial_rtu {
.close = modbus_serial_rtu_close,
.free = modbus_serial_rtu_free,
};
+
+#endif
#define LOG_PREFIX "scpi_serial"
+#ifdef HAVE_SERIAL_COMM
+
struct scpi_serial {
struct sr_serial_dev_inst *serial;
gboolean got_newline;
.close = scpi_serial_close,
.free = scpi_serial_free,
};
+
+#endif