Bert Vermeulen
e749a8cb50
hantek-dso: start sending the frame only from the trigger point
...
Samples received before the trigger point are stored. From the
trigger point on, every chunk received from the device is sent
up the session bus. After the device has finished sending, the
stored samples are transmitted.
2012-06-26 23:26:55 +02:00
Lars-Peter Clausen
fa114e4ab1
sr: fx2lafw: Set correct unitsize for trigger buffer
...
Commit 88b75eb719 ("fx2lafw: Added device caps and added support for wide
sampling") increased the size of the trigger buffer from 8 to 16 bit, but forgot
to adjust the unitsize logic packet which is used to send the contents of the
trigger buffer. This patch sets the unitsize to sizeof() of the trigger buffer.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2012-06-25 19:48:21 +02:00
Bert Vermeulen
e05a174be2
hantek-dso: fix triggerpoint conversion
2012-06-24 18:57:37 +02:00
Lars-Peter Clausen
f3ab43a8fb
sr: fx2lafw: Fix multistage trigger
...
Multistage triggers currently do no work, because there is a return statement
in the middle of the trigger detector which will be hit as soon as the first
stage in a multistage trigger matches. This patch removes the return statement
so that the trigger detector can continue to try to match the next stage. In
order for this to work we also make sure that the trigger stage is only reset
if the current sample does not match.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2012-06-24 14:35:26 +02:00
Lars-Peter Clausen
eabf24035b
sr: fx2lafw: Fix memory leaks in receive_transfer
...
There are a few memory leaks in the receive_transfer transfer function. The most
serve of them is that a sample buffer is not freed if the triggered has not
matched yet, which causes a sigrok process which is waiting for a trigger to
consume several megabytes of memory within seconds. The other leaks are on the
error paths in that function.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2012-06-22 09:23:30 +02:00
Uwe Hermann
9edfee3ee3
sr: ols: Fix incorrect comment.
2012-06-21 23:59:27 +02:00
Uwe Hermann
eb1f1eb407
sr: Unfinished Mastech VA18B (DMM) support.
2012-06-21 23:56:24 +02:00
Uwe Hermann
b908f067f2
sr: chronovu-la8: Split code into api.c and driver.c.
...
We should generally use api.c for API related functions and put the other
functions (mostly hardware-specific low-level code) into other C file(s)
for better readability.
2012-06-21 23:34:38 +02:00
Uwe Hermann
9956f2851f
sr: analog: Add MQ and UNIT enums.
...
MQ is the measured quantity, e.g. voltage, current, temperature.
UNIT is the unit in which these quantities are measured, e.g. volt,
ampere, celsius, kelvin, etc. etc.
The same MQ can be specified in different UNITs by the driver, depending
on what the hardware reports. Conversion is left to the frontends.
2012-06-20 23:55:23 +02:00
Uwe Hermann
c13536fa9c
sr: backend/zeroplus: Improve debug output.
2012-06-19 23:33:50 +02:00
Bert Vermeulen
6e6eeff47a
hantek-dso: capturestate packet also contains the trigger point
...
Not yet used, but it's the key to knowing where in the frame to
start displaying; the frame is used as a circular buffer, and what
is sent is effectively a snapshot.
2012-06-18 23:09:37 +02:00
Bert Vermeulen
a217bcdf10
hantek-dso: relays now set properly
...
They appear to be arranged to switch on/off a hierarchical series of
devices that attenuate the channel by an order of magnitude.
2012-06-18 23:05:02 +02:00
Uwe Hermann
384c28d9e7
sr: hantek-dso: Use portable g_ntohs() function.
...
The ntohs() from <arpa/inet.h> is not available on MinGW/Windows. There
are ways to work around this, but as we use glib already, using g_ntohs()
is the best option anyway.
2012-06-14 01:21:00 +02:00
Bert Vermeulen
c5841b2809
hantek-dso: calculate voltage based on vdiv setting
2012-06-05 18:18:23 +02:00
Bert Vermeulen
a10c805636
hantek-dso: default to DC coupling
2012-06-05 18:18:23 +02:00
Bert Vermeulen
1d97091e71
hantek-dso: fix CH2 vdiv setting
2012-06-05 18:18:23 +02:00
Bert Vermeulen
aff5a729ab
sr: add unit field to sr_df_analog packet
2012-06-05 18:18:23 +02:00
Uwe Hermann
62bb8840e1
sr: hantek-dso: Consistency renames, constification.
2012-06-01 01:12:09 +02:00
Uwe Hermann
0a88ec3d9c
sr: fx2lafw: Use gboolean, cosmetics, fix gcc warning.
2012-05-31 22:48:40 +02:00
Uwe Hermann
af36b80969
hantek-dso: Update to constified libsigrok API.
2012-05-31 22:43:12 +02:00
Uwe Hermann
88ff66c2c9
hantek-dso: Quickfix for build issue (will be removed later).
2012-05-31 22:40:41 +02:00
Joel Holdsworth
f4575b6549
fx2lafw: Added a check to limit the sample rate during 16-bit sampling
2012-05-31 19:53:36 +01:00
Joel Holdsworth
d1ddc7a9a8
fx2lafw: Added device caps and added support for wide sampling
2012-05-31 19:52:32 +01:00
Joel Holdsworth
a533743dd1
sr: Made sample rate lists const
2012-05-31 19:51:11 +01:00
Joel Holdsworth
1b79df2f57
sr: Made the dev_config_set parameter a const pointer
2012-05-31 19:51:11 +01:00
Joel Holdsworth
b7f578bef5
sr: Made the dev_info_get return value const
2012-05-31 19:51:10 +01:00
Joel Holdsworth
915f7cc87a
sr: Made hwcap const
2012-05-31 19:51:09 +01:00
Bert Vermeulen
2715c0b86b
hantek-dso: hopefully handle endianness in voltage setting
2012-05-30 23:56:13 +02:00
Bert Vermeulen
4a090d722d
hantek-dso: enable SR_HWCAP_COUPLING
2012-05-30 23:56:13 +02:00
Bert Vermeulen
b58fbd99c8
hantek-dso: support for SR_HWCAP_COUPLING
2012-05-30 23:56:13 +02:00
Bert Vermeulen
313deed219
hantek-dso: support SR_HWCAP_VDIV
2012-05-30 23:56:12 +02:00
Bert Vermeulen
ebb781a69f
hantek-dso: support for SR_HWCAP_FILTER
2012-05-30 23:56:12 +02:00
Bert Vermeulen
a370ef1916
hantek-dso: support for setting all CMD_SET_TRIGGER_SAMPLERATE params
2012-05-30 23:56:12 +02:00
Bert Vermeulen
bc79e906a0
hantek-dso: proper protocol implementation of trigger/samplerate setting
2012-05-30 23:56:12 +02:00
Bert Vermeulen
6e71ef3b6f
hantek-dso: fix channel selection
2012-05-30 23:56:12 +02:00
Bert Vermeulen
ae88b97ba2
hantek-dso: delimit frames with SR_DF_FRAME_* packets
2012-05-30 23:56:12 +02:00
Bert Vermeulen
3b533202c8
sr: initial support for Hantek 2xxx/5200 USB oscilloscopes
2012-05-30 23:56:12 +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
7e41e319d9
sr: fx2lafw: Forgot to add (C) line to fx2lafw.h in recent commit.
2012-05-30 23:31:03 +02:00
Uwe Hermann
0a8c0c324e
sr: fx2lafw: Only check for correct major FW version.
...
Changes in the minor version number are OK, as those should never
contain any incompatible/API changes.
2012-05-30 23:23:14 +02:00
Uwe Hermann
8fdecced96
sr: Consistently use ZEROPLUS spelling.
...
This is the version used throughout their website, let's use it.
2012-05-30 23:23:14 +02:00
Uwe Hermann
921634ec10
sr: Fix typos.
2012-05-30 22:42:47 +02:00
Uwe Hermann
cf94c8167b
sr: fx2lafw: Add (C) line from old saleae driver it's based on.
2012-05-30 22:42:45 +02:00
Uwe Hermann
f60fdf6ebe
sr: fx2lafw: s/MAX_RENUM_DELAY/MAX_RENUM_DELAY_MS/.
2012-05-30 09:30:50 +02:00
Uwe Hermann
e8bd58ffd2
sr: fx2lafw: Fix a firmware upload bug on 32bit systems.
...
The glib GTimeVal data type (and some functions using it) will be faded
out from glib sooner or later, so it's not a good idea to use them anyway.
In this specific case GTimeVal.tv_sec was overflowing, leading a check in
libsigrok to fail, and thus to FX2 firmware upload errors, i.e.
non-working fx2lafw devices.
http://thread.gmane.org/gmane.comp.debugging.sigrok.devel/166
The root cause is that GTimeVal.tv_sec is a 'glong' (8 bytes on 64bit
systems, but only 4 on 32bit systems).
We now use an int64_t (and g_get_monotonic_time() instead of the more
problematics g_get_current_time() which uses a GTimeVal).
This has been verified to fix the issue on a 32bit system.
Other uses of GTimeVal in libsigrok will be removed in a later release.
Also, drop unneeded GTV_TO_MSEC.
2012-05-30 09:30:18 +02:00
Uwe Hermann
9f05304e4e
sr: ARMFLY AX-Pro is supported by fx2lafw (LA only).
2012-05-29 20:25:08 +02:00
Uwe Hermann
37dc0b16a6
fx2lafw: Cosmetics.
2012-05-11 00:22:30 +02:00
Joel Holdsworth
dc68c660d5
fx2lafw: Added a gpif delay debug message
2012-05-10 13:11:07 +01:00
Joel Holdsworth
79dc64985f
fx2lafw: Added support for 20kHz and 25kHz sampling
2012-05-10 13:10:59 +01:00
Joel Holdsworth
897c1a2ee5
fx2lafw: Added support for 100kHz and 50kHz sampling
2012-05-10 13:08:09 +01:00
Uwe Hermann
1e94408ae5
sr: fx2lafw: Get/display FX2 REVID.
2012-05-06 19:54:46 +02:00
Uwe Hermann
1663e4706c
sr: fx2lafw: Braintechnology USB-LPS support.
2012-05-06 17:24:40 +02:00
Uwe Hermann
6352d030df
sr: We support both SIGMA and SIGMA2.
...
Also, a few minor coding-style fixes etc.
2012-05-03 01:41:02 +02:00
Bert Vermeulen
6b73d9a598
fx2lafw: use iManufacturer/iProduct fields to identify our firmware
...
It's more deterministic than the endpoint profile check we did before. Which
was also broken.
2012-04-27 01:28:47 +02:00
Uwe Hermann
6752905e6b
sr: zeroplus: Fix segfault, add debug output.
...
There are various ZEROPLUS models with different probe numbers. For now
hardcode to 16 (for the popular LAP-C(16032)). This will need to be
fixed in a dynamic way later.
This fixes a segfault due to only 16 probe-names being defined, but the
drivers returning 32 as probecount.
Also, add some additional debug output.
2012-04-26 23:18:05 +02:00
Bert Vermeulen
993526f824
sr: don't use deprecated glib functions
...
As of the recent glib 2.32 release, these produce deprecation warnings
at compile time.
2012-04-23 15:31:41 +02:00
Håvard Espeland
42cdeef626
sigma: Fix segfault when no Sigma present.
2012-04-23 13:36:17 +02:00
Håvard Espeland
868501fa46
sigma: Bump copyright notice.
2012-04-22 15:10:46 +02:00
Håvard Espeland
e210c6c090
sr: Remove zlib dependency.
...
No longer needed by Sigma driver.
2012-04-22 14:59:10 +02:00
Håvard Espeland
e3fff420da
sigma: Add support for SIGMA2 (req. new firmware).
2012-04-22 14:59:10 +02:00
Håvard Espeland
3c36c403fa
sigma: Use heap for datafeed packet and header.
2012-04-22 14:59:10 +02:00
Håvard Espeland
805919b042
sigma: Fix bugs in receive_data callback.
...
- Poll data position on Sigma for every iteration.
- Return TRUE when no data ready.
2012-04-22 14:59:10 +02:00
Uwe Hermann
934cde02b8
fx2lafw: supported_samplerates[] should be 0-terminated.
2012-04-19 00:55:29 +02:00
Joel Holdsworth
f488762a17
fx2lafw: Added support for default Cypess FX2 without EEPROM
2012-04-19 00:12:22 +02:00
Joel Holdsworth
824b1a8f5c
sr: Deleted the saleae-logic driver, fx2lafw has superceded it.
2012-04-19 00:12:22 +02:00
Joel Holdsworth
9304d57650
fx2lafw: Added slower sample rates
2012-04-18 19:07:39 +01:00
Uwe Hermann
0aeb0ccd55
sr: sr_err() et. al. don't need trailing \n.
2012-04-10 23:25:57 +02:00
Uwe Hermann
44dfd483db
sr: fx2lafw: Cosmetics.
2012-04-10 22:32:31 +02:00
Joel Holdsworth
13bf7eccbb
fx2lafw: Added command to verify firmware version
2012-04-10 18:27:24 +01:00
Joel Holdsworth
6fbe5e6081
fx2lafw: Safer use of libusb_get_device_list
2012-04-08 17:19:52 +01:00
Uwe Hermann
da68656857
sr: fx2lafw: Consistency fixes.
2012-03-31 11:33:43 +02:00
Uwe Hermann
7ae2f9d56f
sr: fx2lafw: Cosmetics.
2012-03-28 01:19:28 +02:00
Uwe Hermann
b04902b646
sr: fx2lafw: Use SR_PRIV where needed.
2012-03-28 01:19:28 +02:00
Uwe Hermann
30da9658ad
sr: fx2lafw: command.h: Add missing include guards.
2012-03-28 01:19:28 +02:00
Uwe Hermann
f4a9e5c0aa
sr: fx2lafw: Cosmetics.
2012-03-28 01:19:27 +02:00
Joel Holdsworth
94c26b08fd
sr: Build ezusb.c for fx2lafw as well as saleae-logic
2012-03-25 19:42:37 +01:00
Joel Holdsworth
ec888f62fe
salae: Only terminate session after all transfers have been aborted
2012-03-25 19:42:37 +01:00
Joel Holdsworth
3e6292b296
fx2lafw: Made finish_acquisition a static function
2012-03-25 19:42:37 +01:00
Uwe Hermann
590b9f9a91
sr: Fix some samplerate fields.
2012-03-24 22:32:47 +01:00
Joel Holdsworth
cb61e9f7c3
fx2lafw: Only terminate session after all transfers have been aborted
2012-03-24 10:09:28 +00:00
Joel Holdsworth
24125e0520
fx2lafw: Removed a line of redundant code
2012-03-24 10:07:58 +00:00
Joel Holdsworth
6c6781b6a7
fx2lafw: Imported software triggering from fx2lafw
2012-03-21 22:47:25 +00:00
Uwe Hermann
2e7cb0040a
cli: Fix -V/-h output a bit.
...
Options and their defaults should not be documented there, but rather in
the manpage or such.
2012-03-21 23:20:09 +01:00
Uwe Hermann
eb0a373189
sr/cli: s/patternmode/pattern/ in a few places.
2012-03-21 23:20:07 +01:00
Uwe Hermann
ebc3473882
sr: s/err/ret/ for consistency.
...
We use ret, err, error, and others for return codes of functions.
Standardize on 'ret' for consistency reasons for now.
2012-03-21 23:20:06 +01:00
Bert Vermeulen
21b50ee183
Merge remote-tracking branch 'joel/public'
2012-03-16 00:04:51 +01:00
Joel Holdsworth
ecc16ed070
fx2lafw: Upped NUM_SIMUL_TRANSFERS to 32
2012-03-14 22:56:15 +00:00
Uwe Hermann
455b26edba
sr: demo: s/struct databag/struct context/.
2012-03-14 22:44:30 +01:00
Uwe Hermann
ab331b679c
sr: demo: s/mydata/ctx/.
2012-03-14 22:44:29 +01:00
Uwe Hermann
4101f961e8
sr: s/SR_{USB,SERIAL}_INST/SR_INST_{USB,SERIAL}/.
2012-03-14 22:44:29 +01:00
Joel Holdsworth
4502e86921
fx2lafw: Added CWAV USBee SX to the device list
2012-03-12 21:49:34 +00:00
Joel Holdsworth
0ca21631dd
fx2lafw: Corrected a comment
2012-03-12 21:47:45 +00:00
Joel Holdsworth
93a9f3daaf
fx2lafw: Added Saleae Logic (and clones) to the device list
2012-03-12 21:47:44 +00:00
Joel Holdsworth
f8b07fc6c3
fx2lafw: Moved firmware path into fx2lafw_profile
2012-03-12 21:41:28 +00:00
Joel Holdsworth
4679d14db3
fx2lafw: Made fx2lafw profiles const
2012-03-12 21:41:27 +00:00
Joel Holdsworth
6ccfadaf66
fx2lafw: Made string pointers constant
2012-03-12 21:39:02 +00:00
Joel Holdsworth
17b6c75a89
fx2lafw: Added ESLA201A to device list
2012-03-12 21:38:57 +00:00
Joel Holdsworth
017375d17e
fx2lafw: Send start command after bulk transfer have been set up
2012-03-11 20:59:39 +00:00
Matt Ranostay
13d0d2698c
ols: fixed *ctx null dereferences that would SEGFAULT on probing for a OLS or attempting to read from it.
...
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2012-03-08 22:27:33 -08:00
Joel Holdsworth
9031ce63f3
fx2lafw: Corrected check_conf_profile checks
2012-03-07 07:52:05 +00:00
Joel Holdsworth
dba024420f
fx2lafw: Implemented control of sample rates
2012-03-07 07:52:05 +00:00
Joel Holdsworth
f92994fd91
fx2lafw: Ensure default sample rate is set
2012-03-07 07:52:05 +00:00
Joel Holdsworth
d98c4e35ce
fx2lafw: Removed CMD_STOP and renumbered commands
2012-03-07 07:52:05 +00:00
Joel Holdsworth
2e526f4a6a
fx2lafw: Moved num_samples into context struct
2012-03-07 07:52:05 +00:00
Joel Holdsworth
266784d594
saleae-logic: Moved num_samples into context struct
2012-03-07 07:52:05 +00:00
Joel Holdsworth
19ccdf696c
fx2lafw: Removed CMD_SET_SAMPLERATE
2012-03-07 07:52:05 +00:00
Joel Holdsworth
f6582cd7bf
fx2lafw: Implemented initial support for start capture
2012-03-07 07:52:05 +00:00
Joel Holdsworth
74fcfb806d
fx2lafw: Devices now retain the same PID/VID after fw load
2012-03-07 07:51:39 +00:00
Joel Holdsworth
e318664793
fx2lafw: Implemented SR_HWCAP_PROBECONFIG and SR_HWCAP_LIMIT_SAMPLES
2012-03-07 07:51:39 +00:00
Joel Holdsworth
c8f2c9dda4
fx2lafw: Fixed a compiler error, and made cv_data consistent with saleae-logic.c
2012-03-07 07:51:31 +00:00
Uwe Hermann
0abee5076f
sr: Fix some TODOs, improve comments/docs.
2012-03-04 15:10:12 +01:00
Uwe Hermann
3cd3a20b35
sr: More callback param renames.
...
Start/stop acquisition callbacks: Consistently name the 'void *' parameter
cb_data for now. The per-device-instance device pointer is called
'session_dev_id' everywhere for now, but this should be renamed to
something more clear.
2012-03-04 15:10:09 +01:00
Uwe Hermann
1f9813eb6c
sr: Name all callback data 'cb_data'.
2012-03-02 02:25:42 +01:00
Uwe Hermann
31ccebc492
sr: s/sr_session_bus/sr_session_send/.
2012-03-01 23:49:25 +01:00
Uwe Hermann
c09f0b578c
sr/cli/gtk/qt/: s/plugin/driver/.
2012-02-28 23:52:30 +01:00
Bert Vermeulen
2285cf9bc5
sr: code cleanup
2012-02-28 17:47:02 +01:00
Uwe Hermann
d261dbbfcc
sr: Fix/document probe names.
2012-02-28 01:09:29 +01:00
Uwe Hermann
6c39d99a28
sr: fx2lafw: Consistent #include guard naming.
2012-02-27 23:55:06 +01:00
Uwe Hermann
f9a69557d2
sr: fx2lafw: Use gboolean consistenly.
2012-02-27 23:53:44 +01:00
Uwe Hermann
772a0e6153
fx2lafw: Small consistency fixes.
2012-02-27 23:40:38 +01:00
Uwe Hermann
be4b99e897
fx2lafw: Compile fix.
2012-02-27 23:26:05 +01:00
Joel Holdsworth
5da939028d
fx2lafw: Implemented hw_dev_acquisition_stop
2012-02-27 21:58:25 +00:00
Joel Holdsworth
610dbb7091
fx2lafw: Implemented hw_dev_acquisition_start
2012-02-27 21:58:25 +00:00
Joel Holdsworth
7cb621d418
fx2lafw: Basic implementation of hw_dev_config_set with SR_HWCAP_LIMIT_SAMPLES
2012-02-27 21:58:25 +00:00
Joel Holdsworth
62bc70e412
fx2lafw: Added more to hw_cleanup
2012-02-27 21:58:25 +00:00
Joel Holdsworth
f1898235e8
fx2lafw: Implemented hw_dev_close
2012-02-27 21:58:25 +00:00
Joel Holdsworth
43125c6993
fx2lafw: Implemented hw_dev_open
2012-02-27 21:58:25 +00:00
Joel Holdsworth
7f6a3b43ad
sr: Moved GTV_TO_MSEC to sigrok-internal.h
2012-02-27 21:58:25 +00:00
Joel Holdsworth
b1eeb67e92
fx2lafw: Implemented firmware upload
2012-02-27 21:58:25 +00:00
Joel Holdsworth
cdfdd71101
fx2lafw: Renamed fx2lafw_dev to ctx in hw_dev_info_get
2012-02-27 21:58:25 +00:00
Joel Holdsworth
90282c82bc
fx2lafw: Renamed fx2lafw_dev to ctx in hw_init
2012-02-27 21:58:25 +00:00
Joel Holdsworth
cac0bbaafd
fx2lafw: Renamed dev_insts variable in hw_init
2012-02-27 21:58:25 +00:00
Joel Holdsworth
aae2fed675
fx2lafw: Implemented hw_get_status
2012-02-25 11:11:44 +00:00
Joel Holdsworth
8b35f47483
fx2lafw: Exposed capabilities data
2012-02-25 11:11:44 +00:00
Joel Holdsworth
187b358232
fx2lafw: Added probing for fx2lafw devices
2012-02-25 11:11:29 +00:00
Joel Holdsworth
f302a08256
fx2lafw: Added empty hardware module for fx2lafw
2012-02-25 09:11:53 +00:00
Uwe Hermann
04254c3f83
sr: la8: Improve comments and messages a bit.
2012-02-23 22:16:16 +01:00
Uwe Hermann
47671b0f26
sr: la8: Remove some unneeded checks.
2012-02-23 00:27:12 +01:00
Uwe Hermann
ea9cfed7a5
sr: Consistent ctx name for per-dev-inst context.
2012-02-18 18:07:42 +01:00
Uwe Hermann
6b3dfec8de
sr: Fix incorrectly renamed functions.
2012-02-18 12:25:43 +01:00
Uwe Hermann
ee61b340da
sr: Remove unneeded temp. variable use.
2012-02-18 12:16:49 +01:00
Uwe Hermann
a9a245b428
sr: s/config_set/dev_config_set/.
...
This functions is per-device-instance, so use dev_ as prefix as with
the other ones.
2012-02-18 12:11:15 +01:00
Uwe Hermann
69040b7c8f
sr: s/acquisition_*/dev_acquisition_*/.
...
These functions are per-device-instance, so use dev_ as prefix as with
the other ones.
2012-02-18 12:03:49 +01:00
Uwe Hermann
e7eb703fff
sr: opendev/closedev -> dev_open/dev_close.
2012-02-18 11:57:43 +01:00
Uwe Hermann
8105505d06
sr: s/st*_acquisition/acquisition_st*/.
2012-02-18 11:46:51 +01:00
Uwe Hermann
5097b0d091
sr/cli/gtk/qt: s/get_dev_info/dev_info_get/.
2012-02-18 11:41:21 +01:00
Uwe Hermann
a7d05fcb38
sr/cli/gtk/qt: s/configuration/config/.
2012-02-18 00:31:35 +01:00
Uwe Hermann
ffedd0bf5d
sr/cli/gtk: s/capability/hwcap/.
2012-02-18 00:17:18 +01:00
Uwe Hermann
1d9a8a5fe1
sr/cli/gtk: A few more s/instance/inst/.
2012-02-17 23:55:27 +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
d68e2d1a21
sr: Some more s/device_instance/dev_inst/.
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
9fc6aa0a56
sr: la8: remove debug output when no device is found
2012-02-14 13:18:17 +01:00
Bert Vermeulen
341ce41545
sr: don't free driver-specific per-device struct in drivers
...
sr_dev_inst_free() takes care of that.
2012-02-14 12:26:22 +01:00
Bert Vermeulen
da1466d677
sr: rename more functions to sr_thing_action format
...
Also improved the interface to find capabilities in a hardware plugin.
2012-02-14 00:23:51 +01:00
Bert Vermeulen
d3683c42e7
sr: rename all sr_device_instance_* functions to sr_dev_inst_*
2012-02-13 22:45:49 +01:00
Uwe Hermann
57ab7d9f92
sr: cleanup callback: Return int.
2012-02-13 19:49:01 +01:00
Uwe Hermann
3010f21c91
sr: stop_acquisition callback: Return int.
2012-02-13 19:49:00 +01:00
Bert Vermeulen
c73d2ea421
sr: adjust copyright year
2012-02-13 14:31:51 +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
cd853ff0b2
sr: chronovu-la8: Add missing <stdlib.h> #include.
2012-02-11 00:39:25 +01:00
Uwe Hermann
8c4b600393
sr: asix: Change a free() to g_free() as it should be.
...
This also fixes a compiler warning (on FreeBSD at least).
2012-02-11 00:38:48 +01:00
Uwe Hermann
bf3f06c9c2
sr: MinGW/Mac: No libusb_detach_kernel_driver() support.
2012-02-11 00:20:23 +01:00
Uwe Hermann
d38cd6c1f6
sr: saleae: Fix typo.
2012-02-07 23:56:33 +01:00
Uwe Hermann
003f9bebf9
sr: saleae: Support more recent firmwares.
2012-02-07 23:56:33 +01:00
Uwe Hermann
0f8522bf74
Project-wide consistent naming for #include guards.
...
Document the naming scheme in HACKING.
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
e7ee300a12
sr: zeroplus: Drop unused global variable.
2012-02-05 13:37:02 +01:00
Uwe Hermann
3d2efd7d15
sr: Compile fix for Windows/MinGW.
2012-02-05 13:36:03 +01:00
Uwe Hermann
ca070ed9a0
sr: Make more symbols private via static/SR_PRIV.
...
Additional zeroplus fixes:
- Remove unneeded function prototypes from .h files.
- Remove unused variables and/or use standard libusb #defines instead.
- Remove unused GL_* error code #defines.
2012-02-02 21:46:10 +01:00
Uwe Hermann
185ae2c5c9
sr: zeroplus: Remove unused gl_open()/gl_close().
...
Merge the missing function calls into zeroplus.c's init functions.
2012-02-02 21:46:10 +01:00
Uwe Hermann
1a081ca67d
sr: Mark API functions with SR_API/SR_PRIV.
...
Use SR_API to mark public API symbols, and SR_PRIV for private symbols.
Variables and functions marked 'static' are private already and don't
need SR_PRIV. However, functions which are not static (because they need
to be used in other libsigrok-internal files) but are also not meant to
be part of the public libsigrok API, must use SR_PRIV.
This uses the 'visibility' feature of gcc (requires gcc >= 4.0).
Details: http://gcc.gnu.org/wiki/Visibility
2012-02-02 00:03:17 +01:00
Bert Vermeulen
0146970797
sr: remove unused time/duration fields from datafeed packets
2012-02-01 02:59:41 +01:00
Uwe Hermann
69890f7399
sr: Eliminate usb/serial instances from API.
...
The API should be generic and only provide sr_device_instance_new() and
friends, but not sr_usb_device_instance_new(), sr_serial_device_instance_new(),
or others for other device types we may have in the future. The
frontends shouldn't have to know or care about this implementation detail.
This also fixes the problem that parts of sigrok.h contained
'#ifdef HAVE_LIBUSB_1_0' and such, which is even less desirable for the API.
The usb/serial instance specifics are now private, and each driver that
needs them keeps a pointer in its driver-specific context.
2012-01-31 02:04:35 +01:00
Uwe Hermann
c31e9ef49b
sr: zp: Add missing <string.h> #include.
2012-01-31 01:54:08 +01:00
Uwe Hermann
bf43ea2317
sr: zeroplus: Use device-specific context.
...
Make the zeroplus driver use a "struct zp" with per-device-instance
data (such as samplerate, trigger settings, and so on), like the other
drivers do.
Also, add a few more error checks.
2012-01-29 19:19:38 +01:00
Uwe Hermann
ae32d7d759
sr: la8: Fix typo.
2012-01-29 19:19:38 +01:00
Uwe Hermann
73017cf914
sr: zeroplus: Fix a segfault.
2012-01-28 23:29:28 +01:00
Uwe Hermann
a4cfb10f7f
sr: Drop analog left-overs from sigrok.h.
...
For now, there's no analog/scope support in sigrok yet (will be added
later), so remove any such items from the public API (sigrok.h).
Having '#if defined(HAVE_LA_ALSA)' in sigrok.h is a bug anyway, the API
must not have anything device-dependent in general, and sigrok.h
specifically must not have any #ifdefs for specific hardware.
2012-01-28 19:23:09 +01:00
Anatoly Sokolov
a141db8c4a
add SR_HWCAP_DEMO_DEVICE capability
2012-01-21 15:56:29 +01:00
Renato Caldas
f020a99773
link-mso19: Fixed led toggling (the bit masking was not being proprly done).
2012-01-19 11:12:01 +00:00
Renato Caldas
e084a8042e
link-mso19: Prevent double free errors when freeing sdi->priv.
2012-01-19 11:12:01 +00:00
Renato Caldas
357285a944
link-mso19: Add debug messages.
2012-01-19 11:12:01 +00:00
Renato Caldas
a29360733d
link-mso19: Properly initialize the protocol trigger block
2012-01-19 11:12:01 +00:00
Renato Caldas
a84671913e
link-mso19: Added new register definitions and renamed variables to reflect new findings.
2012-01-19 11:12:01 +00:00
Renato Caldas
80aa5f23d1
link-mso19: Added struct definitions for the pattern generator config and the protocol trigger config.
2012-01-19 11:12:01 +00:00
Uwe Hermann
42eb54fb62
mso-19: Fix whitespace.
2012-01-06 01:05:55 +01:00
Renato Caldas
d88b939324
link-mso19: fixed segmentation fault.
2012-01-06 01:01:57 +01:00
Renato Caldas
e42ef08dba
link-mso19: Updated to the current structs (fixed compilation).
2012-01-06 01:01:54 +01:00
Uwe Hermann
db8ae7b941
sr/srd: Remove/fix non-applicable autotools stuff.
2011-12-30 11:14:24 +01:00
Uwe Hermann
c37d2b1ba1
probe names: Fix cosmetics, add docs, fix off-by-one.
2011-12-29 19:50:14 +01:00
Kristoffer Sjöberg
464d12c72a
Move the probe naming to the creator of the device, and let each driver name its own probes.
2011-12-29 17:04:31 +01:00
Uwe Hermann
b7f09cf86d
libsigrok: Fix #includes.
...
In the lib, we should only #include "sigrok.h" or "sigrok-internal.h",
but not the (possibly installed and thus different/older versions) via
<sigrok.h> or <sigrok-internal.h>.
Frontends should of course use <sigrok.h> and <sigrok-internal.h>.
2011-12-28 23:07:08 +01:00
Uwe Hermann
a0ecd83bc6
Make more variables/functions static and non-global.
...
The 'GSList *devices' from device.c was actually really global (i.e.,
listed in sigrok.h), which is now fixed.
2011-12-28 22:55:21 +01:00
Uwe Hermann
25a605d187
libsigrok: Quickfix for a segfault in ChronoVu LA8.
2011-12-04 18:33:29 +01:00
Uwe Hermann
cb93f8a927
Other method to avoid "unused var" compiler warnings.
...
The '(void)varname' method is nicer than 'varname = varname' and also
prevents warnings when compiling sigrok with clang instead of gcc.
2011-11-24 22:57:48 +01:00
Uwe Hermann
cc8a7d250c
Add missing #includes to avoid clang warnings.
2011-11-24 22:42:02 +01:00
Bert Vermeulen
e7bad06355
la8: device not found during init() scan is not an error
...
fix some hardware plugin semantics
2011-11-20 03:19:06 +01:00
Gareth McMullin
4d436e71ba
Changed SR_T_NULL to SR_T_BOOL and adjusted RLE option.
2011-11-19 13:41:41 +13:00
Uwe Hermann
6bb5c5fadf
Consistently use __func__ instead of __FUNCTION__.
...
The __func__ form is standardized and more portable.
2011-11-17 23:47:45 +01:00