demo: Implement basic 100Hz analog sine-wave generator
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>
Mon, 3 Dec 2012 19:20:59 +0000 (13:20 -0600)
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>
Tue, 8 Jan 2013 06:42:06 +0000 (00:42 -0600)
commit243e8db35c0a19e91126ad1ceb8aae9431988f2a
tree0c10f01cd04142bae59aadd80be2fb08b417eb9c
parentaa960586466c8fecfe4eea7af2b07ff9a754039f
demo: Implement basic 100Hz analog sine-wave generator

Implement a 2V peak-to-peak, 100Hz sine wave.
At the moment, this only works correctly with one probe.

To test, use:
sigrok-cli --driver=demo -d pattern=sine100 --samples 2001 -p 1 -O analog -l 5

The last sample should be exactly 0.000000 V.
If we had used sinf() instead of sin(), the last sample would be 0.349691 uV.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
hardware/demo/demo.c