Commit Graph

27 Commits

Author SHA1 Message Date
Martin Ling 3544f848e0 Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
Uwe Hermann 2eb84c9835 Doxygen: Consistently use @ notation everywhere. 2013-12-17 17:45:18 +01:00
Bert Vermeulen 1e7134dc8c std: Don't build serial helpers without libserialport present. 2013-12-11 00:33:11 +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 6936af3292 Use sdi->status instead of serial->fd to tell if port needs closing. 2013-12-07 19:43:47 +00:00
Martin Ling bf2c987fde Use std_serial_dev_close() to replace matching dev_close functions. 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 4b4474ed6a Remove SR_INST_USBTMC which is no longer used. 2013-12-03 23:29:20 +00:00
Martin Ling 23f43dff15 Make SCPI functions device independent, with separate serial backend. 2013-12-03 22:00:31 +00: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 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
Matthias Heidbrink 1477a9a6dc std.c: Changed return value of std_dev_acquisition_stop_serial() for non-active device to SR_ERR_DEV_CLOSED for consistency with other functions. 2013-10-25 21:25:26 +02:00
Uwe Hermann f6beaac55c std: Drop hw_ from function names.
The per-driver API calls no longer have a hw_ prefix (e.g. hw_init()
became init() and so on), so drop the 'hw_' from the std versions
for those API callbacks too.
2013-06-02 16:46:18 +02:00
Uwe Hermann 6078d2c996 Use consistent API callback function names.
This now matches what the 'new-driver' tool generates.
2013-05-10 20:01:37 +02:00
Bert Vermeulen 12a33563b9 std: Fix memory leak, code cleanup 2013-05-06 00:37:29 +02:00
Uwe Hermann a0c7e23ad8 Fix the build when libusb is not available.
Thanks Simon Richter <Simon.Richter@hogyros.de> for reporting.
2013-05-03 13:29:49 +02:00
Bert Vermeulen 3a277f3b2b Deal with uninitialized drivers 2013-05-01 23:30:37 +02:00
Bert Vermeulen c2523f2213 Explicitly initialize all struct parameters on init 2013-04-27 18:24:50 +02:00
Uwe Hermann 50985c2019 GPL headers: Use correct project name. 2013-04-23 22:24:30 +02:00
Bert Vermeulen ae5859fff0 Allow for sdi->priv helper function in std_dev_clear 2013-04-17 00:49:41 +02:00
Bert Vermeulen 49f00e13f7 Add driver helper std_dev_clear() 2013-04-16 17:57:08 +02:00
Uwe Hermann cd2f0fe22c Add/use std_hw_dev_acquisition_stop_serial(). 2013-02-08 23:32:45 +01:00
Uwe Hermann 4afdfd4628 Add and use std_session_send_df_header().
This is a small helper function which sends the SR_DF_HEADER packet that
drivers usually emit in their hw_dev_acquisition_start() API callback.
It simplifies and shortens the hw_dev_acquisition_start() functions
quite a bit.

It also simplifies the input modules which send an SR_DF_HEADER packet, too.

This patch also automatically removes some unneeded malloc/free in some
drivers for the 'packet' and 'header' structs used for SR_DF_HEADER.
2013-02-07 10:46:28 +01:00
Uwe Hermann 063e7aef6d Factor out common hw_init() driver code.
Most drivers do pretty much the same things in their hw_init()
right now, so factor out that code to std_hw_init() in std.c.
2013-01-29 12:56:02 +01:00