wiiuse
os.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 PLATFORM_H_INCLUDED
35 #define PLATFORM_H_INCLUDED
36 
37 #include "wiiuse_internal.h"
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
45 void wiiuse_init_platform_fields(struct wiimote_t *wm);
46 void wiiuse_cleanup_platform_fields(struct wiimote_t *wm);
47 
48 int wiiuse_os_find(struct wiimote_t **wm, int max_wiimotes, int timeout);
49 
50 int wiiuse_os_connect(struct wiimote_t **wm, int wiimotes);
51 void wiiuse_os_disconnect(struct wiimote_t *wm);
52 
53 int wiiuse_os_poll(struct wiimote_t **wm, int wiimotes);
54 /* buf[0] will be the report type, buf+1 the rest of the report */
55 int wiiuse_os_read(struct wiimote_t *wm, byte *buf, int len);
56 int wiiuse_os_write(struct wiimote_t *wm, byte report_type, byte *buf, int len);
57 
58 unsigned long wiiuse_os_ticks();
61 #ifdef __cplusplus
62 }
63 #endif
64 
65 #endif /* PLATFORM_H_INCLUDED */
Main Wiimote device structure.
Definition: wiiuse.h:751
General internal wiiuse stuff.