#ifndef DS_H #define DS_H #include "stdint.h" /* Describe Device */ typedef struct ds_s{ uint8_t A:1; /* Pressed or held buttons */ uint8_t B:1; uint8_t X:1; uint8_t Y:1; uint8_t L:1; uint8_t R:1; uint8_t Start:1; uint8_t Select:1; uint8_t aX; uint8_t aY; } __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 */