Commit Graph

119 Commits

Author SHA1 Message Date
Aurelien Jacobs ea2d6d994f libsigrok-internal.h: endian neutral helper macro to write 8/16/32 bits integer to unaligned memory 2014-02-07 18:53:04 +01:00
Aurelien Jacobs a4f9c35b23 libsigrok-internal.h: add helper macro to read 8 bits integer
matching the 16 and 32 bits one
2014-02-07 18:53:04 +01:00
Daniel Elstner 2a854d7139 hwdriver: Introduce sr_config_commit() API call.
(sr_dev_driver.config_probe_set): New optional callback enabling
drivers to be notified upon changes to probe settings.
(sr_dev_probe_enable, sr_dev_trigger_set): Invoke new driver
callback on changes.
(sr_dev_driver.config_commit): New optional callback allowing
drivers to defer application of configuration settings until
an explicit call to config_commit().
(sr_config_commit): New public wrapper function.
2014-01-20 14:16:32 +01:00
poljar (Damir Jelić) c09392d092 scpi: Add CMD_GET_SAMPLE_RATE to the command enum. 2014-01-16 16:27:35 +01:00
poljar (Damir Jelić) 9806c2d573 strutil: Add function to parse floating point numbers while ignoring the locale.
Most of the supported gear uses the ANSI C locale for communication, and if the
client sets up an incompatible locale parsing would fail.

This function ignores the client's locale and parses floating point numbers
using the ANSI C locale. This function should be always used when parsing
floating point numbers coming from the instrument.
2014-01-16 16:27:35 +01:00
Aurelien Jacobs 2588e50c63 es519xx: add missing declarations for es519xx_2400_11b_altfn 2014-01-14 23:26:00 +01:00
Aurelien Jacobs f754c14691 scpi: make the scpi_dev_inst_new more generic 2014-01-12 00:05:02 +01:00
Aurelien Jacobs c3515cea44 scpi: factorize dev_inst_new calls out of individual drivers 2014-01-11 22:36:46 +01:00
Aurelien Jacobs d5876cfb4a scpi: add VXI transport support 2014-01-11 22:36:09 +01:00
Uwe Hermann d327972b97 Add initial support for the V&A VA40B multimeter. 2014-01-02 01:46:15 +01:00
Aurelien Jacobs 79a1176b3f fix endian neutral helper macro to return an integer type 2013-12-30 19:23:54 +01:00
Martin Ling 9a47421157 Add blocking and nonblocking versions of serial_read and serial_write. 2013-12-30 14:19:39 +01:00
Aurelien Jacobs cb410697fb remove the es51922 protocol parser, superseded by the es519xx protocol parser 2013-12-29 18:46:08 +01:00
Martin Ling 05c644ea08 Revise SCPI read API to allow backend-independent data handling. 2013-12-29 04:26:36 +01:00
Martin Ling 3544f848e0 Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
Aurelien Jacobs e28ef28a3c endian neutral helper macro to read 16/32 bits integer from unaligned memory 2013-12-23 01:21:51 +01:00
Martin Ling 6640324f7f usb: Enforce that there can only be one USB event source for now. 2013-12-22 17:27:13 +00:00
Martin Ling 5321ac6b52 Implement usb_source_add and usb_source_remove for Windows. 2013-12-22 07:16:56 +00:00
Martin Ling 6c60facc19 Use common usb_source_add and usb_source_remove functions. 2013-12-21 23:09:23 +00:00
Martin Ling ba1949f583 Use new libserialport event set API to make GPollFDs for serial sources. 2013-12-21 19:38:45 +00:00
Matthias Heidbrink 825da8b20f serial-dmm: Add BBC Goerz Metrawatt M2110 DMM driver. 2013-12-19 00:40:31 +01:00
Uwe Hermann a582788653 Fix a few #include guard names. 2013-12-17 17:45:18 +01:00
Bert Vermeulen 98582bf53f Make API docs more consistent, avoid tabs to line up comments. 2013-12-09 22:49:12 +01:00
Matthias Heidbrink 04cb915716 Improved doxygen docs. 2013-12-09 15:17:17 +01:00
Bert Vermeulen 23dc666166 std: Add std_serial_dev_open(). 2013-12-07 21:26:50 +01:00
Bert Vermeulen d43b090816 std: Standardize function name.
std_dev_acquisition_stop_serial() is now std_serial_dev_acquisition_stop().
2013-12-07 21:23:39 +01:00
Martin Ling b6eb8252e5 Remove now-unused fd field from struct sr_serial_dev_inst. 2013-12-07 19:43:47 +00:00
Martin Ling 043e899a51 Add std_serial_dev_close() function. 2013-12-07 19:43:47 +00:00
Martin Ling 7faa3e8821 Route sr_source_remove for all serial devices through a wrapper. 2013-12-07 19:43:47 +00:00
Martin Ling abc4b3356d Route sr_source_add for all serial devices through a serial_source_add wrapper. 2013-12-07 19:43:47 +00:00
Martin Ling 08a359138b Add implementation for SCPI over TCP. 2013-12-04 20:59:20 +00:00
Martin Ling 87c410830d Add sr_scpi_send_variadic() function. 2013-12-04 10:53:51 +00:00
Martin Ling 504f40a574 Make sr_scpi_send() take printf-style arguments. 2013-12-04 10:30:43 +00:00
Martin Ling 1ef5138071 Only scpi_serial.c functions need HAVE_LIBSERIALPORT, not scpi.c. 2013-12-03 23:31:32 +00:00
Martin Ling a1ff9c1897 Add sr_scpi_read() operation for reading arbitrary data. 2013-12-03 23:18:37 +00:00
Martin Ling 31034792da Implement SCPI over USBTMC. 2013-12-03 22:25:33 +00:00
Martin Ling 23f43dff15 Make SCPI functions device independent, with separate serial backend. 2013-12-03 22:00:31 +00:00
Uwe Hermann 8d558c7a9f strutil.c: Don't expose sr_atox() as API calls for now. 2013-12-03 17:16:59 +01:00
poljar (Damir Jelić) 1bd9e678ac serial: Add function to extract serial options.
This patch adds a function for a common operation of all serial based drivers.
It extracts the serial options from the options linked list that is passed down
to every hardware driver.
2013-12-03 15:10:01 +01:00
poljar (Damir Jelić) 1a323dd887 scpi: Add function to fetch uint8_t.
This patch adds a function to read and parse a SCPI response which contains a
comma separated list of unsignet 8-bit integer numbers (e.g "1,0,64").

