Commit Graph

3759 Commits

Author SHA1 Message Date
Uwe Hermann 02440dd88c demo: Cosmetics, constify. 2011-01-15 13:06:04 +01:00
Bert Vermeulen e15f48c268 cleaned up demo driver
removed unused samplerate
added patternmode (random and incremental)
2011-01-15 05:12:41 +01:00
Bert Vermeulen 925dbf9f97 add new HWCAP patternmode 2011-01-15 05:11:40 +01:00
Uwe Hermann 63570167d6 Cosmetics for the -D output. 2011-01-15 03:44:19 +01:00
Uwe Hermann 17e1afcb81 Whitespace and consistency fixes.
Also, drop a <poll.h> #include. It's unused anyway, and breaks the build
on MinGW/Windows as there is no poll.h there.
2011-01-13 23:52:25 +01:00
Bert Vermeulen 9ab95e5408 make output modules a bit more crashproof
the event handler in output modules is now optional.
2011-01-13 07:55:35 +01:00
Bert Vermeulen 2507648e63 use us instead of µs in periods (VCD can't handle it) 2011-01-13 07:55:35 +01:00
Uwe Hermann 2119ab0364 MinGW/Windows: Serial port portability fixes.
Add serial_read()/serial_write() which have different implementations on
MinGW/Windows.

Add some more error code handling and documentation.
2011-01-12 01:09:31 +01:00
Olivier Fauchon ba3d481bb7 add ontinuous mode for demo driver 2011-01-12 00:25:15 +01:00
Bert Vermeulen 13a1291350 fully implement input_binary module 2011-01-11 23:59:33 +01:00
Bert Vermeulen 78ed642035 code cleanup 2011-01-11 23:59:33 +01:00
Uwe Hermann a61b0e6a35 configure: Add --enable-demo option. 2011-01-11 22:17:33 +01:00
Uwe Hermann 1fdb75e145 MinGW: Quickfix to make serial.c/ols.c compile.
Note: It does NOT actually work, yet, it only compiles!
2011-01-11 01:27:16 +01:00
Bert Vermeulen 74b9b43836 cli: support --continuous option for continuous sampling 2011-01-11 00:38:15 +01:00
Uwe Hermann 8a839354c1 Cosmetics, whitespace, consistency fixes. 2011-01-10 23:20:37 +01:00
Uwe Hermann fc96e6f8c8 demo: Add missing copyright line. 2011-01-10 22:49:38 +01:00
Daniel Ribeiro 2566bd4884 Merge branch 'master' of git://sigrok.git.sourceforge.net/gitroot/sigrok/sigrok 2011-01-10 15:58:05 -02:00
Daniel Ribeiro 01cf881494 Add incomplete mso-19 plugin
* Both Analog and Logic capture works.
* Analog values are raw ADC, still useless.
* Triggers aren't implemented.
* Pattern Generator not implemented.
* Everything is broken. :)
2011-01-10 15:15:51 -02:00
Daniel Ribeiro 3677f3ec3f Add HZ_TO_NS macro 2011-01-10 15:14:26 -02:00
Daniel Ribeiro c2616fb9fa update plugins and cli to use new DF_HEADER 2011-01-10 15:12:38 -02:00
Daniel Ribeiro 921e753f7e Support for analog probes
Add a field to the probe struct to store the probe type.
Change DF_HEADER to report the quantity of each type of probe.
2011-01-10 15:08:43 -02:00
Daniel Ribeiro ac4a2ea45a serial.c: fix parity != none
The flag write was wrong
2011-01-10 15:05:14 -02:00
Bert Vermeulen 882e2075bb finish split of sigrok.h 2011-01-10 13:47:24 +01:00
Bert Vermeulen 10509bc2e4 split off prototypes into their own header file 2011-01-10 13:44:11 +01:00
Bert Vermeulen 655756e01d cli: new option to list output modules 2011-01-10 12:39:53 +01:00
Daniel Ribeiro 43275b4712 Merge branch 'master' of git://sigrok.git.sourceforge.net/gitroot/sigrok/sigrok 2011-01-10 02:36:50 -02:00
Daniel Ribeiro 9d4bde70fc Finish serial_set_params implementation
Adds the most common baud rates and support bits, parity, stopbits
and flocontrol settings.
2011-01-10 05:35:05 +01:00
Daniel Ribeiro e006af1116 Merge branch 'master' of git://sigrok.git.sourceforge.net/gitroot/sigrok/sigrok 2011-01-10 02:28:59 -02:00
Bert Vermeulen 9b36e360f3 output_analog: allow samples per line arg (default analog10) 2011-01-10 05:27:22 +01:00
Daniel Ribeiro 1ff7712c93 Finish serial_set_params implementation
Adds the most common baud rates and support bits, parity, stopbits
and flocontrol settings.
2011-01-10 02:21:07 -02:00
Bert Vermeulen 1437e8934b add DF_ANALOG, and an analog output module
Samples in DF_ANALOG packets are fixed in length to sizeof(double).
2011-01-10 05:13:46 +01:00
Bert Vermeulen f0411b1d17 output modules now register the DF type they can use 2011-01-09 23:23:56 +01:00
Daniel Ribeiro 8d67255061 Add a per-instance pointer storage for hardware plugins.
We need this to properly support more than one device connected
at the same time.
2011-01-09 03:50:45 -02:00
Daniel Ribeiro dfa4b731da Add ARRAY_AND_SIZE macro
Just a handy macro
2011-01-09 03:48:39 -02:00
Bert Vermeulen 4c046c6bcc change all DF_LOGIC* to a single DF_LOGIC type
The datafeed packet has a new field 'unitsize' to denote the number of
bytes per sample in the payload.
2011-01-09 06:32:38 +01:00
Uwe Hermann af812219f6 Only build specific source files if needed. 2011-01-08 20:58:44 +01:00
Uwe Hermann 7c17ac6cc4 Only build hardware drivers if they're enabled. 2011-01-08 20:58:43 +01:00
Uwe Hermann 5096c6a6c1 demo driver: Small cleanups, error handling. 2011-01-08 20:58:42 +01:00
Uwe Hermann 85b5af0687 Make the demo driver work.
When initialized, the driver starts a thread that generates signal data.
This data is written to a pipe (write file descriptor).
The other end of the pipe (read file descriptor), is connected to the
main polling code, like any other driver.

