include/asuro_irrc5.h

Go to the documentation of this file.
00001 /** @file
00002  * 
00003  * General RC5 codes for remote controls.
00004  * 
00005  * For an explanation on how RC5 works, you may have a look on
00006  * http://www.sprut.de/electronic/ir/rc5.htm (in german, though).
00007  * 
00008  * @author Denis Martin
00009  * 
00010  * This program is free software; you can redistribute it and/or modify it under
00011  * the terms of the GNU General Public License as published by the Free Software
00012  * Foundation; either version 2 of the License, or (at your option) any later
00013  * version.
00014  * This program is distributed in the hope that it will be useful, but WITHOUT
00015  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00016  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
00017  * details. You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software Foundation, Inc.,
00019  * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
00020  */
00021 
00022 #ifndef ASURO_IRRC5_H_
00023 #define ASURO_IRRC5_H_
00024 
00025 #ifdef AVR
00026 #include "asuro_avr_irrc5.h"
00027 #endif
00028 
00029 #define AS_RC5_START_MASK   0x2000
00030 #define AS_RC5_TOGGLE_MASK  0x0800
00031 #define AS_RC5_ADDRESS_MASK 0x07c0
00032 #define AS_RC5_COMMAND_MASK 0x103f
00033 
00034 /** @name Common remote control button codes */
00035 //@{
00036 #define AS_RC5_CODE_0       0x1000
00037 #define AS_RC5_CODE_1       0x1001
00038 #define AS_RC5_CODE_2       0x1002
00039 #define AS_RC5_CODE_3       0x1003
00040 #define AS_RC5_CODE_4       0x1004
00041 #define AS_RC5_CODE_5       0x1005
00042 #define AS_RC5_CODE_6       0x1006
00043 #define AS_RC5_CODE_7       0x1007
00044 #define AS_RC5_CODE_8       0x1008
00045 #define AS_RC5_CODE_9       0x1009
00046 
00047 #define AS_RC5_CODE_POWER   0x100c
00048 #define AS_RC5_CODE_MUTE    0x100d
00049 #define AS_RC5_CODE_GREEN   0x102e
00050 #define AS_RC5_CODE_YELLOW  0x1038
00051 #define AS_RC5_CODE_BLUE    0x1029
00052 #define AS_RC5_CODE_DISPLAY 0x100f
00053 
00054 #define AS_RC5_CODE_VOLUP   0x1010  ///< volume +
00055 #define AS_RC5_CODE_VOLDOWN 0x1011  ///< volume -
00056 #define AS_RC5_CODE_CHUP    0x1020  ///< channel +
00057 #define AS_RC5_CODE_CHDOWN  0x1021  ///< channel -
00058 #define AS_RC5_CODE_SELECT  0x1022  ///< source selection
00059 //@}
00060 
00061 /**
00062  * Read the last RC5 code that was successfully received. Note that the value is
00063  * reset upon reading and that subsequent calls may return 0 or other values.
00064  * 
00065  * @return The last valid RC5 code.
00066  */
00067 inline unsigned short AS_Irrc5Read(void);
00068 
00069 #endif /*ASURO_IRRC5_H_*/

Generated on Fri May 12 10:11:15 2006 for simsuro by  doxygen 1.4.6