wiiuse
io.h
Go to the documentation of this file.
1 /*
2  * wiiuse
3  *
4  * Written By:
5  * Michael Laforest < para >
6  * Email: < thepara (--AT--) g m a i l [--DOT--] com >
7  *
8  * Copyright 2006-2007
9  *
10  * This file is part of wiiuse.
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 3 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program. If not, see <http://www.gnu.org/licenses/>.
24  *
25  * $Header$
26  *
27  */
28 
34 #ifndef IO_H_INCLUDED
35 #define IO_H_INCLUDED
36 
37 #include "wiiuse_internal.h"
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
45 void wiiuse_handshake(struct wiimote_t *wm, byte *data, uint16_t len);
46 
47 int wiiuse_wait_report(struct wiimote_t *wm, int report, byte *buffer, int bufferLength,
48  unsigned long timeout_ms);
49 void wiiuse_read_data_sync(struct wiimote_t *wm, byte memory, unsigned addr, unsigned short size, byte *data);
50 
51 /* Test seam: always compiled; only called under WIIUSE_ACCEL_10BIT. */
52 void wiiuse_decode_accel_calibration_lsb(struct accel_t *accel, byte *buf);
55 #ifdef __cplusplus
56 }
57 #endif
58 
59 #endif /* IO_H_INCLUDED */
Main Wiimote device structure.
Definition: wiiuse.h:793
Accelerometer struct.
Definition: wiiuse.h:477
General internal wiiuse stuff.
int wiiuse_wait_report(struct wiimote_t *wm, int report, byte *buffer, int bufferLength, unsigned long timeout_ms)
Wait until specified report arrives and return it.
Definition: io.c:125
void wiiuse_decode_accel_calibration_lsb(struct accel_t *accel, byte *buf)
Decode the extra low-order accelerometer calibration bits packed into the EEPROM calibration block...
Definition: io.c:269
void wiiuse_read_data_sync(struct wiimote_t *wm, byte memory, unsigned addr, unsigned short size, byte *data)
Read memory/register data synchronously.
Definition: io.c:176