ArduinoLibs
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
RC5.h
1 /*
2  * Copyright (C) 2012 Southern Storm Software, Pty Ltd.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included
12  * in all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20  * DEALINGS IN THE SOFTWARE.
21  */
22 
23 #ifndef RC5_h
24 #define RC5_h
25 
26 // http://en.wikipedia.org/wiki/RC-5#System_Number_Allocations
27 #define RC5_SYS_TV 0 // TV receiver 1
28 #define RC5_SYS_TV2 1 // TV receiver 2
29 #define RC5_SYS_TXT 2 // Teletext
30 #define RC5_SYS_TV_EXT 3 // Extension to TV 1 & 2
31 #define RC5_SYS_LV 4 // Laservision player
32 #define RC5_SYS_VCR 5 // VCR 1
33 #define RC5_SYS_VCR2 6 // VCR 2
34 #define RC5_SYS_SAT 8 // Satellite receiver 1
35 #define RC5_SYS_VCR_EXT 9 // Extension to VCR 1 & 2
36 #define RC5_SYS_SAT2 10 // Satellite receiver 2
37 #define RC5_SYS_CD_VIDEO 12 // CD video player
38 #define RC5_SYS_CD_PHOTO 14 // CD photo player
39 #define RC5_SYS_PREAMP 16 // Audio preamplifier 1
40 #define RC5_SYS_RADIO 17 // Radio tuner
41 #define RC5_SYS_REC 18 // Casette recorder 1
42 #define RC5_SYS_PREAMP2 19 // Audio preamplifier 2
43 #define RC5_SYS_CD 20 // CD player
44 #define RC5_SYS_COMBI 21 // Audio stack or record player
45 #define RC5_SYS_AUDIO_SAT 22 // Audio satellite
46 #define RC5_SYS_REC2 23 // Casette recorder 2
47 #define RC5_SYS_CD_R 26 // CD recorder
48 
49 // http://en.wikipedia.org/wiki/RC-5#Command_Tables
50 // Table 2, Common commands:
51 #define RC5_0 0 // Digit 0
52 #define RC5_1 1 // Digit 1
53 #define RC5_2 2 // Digit 2
54 #define RC5_3 3 // Digit 3
55 #define RC5_4 4 // Digit 4
56 #define RC5_5 5 // Digit 5
57 #define RC5_6 6 // Digit 6
58 #define RC5_7 7 // Digit 7
59 #define RC5_8 8 // Digit 8
60 #define RC5_9 9 // Digit 9
61 #define RC5_INC_VOLUME 16 // Increase sound volume
62 #define RC5_DEC_VOLUME 17 // Decrease sound volume
63 #define RC5_INC_BRIGHTNESS 18 // Increase display brightness
64 #define RC5_DEC_BRIGHTNESS 19 // Decrease display brightness
65 #define RC5_INC_BASS 22 // Increase bass response
66 #define RC5_DEC_BASS 23 // Decrease bass response
67 #define RC5_INC_TREBLE 24 // Increase treble response
68 #define RC5_DEC_TREBLE 25 // Decrease treble response
69 #define RC5_BALANCE_LEFT 26 // Shift sound balance to left
70 #define RC5_BALANCE_RIGHT 27 // Shift sound balance to right
71 #define RC5_TRANSMIT_MODE 63 // Select remote transmit mode
72 #define RC5_DIM 71 // Dim local display
73 #define RC5_INC_LINEAR 77 // Increase linear control
74 #define RC5_DEC_LINEAR 78 // Decrease linear control
75 #define RC5_UP 80 // Move cursor up
76 #define RC5_DOWN 81 // Move cursor down
77 #define RC5_MENU_ON 82 // Switch display/screen menu on
78 #define RC5_MENU_OFF 83 // Switch display/screen menu off
79 #define RC5_AV_STATUS 84 // Display A/V system status
80 #define RC5_LEFT 85 // Move cursor left
81 #define RC5_RIGHT 86 // Move cursor right
82 #define RC5_OK 87 // Acknowledge function at cursor
83 #define RC5_SUBMODE 118 // Select sub-mode
84 #define RC5_OPTIONS 119 // Select options sub-mode
85 #define RC5_CONNECT_EURO 123 // Connect items via Euroconnector
86 #define RC5_DISCONNECT_EURO 124 // Disconnect items via Euroconnector
87 
88 // http://en.wikipedia.org/wiki/RC-5#Command_Tables
89 // Table 3, Common video system commands:
90 #define RC5_INC_SATURATION 20 // Increase color saturation
91 #define RC5_DEC_SATURATION 21 // Decrease color saturation
92 #define RC5_PIP 88 // Picture-in-picture on/off
93 #define RC5_PIP_SHIFT 89 // Picture-in-picture shift
94 #define RC5_PIP_SWAP 90 // Picture-in-picture swap
95 #define RC5_PIP_STROBE 91 // Strobe main picture on/off
96 #define RC5_PIP_MULTI_STROBE 92 // Multi-strobe
97 #define RC5_PIP_FREEZE_MAIN 93 // Main picture frame frozen
98 #define RC5_PIP_MULTI_SCAN 94 // 3/9 multi-scan
99 #define RC5_PIP_SOURCE 95 // Select picture-in-picture source
100 #define RC5_PIP_MOSAIC 96 // Mosaic/multi-PIP
101 #define RC5_PIP_NOISE 97 // Digital noise reduction of picture
102 #define RC5_PIP_STORE 98 // Store main picture
103 #define RC5_PIP_PHOTO_FINISH 99 // PIP strobe; display photo-finish
104 #define RC5_PIP_RECALL 100 // Recall main stored picture
105 #define RC5_PIP_FREEZE 101 // Freeze PIP
106 #define RC5_PIP_UP 102 // Step up PIP options/source
107 #define RC5_PIP_DOWN 103 // Step down PIP options/source
108 
109 // http://en.wikipedia.org/wiki/RC-5#Command_Tables
110 // Table 4a, TV and VCR commands:
111 #define RC5_123 10 // 1/2/3 digit entry
112 #define RC5_11 11 // Channel/program/frequency 11
113 #define RC5_STANDBY 12 // Standby
114 #define RC5_MUTE 13 // Master mute/de-mute
115 #define RC5_PREFERENCES 14 // Personal preference settings
116 #define RC5_DISPLAY_INFO 15 // Display user info on screen
117 #define RC5_INC_CONTRAST 28 // Increase picture contrast
118 #define RC5_DEC_CONTRAST 29 // Decrease picture contrast
119 #define RC5_SEARCH_UP 30 // Search up
120 #define RC5_DEC_TINT 31 // Decrease tint/hue
121 #define RC5_CHANNEL_UP 32 // Channel/program up
122 #define RC5_CHANNEL_DOWN 33 // Channel/program down
123 #define RC5_CHANNEL_LAST 34 // Last viewed channel/program
124 #define RC5_STEREO_SELECT 35 // Select stereo channel/language
125 #define RC5_STEREO_SPATIAL 36 // Spatial stereo
126 #define RC5_STEREO_TOGGLE 37 // Toggle stereo/mono
127 #define RC5_SLEEP_TIMER 38 // Sleep timer
128 #define RC5_INC_TINT 39 // Increase tint/hue
129 #define RC5_SWITCH_RF 40 // Switch RF inputs
130 #define RC5_STORE 41 // Store/vote
131 #define RC5_TIME 42 // Display time
132 #define RC5_INC_SCAN 43 // Scan forward/increment
133 #define RC5_DEC_SCAN 44 // Scan backward/decrement
134 #define RC5_SECONDARY_MENU 46 // Secondary menu
135 #define RC5_CLOCK 47 // Show clock
136 #define RC5_PAUSE 48 // Pause
137 #define RC5_ERASE 49 // Erase/correct entry
138 #define RC5_REWIND 50 // Rewind
139 #define RC5_GOTO 51 // Go to
140 #define RC5_WIND 52 // Wind (fast forward)
141 #define RC5_PLAY 53 // Play
142 #define RC5_STOP 54 // Stop
143 #define RC5_RECORD 55 // Record
144 #define RC5_EXTERNAL1 56 // External 1
145 #define RC5_EXTERNAL2 57 // External 2
146 #define RC5_VIEW_DATA 59 // View data, advance
147 #define RC5_12 60 // Channel 12 (or TXT/TV toggle)
148 #define RC5_SYSTEM_STANDBY 61 // System standby
149 #define RC5_CRISP 62 // Picture crispener (coutour boost)
150 #define RC5_AUDIO_RESPONSE 70 // Audio response for speech/music
151 #define RC5_SOUND_FUNCTIONS 79 // Select sound functions in sequence
152 #define RC5_PIP_SIZE 104 // Alter PIP size step-by-step
153 #define RC5_VISION_FUNCTIONS 105 // Select vision functions in sequence
154 #define RC5_COLOR_KEY 106 // Colored or other special key
155 #define RC5_RED 107 // Red button
156 #define RC5_GREEN 108 // Green button
157 #define RC5_YELLOW 109 // Yellow button
158 #define RC5_CYAN 110 // Cyan button
159 #define RC5_INDEX 111 // Index page/white function
160 #define RC5_NEXT_OPTION 112 // Next option
161 #define RC5_PREVIOUS_OPTION 113 // Previous option
162 #define RC5_STORE_OPEN_CLOSE 122 // Store open/close
163 #define RC5_PARENTAL_ACCESS 123 // Parental access via PIN code
164 
165 // http://en.wikipedia.org/wiki/RC-5#Command_Tables
166 // Table 4b, TV1 and TV2 extension
167 #define RC5_DEFAULT_VIDEO 10 // Default video settings (TV1)
168 #define RC5_DEFAULT_AUDIO 11 // Default audio settings (TV1)
169 #define RC5_PAYTV_CHANNEL_UP 28 // Pay TV channel up (TV1)
170 #define RC5_PAYTV_CHANNEL_DOWN 29 // Pay TV channel down (TV1)
171 #define RC5_RADIO_CHANNEL_UP 30 // Radio channel up (TV1)
172 #define RC5_RADIO_CHANNEL_DOWN 31 // Radio channel down (TV1)
173 #define RC5_TILT_FORWARD 32 // Tilt cabinet forward (TV1)
174 #define RC5_TILT_BACKWARD 33 // Tilt cabinet backward (TV1)
175 #define RC5_EXTERNAL3 56 // External 3 (TV1)
176 #define RC5_EXTERNAL4 56 // External 4 (TV1)
177 #define RC5_PICTURE_FORMAT 62 // 4:3 vs 16:9 (TV1)
178 #define RC5_CHANNEL_10 67 // Channel 10
179 #define RC5_CHANNEL_11 68 // Channel 11
180 #define RC5_CHANNEL_12 69 // Channel 12
181 #define RC5_DEFAULT_VIDEO2 72 // Default video settings (TV2)
182 #define RC5_DEFAULT_AUDIO2 73 // Default audio settings (TV2)
183 #define RC5_PAYTV_CHANNEL_UP2 88 // Pay TV channel up (TV2)
184 #define RC5_PAYTV_CHANNEL_DOWN2 89 // Pay TV channel down (TV2)
185 #define RC5_RADIO_CHANNEL_UP2 90 // Radio channel up (TV2)
186 #define RC5_RADIO_CHANNEL_DOWN2 91 // Radio channel down (TV2)
187 #define RC5_TILT_FORWARD2 104 // Tilt cabinet forward (TV2)
188 #define RC5_TILT_BACKWARD2 105 // Tilt cabinet backward (TV2)
189 #define RC5_EXTERNAL3_2 120 // External 3 (TV2)
190 #define RC5_EXTERNAL4_2 121 // External 4 (TV2)
191 #define RC5_CHANNEL_MENU 122 // Channel setting menu
192 #define RC5_PICTURE_FORMAT2 126 // 4:3 vs 16:9 (TV2)
193 
194 // http://en.wikipedia.org/wiki/RC-5#Command_Tables
195 // Table 5, Teletext commands
196 #define RC5_NEXT_PAGE 10 // Next page
197 #define RC5_PREVIOUS_PAGE 11 // Previous page
198 // RC5_STANDBY 12 // Standby
199 #define RC5_ENTER_PAGE_NUMBER 28 // Enter page number in memory
200 #define RC5_SEQ_DISPLAY 29 // Sequential display of pages
201 #define RC5_SEQ_DELETE 30 // Sequential display/deletion of pages
202 #define RC5_EXCHANGE 32 // Exchange (Antiope function)
203 #define RC5_MAIN_INDEX 33 // Main index
204 #define RC5_ROW_ZERO 34 // Row zero (Antiope function)
205 #define RC5_PRINT 38 // Print displayed page
206 #define RC5_MIX 39 // Mix Antiope/TV pictures
207 #define RC5_HOLD_PAGE 41 // Page hold
208 // RC5_TIME 42 // Display time
209 #define RC5_LARGE 43 // Large top/bottom/normal
210 #define RC5_REVEAL 44 // Reveal/conceal
211 #define RC5_TV_TXT 45 // TV/TXT
212 #define RC5_TV_TXT_SUBTITLE 46 // TV + TXT/subtitle
213 // RC5_ERASE 49 // Erase/correct entry
214 #define RC5_NEWS_FLASH 62 // News flash (Antiope function)
215 
216 // http://en.wikipedia.org/wiki/RC-5#Command_Tables
217 // Table 6, LaserVision commands
218 #define RC5_PICTURE_NUMBER 10 // Display picture number/time
219 #define RC5_CHAPTER_NUMBER 11 // Display chapter number
220 // RC5_STANDBY 12 // Standby
221 // RC5_MUTE 13 // Master mute/de-mute
222 // RC5_DISPLAY_INFO 15 // Display user info on screen
223 #define RC5_SHUFFLE 28 // Total shuffle play/repeat once
224 #define RC5_REPEAT 29 // Repeat continuously
225 #define RC5_SELECT_NEXT 30 // Select next option
226 #define RC5_FAST_REVERSE 31 // Fast run reverse
227 #define RC5_ENTRY 32 // Entry (prepare to program)
228 #define RC5_AUTO_STOP 33 // Auto-stop at pre-programmed point
229 #define RC5_SLOW_REVERSE 34 // Slow run reverse
230 #define RC5_STEREO_CHANNEL1 35 // Select stereo sound channel 1/language 1
231 #define RC5_STEREO_CHANNEL2 36 // Select stereo sound channel 2/language 2
232 #define RC5_DEC_STILL 37 // Still increment reverse
233 #define RC5_INC_SPEED 38 // Increase speed
234 #define RC5_DEC_SPEED 39 // Decrease speed
235 #define RC5_SLOW_FORWARD 40 // Slow run forward
236 #define RC5_INC_STILL 41 // Still increment forward
237 #define RC5_FAST_FORWARD 42 // Fast run forward
238 #define RC5_SEARCH_USER_CHOICE 43 // Automatic search for user choice
239 #define RC5_SEARCH_REVERSE 44 // Search in reverse
240 #define RC5_TRAY 45 // Open/close tray
241 #define RC5_SEARCH_FORWARD 46 // Search forward
242 #define RC5_PLAY_REVERSE 47 // Play reverse/play opposite sound track
243 // RC5_PAUSE 48 // Pause
244 // RC5_ERASE 49 // Erase/correct entry
245 // RC5_PLAY 53 // Play
246 // RC5_STOP 54 // Stop
247 #define RC5_CLEAR_MEMORY 58 // Clear memory all
248 #define RC5_FREEZE_SEGMENT 59 // Freeze segment(s) indicated by picture numbers.
249 #define RC5_TV_TXT_ALT 60 // TV/TXT toggle; RF switch (USA only)
250 #define RC5_CX 62 // CX 1, 2, 3; toggle for CX noise reduction
251 
252 // http://en.wikipedia.org/wiki/RC-5#Command_Tables
253 // Table 11, Preamplifier commands
254 #define RC5_GEQ_L 10 // Graphic equalizer left
255 #define RC5_GEQ_R 11 // Graphic equalizer right
256 // RC5_STANDBY 12 // Standby
257 // RC5_MUTE 13 // Master mute/de-mute
258 // RC5_PREFERENCES 14 // Personal preference settings
259 // RC5_DISPLAY_INFO 15 // Display user info on screen
260 #define RC5_GEQ_L_AND_R 28 // Graphic equalizer left and right
261 #define RC5_SPEAKER_SELECT 29 // Speaker select
262 #define RC5_SCRATCH_FILTER 30 // Scratch filter on/off
263 #define RC5_RUMBLE_FILTER 31 // Rumble filter on/off
264 #define RC5_INC_STEP 32 // Step function +
265 #define RC5_DEC_STEP 33 // Step function -
266 #define RC5_SIGNAL_PATH 34 // Signal path options
267 #define RC5_SPEAKER_A 35 // Speaker A on/off
268 #define RC5_SURROUND_OPTIONS 37 // Surround sound options
269 // RC5_SLEEP_TIMER 38 // Sleep timer
270 #define RC5_SPEAKER_B 39 // Speaker B on/off
271 #define RC5_SPEAKER_C 40 // Speaker C on/off
272 #define RC5_TIMER_PROGRAM 41 // Timer program mode
273 // RC5_TIME 42 // Display time
274 #define RC5_INC_TIMER 43 // Timer +
275 #define RC5_DEC_TIMER 44 // Timer -
276 #define RC5_TIMER_MEMORY 45 // Open timer memory
277 #define RC5_ACOUSTIC_CONTROL 46 // Open acoustic control setting memory
278 #define RC5_ACOUSTIC_SELECT 47 // Select acoustic settings in memory
279 // RC5_ERASE 49 // Erase/correct entry
280 // RC5_CLEAR_MEMORY 58 // Clear memory all
281 #define RC5_DYNAMIC_EXPAND 60 // Dynamic range expand
282 #define RC5_DYNAMIC_COMPRESS 62 // Dynamic range compress
283 #define RC5_SURROUND_SOUND 64 // Surround sound on/off
284 #define RC5_BALANCE_FRONT 65 // Balance front
285 #define RC5_BALANCE_REAR 66 // Balance rear
286 #define RC5_LINEAR_SOUND 79 // Scroll linear sound functions
287 #define RC5_RANDOM_NOISE 88 // Random noise generator on/off
288 #define RC5_TIMER 89 // Timer on/off
289 #define RC5_NEWS_TIMER 90 // News timer on/off
290 #define RC5_INC_CENTER_VOLUME 102 // Increase center channel volume
291 #define RC5_DEC_CENTER_VOLUME 103 // Decrease center channel volume
292 #define RC5_INC_DELAY_SURROUND 104 // Increase delay front to surround
293 #define RC5_DEC_DELAY_SURROUND 105 // Decrease delay front to surround
294 #define RC5_LINEAR_PHASE 106 // Linear phase
295 #define RC5_TAPE_MONITOR 122 // Tape monitor
296 
297 // http://en.wikipedia.org/wiki/RC-5#Command_Tables
298 // Table 14, Compact disc player commands
299 #define RC5_LOCAL_CURSOR 10 // Scroll local display cursor
300 #define RC5_LOCAL_FUNCTION 11 // Scroll local display function
301 // RC5_STANDBY 12 // Standby
302 // RC5_MUTE 13 // Master mute/de-mute
303 // RC5_DISPLAY_INFO 15 // Display user info on screen
304 // RC5_SHUFFLE 28 // Total shuffle play/repeat once
305 // RC5_REPEAT 29 // Repeat continuously
306 #define RC5_INC_SELECT 30 // Select increment
307 #define RC5_DEC_SELECT 31 // Select decrement
308 #define RC5_NEXT 32 // Next
309 #define RC5_PREVIOUS 33 // Previous
310 #define RC5_INDEX_NEXT 34 // Index next
311 #define RC5_INDEX_PREVIOUS 35 // Index previous
312 #define RC5_PLAY_PROGRAM 36 // Play/program
313 #define RC5_NOMINAL_SPEED 37 // Speed nominal
314 // RC5_INC_SPEED 38 // Increase speed
315 // RC5_DEC_SPEED 39 // Decrease speed
316 // RC5_STORE 41 // Store/vote
317 // RC5_INC_SCAN 43 // Scan forward/increment
318 // RC5_TRAY 45 // Open/close tray
319 #define RC5_CARTRIDGE 47 // Fast/select disc from catridge
320 // RC5_PAUSE 48 // Pause
321 // RC5_ERASE 49 // Erase/correct entry
322 // RC5_REWIND 50 // Rewind
323 // RC5_GOTO 51 // Go to
324 // RC5_WIND 52 // Wind (fast forward)
325 // RC5_PLAY 53 // Play
326 // RC5_STOP 54 // Stop
327 // RC5_CLEAR_MEMORY 58 // Clear memory all
328 #define RC5_REPEAT_AB 59 // Repeat program marked A/B
329 // RC5_DYNAMIC_EXPAND 60 // Dynamic range expand
330 // RC5_DYNAMIC_COMPRESS 62 // Dynamic range compress
331 #define RC5_DSP 91 // Digital signal processing on/off
332 #define RC5_DSP_MUSIC 92 // Music mode (DSP)
333 #define RC5_DSP_ACOUSTICS 93 // Select room acoustics (DSP)
334 #define RC5_DSP_JAZZ 94 // Jazz/s-hall effect (DSP)
335 #define RC5_DSP_POP 95 // Pop/s-hall effect (DSP)
336 #define RC5_DSP_CLASSIC 96 // Classic/church music for music/room mode (DSP)
337 #define RC5_DSP_EASY 97 // Easy/club music for music/room mode (DSP)
338 #define RC5_DSP_DISCO 98 // Disco/stadium music for music/room mode (DSP)
339 #define RC5_SECOND_FAVORITE 107 // Second favorite track selection
340 #define RC5_FAVORITE 108 // Favorite track selection
341 #define RC5_TITLE_INTO_MEMORY 109 // Title into memory
342 #define RC5_FADE 120 // Fade in/out audio
343 
344 #endif