comparison 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
comparison
equal deleted inserted replaced
3:61bb81a9a440 4:73c20831be0a
3 3
4 #include <stdint.h> 4 #include <stdint.h>
5 5
6 6
7 /* Describe Device */ 7 /* Describe Device */
8 typedef struct ds_s{ 8 typedef union {
9 uint8_t A:1; /* Pressed or held buttons */ 9 uint32_t hex;
10 uint8_t B:1; 10 struct {
11 uint8_t X:1; 11 uint32_t a:1; /* Pressed or held buttons */
12 uint8_t Y:1; 12 uint32_t b:1;
13 uint8_t L:1; 13 uint32_t select:1;
14 uint8_t R:1; 14 uint32_t start:1;
15 uint8_t Start:1; 15 uint32_t right:1;
16 uint8_t Select:1; 16 uint32_t left:1;
17 uint8_t aX; 17 uint32_t up:1;
18 uint8_t aY; 18 uint32_t down:1;
19 } __attribute__((packed)) ds_t; 19 uint32_t r:1;
20 uint32_t l:1;
21 uint32_t x:1;
22 uint32_t y:1;
23 uint32_t padding1:2;
24 uint32_t zl:1;
25 uint32_t zr:1;
26 uint32_t padding2:4;
27 uint32_t touch:1;
28 uint32_t padding3:3;
29 uint32_t c_right:1;
30 uint32_t c_left:1;
31 uint32_t c_up:1;
32 uint32_t c_down:1;
33 uint32_t circle_right:1;
34 uint32_t circle_left:1;
35 uint32_t circle_up:1;
36 uint32_t circle_down:1;
37 } __attribute__((packed));
38 } ds_t;
20 39
21 40
22 /* 41 /*
23 Throws events according to ds keys status 42 Throws events according to ds keys status
24 */ 43 */