From 7bec38254e6db158f7a08e4c98e3d4df704ff3f3 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Wed, 7 Sep 2011 10:37:50 -0500 Subject: [PATCH] wiiuse write data can take const byte --- src/wiiuse.c | 2 +- src/wiiuse.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wiiuse.c b/src/wiiuse.c index 604b4ec..1610135 100644 --- a/src/wiiuse.c +++ b/src/wiiuse.c @@ -532,7 +532,7 @@ struct wiimote_t* wiiuse_get_by_id(struct wiimote_t** wm, int wiimotes, int unid * @param data The data to be written to the memory location. * @param len The length of the block to be written. */ -int wiiuse_write_data(struct wiimote_t* wm, unsigned int addr, byte* data, byte len) { +int wiiuse_write_data(struct wiimote_t* wm, unsigned int addr, const byte* data, byte len) { byte buf[21] = {0}; /* the payload is always 23 */ byte * bufPtr = buf; diff --git a/src/wiiuse.h b/src/wiiuse.h index f0e1d79..d820d3e 100644 --- a/src/wiiuse.h +++ b/src/wiiuse.h @@ -761,7 +761,7 @@ WIIUSE_EXPORT extern void wiiuse_toggle_rumble(struct wiimote_t* wm); WIIUSE_EXPORT extern void wiiuse_set_leds(struct wiimote_t* wm, int leds); WIIUSE_EXPORT extern void wiiuse_motion_sensing(struct wiimote_t* wm, int status); WIIUSE_EXPORT extern int wiiuse_read_data(struct wiimote_t* wm, byte* buffer, unsigned int offset, uint16_t len); -WIIUSE_EXPORT extern int wiiuse_write_data(struct wiimote_t* wm, unsigned int addr, byte* data, byte len); +WIIUSE_EXPORT extern int wiiuse_write_data(struct wiimote_t* wm, unsigned int addr, const byte* data, byte len); WIIUSE_EXPORT extern void wiiuse_status(struct wiimote_t* wm); WIIUSE_EXPORT extern struct wiimote_t* wiiuse_get_by_id(struct wiimote_t** wm, int wiimotes, int unid); WIIUSE_EXPORT extern int wiiuse_set_flags(struct wiimote_t* wm, int enable, int disable);