]> sigrok.org Git - libsigrokdecode.git/blob - decoders/amulet_ascii/lists.py
Initial Amulet LCD ASCII PD
[libsigrokdecode.git] / decoders / amulet_ascii / lists.py
1 ##
2 ## This file is part of the libsigrokdecode project.
3 ##
4 ## Copyright (C) 2019 Vesa-Pekka Palmu <vpalmu@depili.fi>
5 ##
6 ## This program is free software; you can redistribute it and/or modify
7 ## it under the terms of the GNU General Public License as published by
8 ## the Free Software Foundation; either version 2 of the License, or
9 ## (at your option) any later version.
10 ##
11 ## This program is distributed in the hope that it will be useful,
12 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ## GNU General Public License for more details.
15 ##
16 ## You should have received a copy of the GNU General Public License
17 ## along with this program; if not, see <http://www.gnu.org/licenses/>.
18 ##
19
20 from collections import OrderedDict
21
22 # OrderedDict which maps command IDs to their names and descriptions.
23 cmds = OrderedDict([
24     (0xA0, ('PAGE', 'Jump to page')),
25     (0xD0, ('GBV', 'Get byte variable')),
26     (0xD1, ('GWV', 'Get word variable')),
27     (0xD2, ('GSV', 'Get string variable')),
28     (0xD3, ('GLV', 'Get label variable')),
29     (0xD4, ('GRPC', 'Get RPC buffer')),
30     (0xD5, ('SBV', 'Set byte variable')),
31     (0xD6, ('SWV', 'Set word variable')),
32     (0xD7, ('SSV', 'Set string variable')),
33     (0xD8, ('RPC', 'Invoke RPC')),
34     (0xD9, ('LINE', 'Draw line')),
35     (0xDA, ('RECT', 'Draw rectangle')),
36     (0xDB, ('FRECT', 'Draw filled rectangle')),
37     (0xDC, ('PIXEL', 'Draw pixel')),
38     (0xDD, ('GBVA', 'Get byte variable array')),
39     (0xDE, ('GWVA', 'Get word variable array')),
40     (0xDF, ('SBVA', 'Set byte variable array')),
41     (0xE0, ('GBVR', 'Get byte variable reply')),
42     (0xE1, ('GWVR', 'Get word variable reply')),
43     (0xE2, ('GSVR', 'Get string variable reply')),
44     (0xE3, ('GLVR', 'Get label variable reply')),
45     (0xE4, ('GRPCR', 'Get RPC buffer reply')),
46     (0xE5, ('SBVR', 'Set byte variable reply')),
47     (0xE6, ('SWVR', 'Set word variable reply')),
48     (0xE7, ('SSVR', 'Set string variable reply')),
49     (0xE8, ('RPCR', 'Invoke RPC reply')),
50     (0xE9, ('LINER', 'Draw line reply')),
51     (0xEA, ('RECTR', 'Draw rectangle')),
52     (0xEB, ('FRECTR', 'Draw filled rectangle reply')),
53     (0xEC, ('PIXELR', 'Draw pixel reply')),
54     (0xED, ('GBVAR', 'Get byte variable array reply')),
55     (0xEE, ('GWVAR', 'Get word variable array reply')),
56     (0xEF, ('SBVAR', 'Set byte variable array reply')),
57     (0xF0, ('ACK', 'Acknowledgment')),
58     (0xF1, ('NACK', 'Negative acknowledgment')),
59     (0xF2, ('SWVA', 'Set word variable array')),
60     (0xF3, ('SWVAR', 'Set word variable array reply')),
61     (0xF4, ('GCV', 'Get color variable')),
62     (0xF5, ('GCVR', 'Get color variable reply')),
63     (0xF6, ('SCV', 'Set color variable')),
64     (0xF7, ('SCVR', 'Set color variable reply')),
65 ])
66
67 cmds_with_high_bytes = [
68     0xA0, # PAGE - Page change
69     0xD7, # SVV - Set string variable
70     0xE7, # SVVR - Set string variable reply
71     0xE2, # GSVR - Get string variable reply
72     0xE3, # GLVR - Get label variable reply
73 ]