Commit Graph

14 Commits

Author SHA1 Message Date
Gerhard Sittig 48b7c34629 serial: make LCR, modbus, SCPI over serial depend on generic serial comm
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.
2019-06-02 20:39:02 +02:00
Gerhard Sittig 1df81f4b06 serial: introduce more general "have serial comm" feature flag
Introduce the HAVE_SERIAL_COMM identifier, which gets derived from, but
need not be identical to the HAVE_LIBSERIALPORT condition.

Derive the NEED_SERIAL automake condition from the general availability
of serial communication not the specific libserialport library.

Adjust source code references. Stick with HAVE_LIBSERIALPORT where the
specific library is meant, but switch to HAVE_SERIAL_COMM where the
availability of serial communication in general is meant.
2019-06-02 20:39:02 +02:00
James Churchill 7b50a9b869 modbus: Return explicit SR_ERR values as required by modbus.c
The Modbus RTU implementation was inappropriately returning lengths
from the serial functions when the calling functions expect only an
sr_error_code value.
2018-03-26 15:41:01 +10:00
James Churchill d4e0701771 modbus: Increase modbus reply timeout to 500ms.
Needed by rdtech-dps driver, 100ms is too short.
2018-03-26 15:41:01 +10:00
Uwe Hermann 379e95c587 drivers: Use serial_write_blocking() everywhere.
This fixes bug #962.
2017-08-07 14:22:52 +02:00
Uwe Hermann 176d785d33 Drop trailing whitespace in various files. 2017-06-06 14:10:02 +02:00
Uwe Hermann d9251a2c9f Remove some unneeded double-spaces.
(also perform some other minor whitespace fixes while at it)
2016-08-29 21:51:27 +02:00
Wolfram Sang 52fb2d4484 modbus: silence a build warning
Refactor handling the size of modbus_devs, so it doesn't produce a build
warning and still allows the compiler to remove unused code.

This fixes bug #637. It could be reverted once modbus_devs
unconditionally has a member in the struct.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2015-12-29 13:19:36 +01:00
Daniel Elstner 6ec6c43b47 Build: Include <config.h> first in all source files
Since Autoconf places some important feature flags only into the
configuration header, it is necessary to include it globally to
guarantee a consistent build.
2015-09-13 18:54:46 +02:00
Daniel Elstner c1aae90038 Build: Set local include directories in Makefile.am
Move the include flags for files in the source tree from
configure.ac to Makefile.am where they belong.  Also use
AM_CPPFLAGS instead of CFLAGS/CXXFLAGS to make sure the
files in the build/source tree are always picked up first.

Also, remove the include/libsigrok sub-directory from the
search path, thereby making the <libsigrok/> prefix mandatory
when building libsigrok itself.  This matches the convention
already imposed on users of the library.
2015-08-16 18:28:12 +02:00
Uwe Hermann ae1827f557 modbus: Consistently use the "Modbus" spelling.
(as per modbus.org spelling)
2015-06-07 20:42:33 +02:00
Uwe Hermann f54ebe0c06 modbus: Minor typos, cosmetics and consistency fixes. 2015-06-07 20:40:32 +02:00
Aurelien Jacobs 4c938fc27f modbus: add a serial RTU backend. 2015-05-12 13:22:34 +02:00
Aurelien Jacobs daa3901205 Add a modbus communication helper module. 2015-05-12 13:22:34 +02:00