diff options
author | David Herrmann <dh.herrmann@googlemail.com> | 2011-11-17 14:12:00 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-11-22 23:08:09 +0100 |
commit | fad8c0e34323eb7789f93750258a2cf02dc6cf69 (patch) | |
tree | bb2b0f3b89fa751702dec42681cdb1bf206d0259 /drivers/hid/hid-wiimote.h | |
parent | 7e274400629fbf8eab294fef39c3efde463966a9 (diff) | |
download | linux-fad8c0e34323eb7789f93750258a2cf02dc6cf69.tar.bz2 |
HID: wiimote: Add read-mem helpers
Add helper functions similar to the write-mem helpers but for reading wiimote
memory and eeprom.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-wiimote.h')
-rw-r--r-- | drivers/hid/hid-wiimote.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hid/hid-wiimote.h b/drivers/hid/hid-wiimote.h index d78f79c08901..865740d3a3fe 100644 --- a/drivers/hid/hid-wiimote.h +++ b/drivers/hid/hid-wiimote.h @@ -62,6 +62,8 @@ struct wiimote_state { /* results of synchronous requests */ __u8 cmd_battery; __u8 cmd_err; + __u8 *cmd_read_buf; + __u8 cmd_read_size; }; struct wiimote_data { @@ -113,6 +115,8 @@ enum wiiproto_reqs { extern void wiiproto_req_drm(struct wiimote_data *wdata, __u8 drm); extern int wiimote_cmd_write(struct wiimote_data *wdata, __u32 offset, const __u8 *wmem, __u8 size); +extern ssize_t wiimote_cmd_read(struct wiimote_data *wdata, __u32 offset, + __u8 *rmem, __u8 size); /* requires the state.lock spinlock to be held */ static inline bool wiimote_cmd_pending(struct wiimote_data *wdata, int cmd, |