]>
git.zerfleddert.de Git - fnordlicht-mini/blob - firmware/fnordlicht-controller/ir-cluster.h
8ffa362a978f892b7ef2fb69779127d8097e1e3d
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
28 #ifndef __IR_CLUSTER_H
29 #define __IR_CLUSTER_H
31 /* search for (one-dimensional) clusters within data[],
32 * consider only values at even positions */
33 uint8_t ir_cluster(uint16_t data
[], uint8_t len
, uint16_t cluster
[], uint8_t max
);
35 /* get cluster index belonging to data */
36 uint8_t ir_min_cluster(uint16_t data
, uint16_t cluster
[], uint8_t len
);