This is particularly useful if the instrument sends digital measurement data
in this format.
2013-12-03 15:10:01 +01:00
poljar (Damir Jelić) 8acbb89a1d scpi: Add function to get an array of floats.
This patch adds a function to read and parse a SCPI response which contains a
comma-separated list of floating-point numbers (e.g. "1.0e-5,2.0e-4,3.0e-3").

This is particularly useful if the instrument sends analog measurement
data in this format.
2013-12-03 15:10:01 +01:00
poljar (Damir Jelić) f5922adef5 scpi: Add a function to read and wait on a *OPC? reply.
The SCPI standard specifies the "*OPC?" command (Operation complete query) which
queries the instrument for its operative state. When all pending operations are
complete, the instrument responds with a "1".

Some manufacturers block before completing all operations and don't respond
with anything and some of them respond with a "0". This function handles both
cases uniformly.
2013-12-03 15:10:01 +01:00
poljar (Damir Jelić) d730f70e06 scpi: Add more functions (getting int/bool/float/double).
This patch adds helper functions to read an SCPI response and parse the response
as an integer, boolean, floating-point or double-precision floating-point number.
2013-12-03 15:10:01 +01:00
poljar (Damir Jelić) 7b9d732031 scpi: Add helper functions for SCPI communication.
The Standard Commands for Programmable Instruments (SCPI) defines a standard
for syntax and commands to use in controlling programmable test and measurement
devices.

SCPI documentation:
	http://www.ivifoundation.org/docs/scpi-99.pdf

This patch adds helper functions for sending SCPI commands, reading a SCPI
response and reading and parsing a SCPI "*IDN?" response.
2013-12-03 15:10:00 +01:00
Martin Ling 9647ce694b Use new libserialport blocking/nonblocking API calls. 2013-12-01 18:51:24 +01:00
Martin Ling ae67644fe5 Create & use new sr_usbtmc_dev_inst for Rigol DS driver. 2013-11-29 01:13:22 +00:00
Uwe Hermann e2b2382101 Make struct sr_session opaque.
The fields of this structure should not be used directly by frontends
(and none of the current ones do). Thus, make the struct opaque and hide
its contents from the API.
2013-11-22 15:02:12 +01:00
Uwe Hermann dc99135322 libsigrok-internal.h: Fix libserialport.h name. 2013-11-15 09:48:34 +01:00
Uwe Hermann c4f2dfd0f0 configure.ac: libserialport is optional.
Disable drivers that need serial port support if libserialport is not found.

Also, disable building various other serial port related code in that case.
2013-11-15 09:36:51 +01:00
Martin Ling c9bc57b6bc Update to new libserialport API. 2013-11-14 23:48:16 +01:00