annotate ds.h @ 4:73c20831be0a

Replace DS input with 3DS, for now disable axis input.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sun, 22 Feb 2015 18:09:53 +0100
parents f362b20de51e
children eafcd170dc6d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e70ea46d6073 Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
1 #ifndef DS_H
e70ea46d6073 Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
2 #define DS_H
e70ea46d6073 Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
3
e70ea46d6073 Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
4 #include <stdint.h>
e70ea46d6073 Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
5
e70ea46d6073 Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
6
e70ea46d6073 Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
7 /* Describe Device */
4
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
8 typedef union {
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
9 uint32_t hex;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
10 struct {
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
11 uint32_t a:1; /* Pressed or held buttons */
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
12 uint32_t b:1;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
13 uint32_t select:1;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
14 uint32_t start:1;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
15 uint32_t right:1;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
16 uint32_t left:1;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
17 uint32_t up:1;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
18 uint32_t down:1;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
19 uint32_t r:1;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
20 uint32_t l:1;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
21 uint32_t x:1;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
22 uint32_t y:1;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
23 uint32_t padding1:2;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
24 uint32_t zl:1;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
25 uint32_t zr:1;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
26 uint32_t padding2:4;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
27 uint32_t touch:1;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
28 uint32_t padding3:3;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
29 uint32_t c_right:1;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
30 uint32_t c_left:1;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
31 uint32_t c_up:1;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
32 uint32_t c_down:1;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
33 uint32_t circle_right:1;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
34 uint32_t circle_left:1;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
35 uint32_t circle_up:1;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
36 uint32_t circle_down:1;
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
37 } __attribute__((packed));
73c20831be0a Replace DS input with 3DS, for now disable axis input.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 2
diff changeset
38 } ds_t;
0
e70ea46d6073 Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
39
e70ea46d6073 Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
40
2
f362b20de51e Remove trailing whitespaces.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 0
diff changeset
41 /*
0
e70ea46d6073 Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
42 Throws events according to ds keys status
e70ea46d6073 Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
43 */
e70ea46d6073 Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
44 extern void ds_process_evt(ds_t* ds, int uinput_fd);
e70ea46d6073 Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
45
e70ea46d6073 Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
46
e70ea46d6073 Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
47 #endif /* DS_H */