1 | /* |
---|
2 | * wiic_functions.h |
---|
3 | * |
---|
4 | * This file is part of WiiC, written by: |
---|
5 | * Gabriele Randelli |
---|
6 | * Email: randelli@dis.uniroma1.it |
---|
7 | * |
---|
8 | * Copyright 2010 |
---|
9 | * |
---|
10 | * This file is based on Wiiuse, written By: |
---|
11 | * Michael Laforest < para > |
---|
12 | * Email: < thepara (--AT--) g m a i l [--DOT--] com > |
---|
13 | * |
---|
14 | * Copyright 2006-2007 |
---|
15 | * |
---|
16 | * This program is free software; you can redistribute it and/or modify |
---|
17 | * it under the terms of the GNU General Public License as published by |
---|
18 | * the Free Software Foundation; either version 3 of the License, or |
---|
19 | * (at your option) any later version. |
---|
20 | * |
---|
21 | * This program is distributed in the hope that it will be useful, |
---|
22 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
24 | * GNU General Public License for more details. |
---|
25 | * |
---|
26 | * You should have received a copy of the GNU General Public License |
---|
27 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
28 | * |
---|
29 | * $Header$ |
---|
30 | */ |
---|
31 | |
---|
32 | /** |
---|
33 | * @file |
---|
34 | * |
---|
35 | * @brief WiiC public functions. |
---|
36 | * |
---|
37 | * Contains all the public functions, available for third |
---|
38 | * party applications. This header is included in wiic.h. |
---|
39 | */ |
---|
40 | #ifdef __cplusplus |
---|
41 | extern "C" { |
---|
42 | #endif |
---|
43 | |
---|
44 | /* wiic.c */ |
---|
45 | WIIC_EXPORT extern const char* wiic_version(); |
---|
46 | |
---|
47 | WIIC_EXPORT extern struct wiimote_t** wiic_init(int wiimotes); |
---|
48 | WIIC_EXPORT extern void wiic_disconnected(struct wiimote_t* wm); |
---|
49 | WIIC_EXPORT extern void wiic_cleanup(struct wiimote_t** wm, int wiimotes); |
---|
50 | WIIC_EXPORT extern void wiic_rumble(struct wiimote_t* wm, int status); |
---|
51 | WIIC_EXPORT extern void wiic_toggle_rumble(struct wiimote_t* wm); |
---|
52 | WIIC_EXPORT extern void wiic_set_leds(struct wiimote_t* wm, int leds); |
---|
53 | WIIC_EXPORT extern void wiic_motion_sensing(struct wiimote_t* wm, int status); |
---|
54 | WIIC_EXPORT extern int wiic_read_data(struct wiimote_t* wm, byte* buffer, unsigned int offset, unsigned short len); |
---|
55 | WIIC_EXPORT extern int wiic_write_data(struct wiimote_t* wm, unsigned int addr, byte* data, byte len); |
---|
56 | WIIC_EXPORT extern void wiic_status(struct wiimote_t* wm); |
---|
57 | WIIC_EXPORT extern struct wiimote_t* wiic_get_by_id(struct wiimote_t** wm, int wiimotes, int unid); |
---|
58 | WIIC_EXPORT extern int wiic_set_flags(struct wiimote_t* wm, int enable, int disable); |
---|
59 | WIIC_EXPORT extern float wiic_set_smooth_alpha(struct wiimote_t* wm, float alpha); |
---|
60 | WIIC_EXPORT extern void wiic_set_orient_threshold(struct wiimote_t* wm, float threshold); |
---|
61 | WIIC_EXPORT extern void wiic_resync(struct wiimote_t* wm); |
---|
62 | WIIC_EXPORT extern void wiic_set_accel_threshold(struct wiimote_t* wm, int threshold); |
---|
63 | WIIC_EXPORT extern void wiic_update_timestamp(struct wiimote_t* wm); |
---|
64 | |
---|
65 | /* connect.c */ |
---|
66 | WIIC_EXPORT extern int wiic_find(struct wiimote_t** wm, int max_wiimotes, int timeout); |
---|
67 | WIIC_EXPORT extern int wiic_load(struct wiimote_t** wm); |
---|
68 | WIIC_EXPORT extern int wiic_connect(struct wiimote_t** wm, int wiimotes, int autoreconnect); |
---|
69 | WIIC_EXPORT extern int wiic_connect_single(struct wiimote_t* wm, char* address, int autoreconnect); |
---|
70 | WIIC_EXPORT extern void wiic_disconnect(struct wiimote_t* wm); |
---|
71 | |
---|
72 | /* events.c */ |
---|
73 | WIIC_EXPORT extern int wiic_poll(struct wiimote_t** wm, int wiimotes); |
---|
74 | |
---|
75 | /* ir.c */ |
---|
76 | WIIC_EXPORT extern void wiic_set_ir(struct wiimote_t* wm, int status); |
---|
77 | WIIC_EXPORT extern void wiic_set_ir_vres(struct wiimote_t* wm, unsigned int x, unsigned int y); |
---|
78 | WIIC_EXPORT extern void wiic_set_ir_position(struct wiimote_t* wm, enum ir_position_t pos); |
---|
79 | WIIC_EXPORT extern void wiic_set_aspect_ratio(struct wiimote_t* wm, enum aspect_t aspect); |
---|
80 | WIIC_EXPORT extern void wiic_set_ir_sensitivity(struct wiimote_t* wm, int level); |
---|
81 | |
---|
82 | /* nunchuk.c */ |
---|
83 | WIIC_EXPORT extern void wiic_set_nunchuk_orient_threshold(struct wiimote_t* wm, float threshold); |
---|
84 | WIIC_EXPORT extern void wiic_set_nunchuk_accel_threshold(struct wiimote_t* wm, int threshold); |
---|
85 | |
---|
86 | /* speaker.c */ |
---|
87 | WIIC_EXPORT extern void wiic_set_speaker(struct wiimote_t* wm, int status); |
---|
88 | WIIC_EXPORT extern void wiic_mute_speaker(struct wiimote_t* wm, int status); |
---|
89 | WIIC_EXPORT extern void wiic_sound(struct wiimote_t* wm); |
---|
90 | |
---|
91 | /* motionplus.c */ |
---|
92 | WIIC_EXPORT extern void wiic_set_motion_plus(struct wiimote_t* wm, int status); |
---|
93 | WIIC_EXPORT extern void wiic_calibrate_motion_plus(struct motion_plus_t* mp); |
---|
94 | WIIC_EXPORT extern void wiic_set_mp_threshold(struct wiimote_t* wm, int threshold); |
---|
95 | |
---|
96 | #ifdef __cplusplus |
---|
97 | } |
---|
98 | #endif |
---|