]> sigrok.org Git - libsigrokdecode.git/blob - decoders/ir_rc5/lists.py
Add initial RC-5 IR protocol decoder.
[libsigrokdecode.git] / decoders / ir_rc5 / lists.py
1 ##
2 ## This file is part of the libsigrokdecode project.
3 ##
4 ## Copyright (C) 2014 Uwe Hermann <uwe@hermann-uwe.de>
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, write to the Free Software
18 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
19 ##
20
21 # Systems/addresses (0..31). Items that are not listed are reserved/unknown.
22 system = {
23     0: ['TV receiver 1', 'TV1'],
24     1: ['TV receiver 2', 'TV2'],
25     2: ['Teletext', 'Txt'],
26     3: ['Extension to TV1 and TV2', 'Ext TV1/TV2'],
27     4: ['LaserVision player', 'LV'],
28     5: ['Video cassette recorder 1', 'VCR1'],
29     6: ['Video cassette recorder 2', 'VCR2'],
30     7: ['Experimental', 'Exp'],
31     8: ['Satellite TV receiver 1', 'Sat1'],
32     9: ['Extension to VCR1 and VCR2', 'Ext VCR1/VCR2'],
33     10: ['Satellite TV receiver 2', 'Sat2'],
34     12: ['Compact disc video player', 'CD-Video'],
35     13: ['Camcorder', 'Cam'],
36     14: ['Photo on compact disc player', 'CD-Photo'],
37     16: ['Audio preamplifier 1', 'Preamp1'],
38     17: ['Radio tuner', 'Tuner'],
39     18: ['Analog cassette recoder 1', 'Rec1'],
40     19: ['Audio preamplifier 2', 'Preamp2'],
41     20: ['Compact disc player', 'CD'],
42     21: ['Audio stack or record player', 'Combi'],
43     22: ['Audio satellite', 'Sat'],
44     23: ['Analog cassette recoder 2', 'Rec2'],
45     26: ['Compact disc recorder', 'CD-R'],
46     29: ['Lighting 1', 'Light1'],
47     30: ['Lighting 2', 'Light2'],
48     31: ['Telephone', 'Phone'],
49 }
50
51 digits = {
52     0: ['0', '0'],
53     1: ['1', '1'],
54     2: ['2', '2'],
55     3: ['3', '3'],
56     4: ['4', '4'],
57     5: ['5', '5'],
58     6: ['6', '6'],
59     7: ['7', '7'],
60     8: ['8', '8'],
61     9: ['9', '9'],
62 }
63
64 # Commands (0..63 for RC-5, and 0..127 for Extended RC-5).
65 # Items that are not listed are reserved/unknown.
66 command = {
67     'TV': dict(list(digits.items()) + list({
68         10: ['-/--', '-/--'],
69         11: ['Channel/program', 'Ch/P'],
70         12: ['Standby', 'StBy'],
71         13: ['Mute', 'M'],
72         14: ['Personal preferences', 'PP'],
73         14: ['Display', 'Disp'],
74         16: ['Volume up', 'Vol+'],
75         17: ['Volume down', 'Vol-'],
76         18: ['Brightness up', 'Br+'],
77         19: ['Brightness down', 'Br-'],
78         20: ['Saturation up', 'S+'],
79         21: ['Saturation down', 'S-'],
80         32: ['Program up', 'P+'],
81         33: ['Program down', 'P-'],
82     }.items())),
83     'VCR': dict(list(digits.items()) + list({
84         10: ['-/--', '-/--'],
85         12: ['Standby', 'StBy'],
86         32: ['Program up', 'P+'],
87         33: ['Program down', 'P-'],
88         50: ['Fast rewind', 'FRW'],
89         52: ['Fast forward', 'FFW'],
90         53: ['Play', 'Pl'],
91         54: ['Stop', 'St'],
92         55: ['Recording', 'Rec'],
93     }.items())),
94 }
95