Hi Mathias,

> I have created a plain old patch between my final version and your
> version that I started with, please find that below. I even tested it
> actually applies against your version - lessons learned I guess. ;-)

Thanks, this version applied fine.

Here is what I've now done:

- Applied your patch to my rigol_ds_unified branch.

- Rebased the result against current libsigrok master, incorporating
  some minor changes made to the rigol-ds1xx2 driver since we started.

- Added a new USBTMC device instance type and changed the code to use
  this instead of the serial type. This was necessary because libsigrok
  now uses libserialport, and the previous hack of treating /dev/usbtmcX
  as a serial port does not work any more (the lib tries to make termios
  calls on the device).

- Tested on a DS1102D. Everything that worked before with the standalone
  driver & previous unified version seems to be working OK with this
  version.

- Fixed a bug that was causing the digital probe group to be duplicated.

- Pushed the result to a new 'rigol_ds_unified_v2' branch on my github.

Bert, Uwe: I think we should now go ahead and merge this into libsigrok
master. There's a lot of further work to be done, but I don't see any
reason for what's here so far not to be merged first. It adds support
for a whole family of new devices, and works for the existing ones.

The only change outside the driver is addition of sr_usbtmc_dev_inst
which (a) doesn't affect anything else, and (b) I see as a temporary
solution until we can use librevisa for the job.

There are two compile warnings generated:

protocol.c: In function 'rigol_ds_receive':
protocol.c:457:10: warning: ignoring return value of 'read', declared
    with attribute warn_unused_result [-Wunused-result]
protocol.c:513:10: warning: ignoring return value of 'read', declared
    with attribute warn_unused_result [-Wunused-result]

These are showing up since the USBTMC commit because the code is now
calling read() directly rather than serial_read(). The bugs were already
there, though. And who knows how many more we might find in drivers if
we declared serial_read/serial_write with warn_unused_result.

All serial-ish read/write call sites are going to have to be reviewed
soon anyway, with the switch to direct use of libserialport and/or the
sr_channel API discussed on IRC today.


Martin

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to