#ifndef CORE_CONSOLE_H #define CORE_CONSOLE_H /* Analog values */ #define DS_MIN_X 0 #define DS_MAX_X 255 #define DS_MIN_Y 0 #define DS_MAX_Y 191 /* Describe Device */ typedef struct console_s{ unsigned char A:1; /* Pressed or held buttons */ unsigned char B:1; unsigned char X:1; unsigned char Y:1; unsigned char L:1; unsigned char R:1; unsigned char Start:1; unsigned char Select:1; unsigned char aX; /* axis */ unsigned char aY; } __attribute__((packed)) console_t; /* Store buttons info into console type.. */ extern void console_process_input(console_t* c); /* Init console variables */ extern void console_init(console_t* c); #endif /* CORE_CONSOLE_H */