]>
git.zerfleddert.de Git - fnordlicht-mini/blob - firmware/fnordlicht-controller/ir.h
f51dd160be51f9a3688773086d86cb6db0c67a64
2 * ox - infrared to usb keyboard/mouse adapter
4 * by Alexander Neumann <alexander@lochraster.org>
6 * inspired by InfraHID by Alex Badea,
7 * see http://vamposdecampos.googlepages.com/infrahid.html
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 * For more information on the GPL, please go to:
23 * http://www.gnu.org/copyleft/gpl.html
32 IR_RAW
= 1, /* just receive a code, disable ir afterwards (-> DISABLE) */
33 IR_DECODE
= 2, /* just receive and decode vaules, disable ir afterwards (-> DISABLE) */
34 IR_RECEIVE
= 3, /* receive, decode and process codes */
43 #define MAX_CODE_LENGTH 160
44 /* internal storage for received code: allocate 160*2 = 320 byte memory for
45 * storing a code, this means we can store 80 on/off sequence timings */
47 uint16_t time
[MAX_CODE_LENGTH
];
51 extern volatile struct ir_global_t ir_global
;
56 void ir_set_mode(enum ir_mode_t mode
);
58 #define ir_disable() ir_set_mode(IR_DISABLED);
59 #define ir_enable() ir_set_mode(IR_RECEIVE);