File: livedrive_common.h

package info (click to toggle)
lirc 0.10.1-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 8,364 kB
  • sloc: ansic: 26,717; cpp: 9,066; sh: 5,521; python: 4,362; makefile: 1,034; xml: 63
file content (56 lines) | stat: -rw-r--r-- 1,642 bytes parent folder | download | duplicates (3)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
 * hw_livedrive.h - lirc routines for a Creative Labs LiveDrive.
 *
 *     Copyright (C) 2003 Stephen Beahm <stephenbeahm@adelphia.net>
 *
 *     This program is free software; you can redistribute it and/or
 *     modify it under the terms of the GNU General Public License as
 *     published by the Free Software Foundation; either version 2 of
 *     the License, or (at your option) any later version.
 *
 *     This program is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 *     You should have received a copy of the GNU General Public
 *     License along with this program; if not, write to the Free
 *     Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 *     Boston, MA  02110-1301 USA.
 */

#ifndef HW_LIVEDRIVE_COMMON_H
#define HW_LIVEDRIVE_COMMON_H

struct sequencer_packet {
	unsigned char type;
	unsigned char data;
	unsigned char device;
	unsigned char filler;
};

struct midi_packet {
	unsigned char vendor_id[3];
	unsigned char dev;
	unsigned char filler[2];
	unsigned char keygroup;
	unsigned char remote[2];
	unsigned char key[2];
	unsigned char sysex_end;
};

/* midi_packet.dev */
#define REMOTE    0x60
#define NONREMOTE 0x61

int livedrive_decode(struct ir_remote *remote, struct decode_ctx_t* ctx);
int livedrive_init(void);
int livedrive_deinit(void);

extern struct timeval start, end, last;
extern ir_code pre, code;

#define SYSEX     0xF0
#define SYSEX_END 0xF7

#endif /* HW_LIVEDRIVE_COMMON_H */