1. 19 Aug, 2017 2 commits
    • Gerhard Sittig's avatar
      lsr/es51919: support channel selection (enable/disable P1/P2) · 503519b7
      Gerhard Sittig authored
      Upon reception of serial data from the ES51919 LCR chipset, the data for
      channels P1 and P2 was extracted from the packet, and unconditionally got
      sent to the sigrok session.
      Do check the channels' enabled state before submission. This fixes for
      serial-lcr what recently got reported for a Brymen DMM. Tested with
        $ sigrok-cli -d peaktech-2170:conn=/dev/ttyUSB0 --channels P2
      and other --channels specifications.
    • Gerhard Sittig's avatar
      lcr/es51919: clean but don't free dev context in cleanup callback · 12788e7e
      Gerhard Sittig authored
      The es51919_serial_clean() routine is called by std_dev_clear_with_callback().
      Common code unconditionally frees the 'priv' part. The cleanup callback only
      shall release descending resources which are local to the callee and opaque
      to the caller.
      This fixes a double free error. Tested with PeakTech 2170.
        $ sigrok-cli -d peaktech-2170:conn=/dev/ttyUSB0 --show
  2. 21 Jul, 2017 2 commits
  3. 19 Jul, 2017 2 commits
    • Uwe Hermann's avatar
      drivers: Provide proper drvopts. · 05199c0a
      Uwe Hermann authored
      The device class config keys should be in drvopts (not devopts).
    • Uwe Hermann's avatar
      drivers: Add and use STD_CONFIG_LIST(). · e66d1892
      Uwe Hermann authored
      This ensures consistent handling of the SR_CONF_SCAN_OPTIONS and
      SR_CONF_DEVICE_OPTIONS (with sdi NULL or non-NULL) config keys
      and also reduces copy-pasted boilerplate in the drivers a bit.
      This function does not handle channel-group specific items, that's
      very driver-specific and thus left to the individual drivers.
      Also move some generic checks and error messages from the drivers into
      the sr_config_list() wrapper.
  4. 07 Jul, 2017 2 commits
  5. 10 Mar, 2017 2 commits
  6. 02 Nov, 2016 1 commit
    • Gerhard Sittig's avatar
      es51919 lcr: unbreak channel setup after successful detection · 6b7e644e
      Gerhard Sittig authored
      Commit 6bcb3ee8 introduced initial support for the Cyrustek ES51919
      chipset. Its setup_channels() routine used to init a variable to assume
      failure, then a loop added channels and changed the value to success.
      Commit 5e23fcab changed channel setup to never fail, but kept the
      initialization with an error code. Which prevented the operation of
      successfully detected LCR meters.
      Remove the no longer needed variable, instead always return success from
      an operation which cannot fail.
      Fixes: 5e23fcab "Simplify channel creation."
      Signed-off-by: default avatarGerhard Sittig <gerhard.sittig@gmx.net>
  7. 29 Aug, 2016 2 commits
  8. 28 Aug, 2016 1 commit
  9. 23 Aug, 2016 1 commit
  10. 16 Jun, 2016 1 commit
  11. 31 May, 2016 4 commits
    • Lars-Peter Clausen's avatar
      Remove unnecessary std_serial_dev_acquisition_stop() wrappers · 4b1a9d5d
      Lars-Peter Clausen authored
      Now that std_serial_dev_acquisition_stop() has the same signature as
      the sr_dev_driver dev_acquisition_stop() callback it is possible to remove
      the wrapper functions and use std_serial_dev_acquisition_stop() directly
      has the callback function.
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
    • Lars-Peter Clausen's avatar
      std_serial_dev_acquisition_stop(): Remove dev_close_fn parameter · 1b38775b
      Lars-Peter Clausen authored
      All callers of std_serial_dev_acquisition_stop() currently pass the same
      callback for the dev_close_fn parameter as the dev_close callback of their
      sr_dev_driver struct. Remove the dev_close_fn parameter and invoke the
      drivers dev_close() callback directly. This simplifies the API and ensures
      consistent behaviour between different drivers.
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
    • Lars-Peter Clausen's avatar
      std_serial_dev_acquisition_stop(): Remove serial parameter · 15f96409
      Lars-Peter Clausen authored
      All callers of std_serial_dev_acquisition_stop() currently pass sdi->conn
      for the serial parameter. And the other std_serial helper functions already
      require that the conn field of the sr_driver_inst passed to the functions
      points to the sr_serial_dev_inst associated with the device.
      Modify std_serial_dev_acquisition_stop() to follow the same pattern and
      remove the serial parameter. This simplifies the API and ensures consistent
      behaviour between different drivers.
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
    • Lars-Peter Clausen's avatar
      Use driver name as the log prefix in standard functions · bee2b016
      Lars-Peter Clausen authored
      Some of the standard helper functions take a log prefix parameter that is
      used when printing messages. This log prefix is almost always identical to
      the name field in the driver's sr_dev_driver struct. The only exception are
      drivers which register multiple sr_dev_driver structs.
      Instead of passing the log prefix as a parameter simply use the driver's
      name. This simplifies the API, gives consistent behaviour between different
      drivers and also makes it easier to identify where the message originates
      when a driver registers sr_dev_driver structs.
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
  12. 16 May, 2016 2 commits
  13. 29 Apr, 2016 3 commits
  14. 20 Oct, 2015 1 commit
  15. 13 Sep, 2015 1 commit
  16. 30 Aug, 2015 2 commits
  17. 16 Aug, 2015 1 commit
    • Daniel Elstner's avatar
      Build: Set local include directories in Makefile.am · c1aae900
      Daniel Elstner authored
      Move the include flags for files in the source tree from
      configure.ac to Makefile.am where they belong.  Also use
      AM_CPPFLAGS instead of CFLAGS/CXXFLAGS to make sure the
      files in the build/source tree are always picked up first.
      Also, remove the include/libsigrok sub-directory from the
      search path, thereby making the <libsigrok/> prefix mandatory
      when building libsigrok itself.  This matches the convention
      already imposed on users of the library.
  18. 06 May, 2015 1 commit
  19. 21 Mar, 2015 1 commit
  20. 19 Mar, 2015 1 commit
    • Martin Ling's avatar
      Simplify channel creation. · 5e23fcab
      Martin Ling authored
      We always follow sr_channel_new() with a call to add the channel to the sdi.
      Tidy up a bit by adding this functionality to sr_channel_new() instead.
  21. 06 Jan, 2015 3 commits
    • Janne Huttunen's avatar
      Limit frames instead of samples. · 787ec9db
      Janne Huttunen authored
      Since every individual measurement is represented by a single frame
      and a "sample" isn't all that meaningful concept in this context,
      it makes more sense to define possible limit in number of frames.
      Make the es51919 driver to support setting a frame limit instead of
      a sample limit.
    • Janne Huttunen's avatar
      Use frames to group a single measurement result together. · a6413fa5
      Janne Huttunen authored
      In most, but not all, modes the ES51919 reports two separate
      analog values for each measurement sample. These values are
      mapped to two separate channels and sent in two separate
      A client program needs a way to determine which results are
      parts of the same measurement and also know when a complete
      measurement is received so it can process the sample. Use
      the frame begin and end packets to separate groups that each
      represent a single complete measurement.
    • Janne Huttunen's avatar
      Fix the channel indexes of the es51919 driver. · bb983c66
      Janne Huttunen authored
      Set the channel indexes to unique values instead of setting
      them all zero.
  22. 22 Nov, 2014 1 commit
    • Uwe Hermann's avatar
      Use g_malloc0() consistently, simplify error handling. · 91219afc
      Uwe Hermann authored
      Use g_malloc0() for small allocations and assume they always
      succeed. Simplify error handling in a few places accordingly.
      Don't always sanity-check parameters for non-public (SR_PRIV)
      functions, we require the developers to invoke them correctly.
      This allows further error handling simplifications.
  23. 21 Nov, 2014 3 commits