Commit Graph

121 Commits

Author SHA1 Message Date
Uwe Hermann 2ad1deb89d Don't include LOG_PREFIX in the Doxygen output.
(files in hardware/, input/, and output/ don't need this since none of
those directories contain API stuff and are thus not included in the
list of input files for Doxygen at all).
2014-04-25 18:44:40 +02:00
Uwe Hermann f3ca73edd2 Rename a few more API calls with 'probe' in their name.
This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann 3f239f0803 Rename various *PROBE* macros to *CHANNEL*.
This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann 56d0d24535 Rename sr_probe_new() to sr_channel_new().
This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann ba7dd8bbb8 Replace 'probe' with 'channel' in most places.
Also, consistently use 'ch' for channel variables. This matches how we
consistently use sdi, devc, and so on all over the code-base.

This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann 91aea754aa Rename 'struct sr_probe' to 'struct sr_channel' everywhere.
This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann 660e398fe9 Replace 'probe group' with 'channel group' everywhere.
The name 'probe' (and thus 'probe group') is a relic from the times when
sigrok was mostly about logic analyzers. Nowadays we support a lot more
device types where 'probe' is not really a good term and 'channel' is
much better suited.

This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Bert Vermeulen 8102cee4d4 device: sr_dev_clear() now always works.
If the driver does not provide a dev_clear() function, the wrapper
now calls std_dev_clear() instead.
2014-02-26 21:34:58 +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ć) 92b68bb5d6 device: Pass sdi as an function argument to config_list in dev_has_option()
With drivers that support multiple devices we need to know the device model
while listing options. That information is most of the time saved in the private
part of the dev_inst structure.

Pass the pointer to the dev_inst structure as an function argument so we have
access to this information.
2014-01-16 09:35:38 +01:00
Uwe Hermann df823ac444 Doxygen fixes: Hide private stuff, document some structs. 2013-12-27 16:18:28 +01:00
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
Matthias Heidbrink 04cb915716 Improved doxygen docs. 2013-12-09 15:17:17 +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 ae67644fe5 Create & use new sr_usbtmc_dev_inst for Rigol DS driver. 2013-11-29 01:13:22 +00:00
poljar (Damir Jelić) 90c7f4e92d device: Fix leak if probe groups are created. 2013-11-19 10:29:14 +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 909cc050bf probe_groups: initialise sdi->probe_groups to NULL. 2013-11-08 01:03:17 +01:00
Martin Ling 8f996b8948 probe_groups: API changes required to implement probe groups. 2013-11-08 01:03:16 +01:00
Uwe Hermann 53f05fa80f doxygen: @since tags document only last API change.
If a function existed before but the API changed, the @since
tag only reflects the release of the last API change.
2013-11-04 01:14:56 +01:00
Uwe Hermann 576ff5b0ba device.c: Add missing @since markers.
Also, add Doxygen comments for functions which don't have any yet.
2013-05-08 16:52:49 +02:00
Bert Vermeulen a006798b99 Fix various memory leaks 2013-05-06 00:40:17 +02:00
Uwe Hermann 29a27196a1 s/DRIVER_LOG_DOMAIN/LOG_PREFIX/.
This is more correct anyway, and also a bit shorter and more readable.
2013-05-03 21:59:32 +02:00
Bert Vermeulen efdecf4c05 Add sr_dev_open()/sr_dev_close()
Frontends will be required to open a device before using
sr_config_set() or starting acquisition.
2013-04-24 22:02:34 +02:00
Uwe Hermann 50985c2019 GPL headers: Use correct project name. 2013-04-23 22:24:30 +02:00
Bert Vermeulen f99e32affc sr_dev_inst_*() -> sr_dev_*() 2013-04-22 15:55:06 +02:00
Bert Vermeulen 9e2e98640a sr: add conn to sdi, for storing a ptr to device-specific connection info
What's in conn depends on the long-ignored inst_type field.
2013-04-16 17:57:08 +02:00
Uwe Hermann 9fb5f2dfa6 Doxygen: Add @since markers.
Add @since tags to some (not all yet) public API functions, to document
in which release they were added (and/or in which release there were
API changes).

