Changed the initial handshake to be synchronous

Made the Motion+ init a lot more robust
Code cleanup
This commit is contained in:
Jan Ciger
2012-01-15 04:43:09 +01:00
committed by Ryan Pavlik
parent ce9e1b6156
commit 2e347bc523
6 changed files with 268 additions and 9 deletions

View File

@@ -52,7 +52,10 @@ void wiiuse_handshake(struct wiimote_t* wm, byte* data, uint16_t len);
void wiiuse_init_platform_fields(struct wiimote_t* wm);
void wiiuse_cleanup_platform_fields(struct wiimote_t* wm);
int wiiuse_io_read(struct wiimote_t* wm);
void wiiuse_wait_report(struct wiimote_t *wm, int report, byte *data);
void wiiuse_read(struct wiimote_t *wm, byte memory, unsigned addr, unsigned short size, byte *data);
int wiiuse_io_read(struct wiimote_t* wm, byte* buf, int len);
int wiiuse_io_write(struct wiimote_t* wm, byte* buf, int len);
/** @} */