Note: This patch adds a new dependency on libgthread.

At the moment, you can list the driver's device:

$ ./cli/sigrok-cli -D
The following devices were found:
ID  Device
0   Sigrok project Demo Driver v1.0 with 8 probes

And use it for random signal generation:

$ /opt/sigrok/bin/sigrok-cli -d 0 --samples 50 -f bits -p 1-8
sigrok 0.1pre2
Acquisition with 8/8 probes at 0 Hz
1:10111100 11010110 00001011 00011110 00111010 11110100 10
2:11010110 00111111 01001010 11111101 11010011 00010010 11
3:11000101 01000001 10100011 10100100 10110000 11110011 00
4:00100111 11110100 10011101 01100111 00100101 01001110 10
5:00011100 00101100 10111000 11001101 01011101 01011011 01
6:10110101 10111110 10010110 10111000 11011010 10000100 11
7:11111111 01001111 11110110 11010010 10000101 01001111 00
8:01000101 01111110 01010111 00000111 00010010 00000101 11

The next step is to make demo driver customisable (per-probe signal clock,
reference sample signals : serial, I2C, CAN...).

Thanks Olivier Fauchon <olivier@aixmarseille.com> for the patch.
2011-01-08 18:29:10 +01:00
Bert Vermeulen d4ae8eaa7c fix buffer size, various error checks 2011-01-08 15:50:14 +01:00
Bert Vermeulen 2a3f9541a4 add sigrok_period_string(), MAX_NUM_PROBES 2011-01-08 15:50:13 +01:00
Uwe Hermann 5e2ddeb098 Fix two more compiler warnings noticed on amd64. 2011-01-08 03:51:31 +01:00
Uwe Hermann 340f6e7aea Fix out-of-tree build.
Use libtool "noinst" local helper libs and use one Makefile.am per
subdir, which is the usual/preferred method. These helper libraries are
purely local and will not be installed.

This also fixes out-of-tree builds of sigrok, i.e. building in a
directory other than the sigrok source directory, e.g.

 $ cd /home/user
 $ git clone ...sigrok
 $ cd sigrok
 $ ./autogen.sh
 $ mkdir /tmp/foo
 $ cd /tmp/foo
 $ /home/user/sigrok/configure
 $ make
 $ make install

This will place all build results (.o files, .la files, etc) in the
local build directory (/tmp/foo) instead of the source directory
(/home/user/sigrok in this example). The installation directory is
selected via the --prefix configure option (/usr/local per default).
2011-01-08 03:32:25 +01:00
Uwe Hermann 757b8c628a Cosmetics, whitespace, simplifications.
Reduce code nesting a bit, constify some strings.
2011-01-08 01:49:47 +01:00
Uwe Hermann 6239c175c1 Initial, unfinished demo/simulation hardware driver. 2011-01-06 19:16:47 +01:00
Bert Vermeulen 339729131d proper fix for output_text corner cases
limit probe names to 32 chars
2010-12-29 01:22:58 +01:00
Bert Vermeulen e6ac9ac808 consistent debug msgs, rename sump to ols 2010-12-29 00:02:30 +01:00
Bert Vermeulen ee5f5e81ad fix corner cases/memory management (cli->text out) 2010-12-28 21:59:07 +01:00
Bert Vermeulen a5e18535ad don't turn on/off libusb debugging 2010-12-27 23:49:46 +01:00
Bert Vermeulen f0551a6543 oops, fix serial_flush() 2010-08-12 06:04:44 +02:00