Wii Nunchuk module with nasty hacks from debugging on a FRDM-KL25Z

Fork of WiiChuk_compat by Greg Brush

Revision:
2:566662f892b1
Parent:
1:7ff30607465f
Child:
3:2431ea9893be
--- a/WiiChuk_compat.hpp	Mon Jun 08 15:31:50 2015 +0000
+++ b/WiiChuk_compat.hpp	Mon Jun 08 19:53:32 2015 +0000
@@ -57,11 +57,16 @@
 
 typedef void(*pt2Func)(int);
 
+struct nunchuk {
+  uint8_t X, Y, Z, C;
+  uint16_t aX, aY, aZ;
+};
+
 class WiiChuck {
 public:
     bool Error;
     WiiChuck(PinName data, PinName clk, Stream &pc);
-    bool Read(int* joyX,int* joyY,int* accX,int* accY,int* accZ,int* buttonC,int* buttonZ);
+    bool Read(uint8_t* joyX, uint8_t* joyY, uint16_t* accX, uint16_t* accY, uint16_t* accZ, uint8_t* buttonC, uint8_t* buttonZ);
     void start();
     void stop();
     void attach(pt2Func function);