summaryrefslogtreecommitdiff
path: root/irdev.h
blob: f8875f64282a56c6ad59845551925ced0243d323 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 *
 * IRBOX, an Ivy driver for infra-red remote controls
 *
 * Copyright 1998-1999 
 * Centre d'Etudes de la Navigation Aerienne
 *
 * Device driver
 *
 * $Id$
 *
 */


#ifndef IR_H
#define IR_H 1

typedef enum {
	EVENT_BTN_PRESS_TV_VOL_UP,
	EVENT_BTN_PRESS,
	EVENT_BTN_RELEASE
} IrEvent;

typedef struct ir_state IrState;

typedef void (*IrEvtCallback) (IrState *ir, IrEvent event, const char *value );
typedef void (*IrTimerCallback) (void * id, IrState *ir, int delta );
typedef void* (*IrTimerSetter) (IrTimerCallback cb, long value, void *data );
typedef void (*IrTimerCanceller) (void *timerid );

extern IrState* IrOpen (const char *name);
extern void IrClose (IrState *ir);
extern int IrInit (IrState *ir, IrEvtCallback cb, IrTimerSetter st, IrTimerCanceller ct);
extern void IrIntr (IrState *ir);
extern int IrGetFd (IrState *ir);


#endif