chiark / gitweb /
7aadecb74abfbf2552ec0802614b08fbf13ea110
[chiark-tcl.git] / wiringpi / wiringpi.tct
1 # wiringpi binding for Tcl
2 # Copyright 2006-2012 Ian Jackson
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 2 of the
7 # License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this library; if not, see <http://www.gnu.org/licenses/>.
16
17
18 Table *wiringpitoplevel TopLevel_Command
19         gpio
20                 dispatch(WiringPiTcl/_SubCommand, "wiringpi subcommand")
21
22 Table wiringpitcl WiringPiTcl_SubCommand
23         setup
24                 ...     obj
25         boardRev
26                 =>      int
27         boardId
28                 =>      obj
29         mode
30                 pin     int
31                 mode    enum(WiringPiTcl_Mode/, "wiringpi pin mode")
32         read
33                 pin     int
34                 =>      int
35         write
36                 pin     int
37                 val     int
38         aread
39                 pin     int
40                 =>      int
41         awrite
42                 pin     int
43                 val     int
44         pwm
45                 pin     int
46                 val     int
47         clock
48                 pin     int
49                 freq    int
50         drive
51                 group   int
52                 value   int
53         pwm-bal
54                 pin     int
55         pwm-ms
56                 pin     int
57         pwmTone
58                 pin     int
59                 val     int
60         pwmr
61                 pin     int
62                 val     int
63         pwmc
64                 pin     int
65                 clk     int
66
67 Table wiringpitcl_mode WiringPiTcl_Mode
68         in
69         out
70         pwm
71         pwmTone
72         clock
73         up
74         down
75         tri
76         off
77         alt0
78         alt1
79         alt2
80         alt3
81         alt4
82         alt5