--- a/doc/api.txt Tue Jan 06 10:56:28 2009 +0100
+++ b/doc/api.txt Tue Jan 06 15:07:03 2009 +0100
@@ -5,22 +5,20 @@
* set/clear single outputs (set_bit?)
- # $state: "on", "off", 0, 1
# $output: 0..63
+ # $state: true / false (in the sense of perl)
- set($state => $output, ...)
- set($state => [$output, ...])
+ set($output => $state);
+ set(@outputs => $state);
Examples
# setting single outputs
- set(on => 0, off => 1, on => 2, off => 3, ....., off => 7);
- set(on => [0, 2], off => [1, 3 .. 7]);
- # alternate form of the above
- set(1 => 0, 0 => 1, 1 => 2, 0 => 3, ...., 0 => 7);
- set(1 => [0, 2], on => [1, 3 ... 7]);
-
+ set($output => 0);
+ set($output1, $output2 => 0);
+ set($output1, $output2 => 0);
+ set(1..30, 1);
# explicitly switch on
on(0, 2);
@@ -30,7 +28,7 @@
* read a single output (get_bit?)
$result = get($output);
- @result = get($output, ...);
+ @result = get(@outputs);
Examples
@@ -65,6 +63,7 @@
$outputs[0] = 1;
@outputs = (1, 0, 1, 0, 0, 0);
+ @outputs[1..30] = ....
my $block0;
tie $block => "Quancom" $ip_address, $block, $len;