Commit Graph

18 Commits

Author SHA1 Message Date
Bert Vermeulen 2df1e81970 Use new SR_DF_META packet.
Since input modules determine a samplerate by reading from their
file format (or having it overridden with an option), they need
to pass this up to the frontend.
2013-01-21 23:32:49 +01:00
Uwe Hermann 8e7f1cfd99 Input modules: Use message logging helpers. 2012-11-11 18:14:17 +01:00
Bert Vermeulen 5c3c1241d2 sr: change input/output modules to use struct sr_dev_inst * 2012-08-03 11:27:31 +02:00
Tomaž Šolc c506a6a688 Allow setting samplerate when reading binary files
I had a binary file that I needed to decode using UART decoder. UART
decoder needs to know the sample rate for the data, but currently it's
not possible to pass parameters to input formats and so the "binary"
file format always sets the samplerate to 0.

This patch adds the possibility to append a colon-separated list of
key=value options to the -I argument, in the same way -d supports it.
Also, it makes the "binary" format support the "samplerate" option.

I included the GHashTable containing input format options directly in
the sr_input struct. I'm not sure if that's the right way to do it. I
saw that -d uses a much more elaborate system with device capabilities
and typed options, but that seemed like an overkill for input formats.
2012-07-29 02:16:17 +02:00
Bert Vermeulen 45c59c8bdd sr: moved sigrok.h so libsigrok/libsigrok.h
All frontends will have to include <libsigrok/libsigrok.h> from now on.
This header includes proto.h and version.h, both installed from the
distribution into $INCLUDE/libsigrok/ as well.

The only dynamically changed header is now version.h, which has both
libsigrok and libtool compile-time versions in it.
2012-07-05 01:17:28 +02:00
Bert Vermeulen f366e86c68 sr: change all drivers to use SR_DF_META_LOGIC 2012-05-30 23:55:36 +02:00
Uwe Hermann 36423d04e5 sr: input/chronovu_la8.c: Add missing #include.
This fixes a compiler warning.
2012-05-30 02:27:30 +02:00
Uwe Hermann 3217b03205 sr: la8 in: Files must be exactly 8388613 bytes.
All ChronoVu LA8 files (*.kdt extension usually) are exactly 8388613
bytes in size (8MB + 5 bytes). Check this, when trying to autodetect the
file format, to reduce the likelihood of 'chronovu-la8' being
autodetected on all binary files (instead of 'binary').
2012-05-29 20:25:08 +02:00
Uwe Hermann 31ccebc492 sr: s/sr_session_bus/sr_session_send/. 2012-03-01 23:49:25 +01:00
Bert Vermeulen 2285cf9bc5 sr: code cleanup 2012-02-28 17:47:02 +01:00
Uwe Hermann bb7ef79377 sr/cli/gtk/qt: s/device/dev/ in many places.
Also, a few s/instance/inst/ occurences.
2012-02-17 23:47:00 +01:00
Uwe Hermann 44dae53925 sr: Random cosmetics, fix/amend Doxygen comments. 2012-02-17 22:40:51 +01:00
Uwe Hermann 7b48d6e104 sr: Prefix log messages with subsystem string. 2012-02-17 22:40:51 +01:00
Bert Vermeulen 031685005b sr: rename all sr_device_* functions to sr_dev_* 2012-02-13 14:00:47 +01:00
Uwe Hermann 133a37bfba Use g_try_malloc/g_free/g_strdup consistently.
Avoid plain malloc()/free() in sr/srd, especially in the API calls.
Also avoid g_malloc*() in favor of g_try_malloc*().

Use g_strdup() instead of strdup() so that we can use g_free()
consistently everywhere.

Exceptions: Stuff that is allocated via other libs (not using glib),
should also be properly free'd using the respective free-ing function
(instead of g_free()). Examples: Stuff allocated by libusb, libftdi, etc.

Also, use sr_err() instead of sr_warn() for actual errors. sr_warn() is
meant for non-fatal/uncritical warnings.
2012-02-11 22:34:16 +01:00
Uwe Hermann 7c1d391c8b sr: input/output: Mark more symbols with SR_PRIV. 2012-02-05 15:05:13 +01:00
Uwe Hermann 5c64390e5a sr/cli/gtk: Remove analog left-overs from API.
This will come back in some form or another later, but for now
don't clutter the API with non-working stuff. Removing stuff from APIs
is not possible without breaking the API, adding stuff later is simpler.
2012-02-05 15:05:12 +01:00
Uwe Hermann 0da5b6a9f5 sr: Remove useless filename prefixes. 2012-01-03 20:01:02 +01:00
Renamed from input/input_chronovu_la8.c (Browse further)