// Copyright 2007-2008 Xo W. // Adapted from http://www.windmeadow.com/node/42 // Thanks to Chad for the great work! #define decode_nunchuk(a) ((a^0x17)+0x17) void init_nunchuk (char* buf); void read_nunchuk (char* buf);