Mercurial > remote-gamepad-server
view 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 |
line wrap: on
line source
#ifndef DS_H #define DS_H #include <stdint.h> /* Describe Device */ typedef union { uint32_t hex; struct { uint32_t a:1; /* Pressed or held buttons */ uint32_t b:1; uint32_t select:1; uint32_t start:1; uint32_t right:1; uint32_t left:1; uint32_t up:1; uint32_t down:1; uint32_t r:1; uint32_t l:1; uint32_t x:1; uint32_t y:1; uint32_t padding1:2; uint32_t zl:1; uint32_t zr:1; uint32_t padding2:4; uint32_t touch:1; uint32_t padding3:3; uint32_t c_right:1; uint32_t c_left:1; uint32_t c_up:1; uint32_t c_down:1; uint32_t circle_right:1; uint32_t circle_left:1; uint32_t circle_up:1; uint32_t circle_down:1; } __attribute__((packed)); } ds_t; /* Throws events according to ds keys status */ extern void ds_process_evt(ds_t* ds, int uinput_fd); #endif /* DS_H */