#ifndef BUTTONS_H #define BUTTONS_H /* The Wii Remote has 11 buttons that are used as regular input devices: A, B (trigger), a 4-directional D-Pad, +, -, Home, 1, and 2. These are reported as bits in a two-byte bitmask. These are the assignments, in big-endian order: Bit Mask First Byte Second Byte 0 0x01 D-Pad Left Two 1 0x02 D-Pad Right One 2 0x04 D-Pad Down B 3 0x08 D-Pad Up A 4 0x10 Plus Minus 5 0x20 Other uses Other uses 6 0x40 Other uses Other uses 7 0x80 Unknown Home */ //first byte #define DPAD_LEFT 0x01 #define DPAD_RIGHT 0x02 #define DPAD_DOWN 0x04 #define DPAD_UP 0x08 #define PLUS 0x10 #define OTHER0 0x20 #define OTHER1 0x40 #define UNKNOWN 0x80 //second byte #define TWO 0x01 #define ONE 0x02 #define B 0x04 #define A 0x08 #define MINUS 0x10 #define OTHER2 0x20 #define OTHER3 0x40 #define HOME 0x80 #endif