Document the @since usage in HACKING.

Also, add Doxygen docs for the functions in version.c.
2013-04-16 12:37:54 +02:00
Bert Vermeulen 003595ac37 Adjust to GVariant-based sr_config_* functions 2013-04-11 18:32:06 +02:00
Bert Vermeulen 13d8e03c4f Bump copyright year 2013-04-11 18:32:06 +02:00
Uwe Hermann ca0938c50b Doxygen: Fix a few warnings. 2013-04-06 19:25:23 +02:00
Uwe Hermann c4227fc637 device: Cosmetics. 2013-01-29 12:56:03 +01:00
Bert Vermeulen cbadb856d6 Code cleanup. 2013-01-26 01:18:19 +01:00
Bert Vermeulen 4d15e5c907 Rename sr_dev_has_hwcap() to sr_dev_has_option(). 2013-01-25 16:20:40 +01:00
Bert Vermeulen 358d050d7a Rename sr_dev_config_set() to sr_config_set() 2013-01-25 15:38:57 +01:00
Bert Vermeulen 9a6517d14b Deprecate SR_DI_HWCAPS.
This is replaced by SR_CONF_DEVICE_OPTIONS.
2013-01-25 15:01:49 +01:00
Bert Vermeulen 035a1078fd drivers: rename and reorganize config get/set
The driver API calls info_get() and dev_config_set() have been renamed
to config_get() and config_set(), respectively.
2013-01-24 19:19:09 +01:00
Alexandru Gagniuc acac8fc350 device.c: Fix memory leak in sr_serial_dev_inst_free
sr_serial_dev_inst_free() freed all members of sr_serial_dev_inst, but did not
free the struct itself, as expected from a free_*() function. This inadvertently
caused a memory leak in every place sr_serial_dev_inst is used.

Free the struct itself

+	g_free(serial);

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-12-23 17:18:14 +01:00
Bert Vermeulen 299bdb249e serial: revamp internal API
The only thing to get passed around now is the struct sr_serial_dev_inst
pointer. This should make things more portable as well.
2012-11-12 00:27:17 +01:00
Uwe Hermann a885ce3ee9 Various subsystems: Use message logging helpers. 2012-11-11 18:14:17 +01:00
Uwe Hermann 64d33dc28e All drivers: Drop unneeded comments. 2012-11-11 18:09:11 +01:00
Uwe Hermann 545f978639 config.h usage cleanups.
- Drop config.h #include from files that don't actually use any of
   its contents (at the moment).

 - Add comment for those that do need it.
2012-10-24 00:41:21 +02:00
Uwe Hermann 393fb9cb18 Doxygen: Add @file items for the relevant files.
These short descriptions are shown in the "Files" section of the
Doxygen output.
2012-10-22 11:56:18 +02:00
Uwe Hermann 9c5332d291 Doxygen: Fix a bunch of warnings and outdated docs. 2012-10-22 11:56:18 +02:00
Uwe Hermann 7b870c38e3 Doxygen: Initial groups and topic short descriptions. 2012-10-22 11:56:18 +02:00
Uwe Hermann b4bd70889f Doxygen: Mark non-public stuff for exclusion.
- /** @private */ can be used for functions, and /** @cond PRIVATE */ and
   /** @endcond */ for variables or #defines.

 - Document the above in HACKING.
2012-10-22 11:56:17 +02:00
Bert Vermeulen 811deee4af sr/drivers: add API calls sr_dev_inst_list() and sr_dev_inst_clear()
These are used to list the device instances currently known to the driver,
and clear that list.

Drivers that don't necessarily clear their list of instances on every scan,
such as genericdmm, need to provide these to the frontend to keep instance
management sane.
2012-08-06 00:59:25 +02:00
Bert Vermeulen a56f148094 sr: new API call sr_dev_config_set()
This is a wrapper around the driver dev_config_set() call, to avoid
frontends needing visibility into drivers.
2012-08-05 15:53:04 +02:00
Bert Vermeulen d3cff734e5 sr: properly free probes when freeing their device instance 2012-08-04 12:03:05 +02:00