Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/wiimote/src/external/wiicpp/wiic/wiic_functions.h @ 10255

Last change on this file since 10255 was 9780, checked in by georgr, 11 years ago

WiiCpp library successfully (?) added - won't work without libbluetooth-dev

  • Property svn:executable set to *
File size: 4.2 KB
Line 
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
41extern "C" {
42#endif
43
44/* wiic.c */
45WIIC_EXPORT extern const char* wiic_version();
46
47WIIC_EXPORT extern struct wiimote_t** wiic_init(int wiimotes);
48WIIC_EXPORT extern void wiic_disconnected(struct wiimote_t* wm);
49WIIC_EXPORT extern void wiic_cleanup(struct wiimote_t** wm, int wiimotes);
50WIIC_EXPORT extern void wiic_rumble(struct wiimote_t* wm, int status);
51WIIC_EXPORT extern void wiic_toggle_rumble(struct wiimote_t* wm);
52WIIC_EXPORT extern void wiic_set_leds(struct wiimote_t* wm, int leds);
53WIIC_EXPORT extern void wiic_motion_sensing(struct wiimote_t* wm, int status);
54WIIC_EXPORT extern int wiic_read_data(struct wiimote_t* wm, byte* buffer, unsigned int offset, unsigned short len);
55WIIC_EXPORT extern int wiic_write_data(struct wiimote_t* wm, unsigned int addr, byte* data, byte len);
56WIIC_EXPORT extern void wiic_status(struct wiimote_t* wm);
57WIIC_EXPORT extern struct wiimote_t* wiic_get_by_id(struct wiimote_t** wm, int wiimotes, int unid);
58WIIC_EXPORT extern int wiic_set_flags(struct wiimote_t* wm, int enable, int disable);
59WIIC_EXPORT extern float wiic_set_smooth_alpha(struct wiimote_t* wm, float alpha);
60WIIC_EXPORT extern void wiic_set_orient_threshold(struct wiimote_t* wm, float threshold);
61WIIC_EXPORT extern void wiic_resync(struct wiimote_t* wm);
62WIIC_EXPORT extern void wiic_set_accel_threshold(struct wiimote_t* wm, int threshold);
63WIIC_EXPORT extern void wiic_update_timestamp(struct wiimote_t* wm);
64
65/* connect.c */
66WIIC_EXPORT extern int wiic_find(struct wiimote_t** wm, int max_wiimotes, int timeout);
67WIIC_EXPORT extern int wiic_load(struct wiimote_t** wm);
68WIIC_EXPORT extern int wiic_connect(struct wiimote_t** wm, int wiimotes, int autoreconnect);
69WIIC_EXPORT extern int wiic_connect_single(struct wiimote_t* wm, char* address, int autoreconnect);
70WIIC_EXPORT extern void wiic_disconnect(struct wiimote_t* wm);
71
72/* events.c */
73WIIC_EXPORT extern int wiic_poll(struct wiimote_t** wm, int wiimotes);
74
75/* ir.c */
76WIIC_EXPORT extern void wiic_set_ir(struct wiimote_t* wm, int status);
77WIIC_EXPORT extern void wiic_set_ir_vres(struct wiimote_t* wm, unsigned int x, unsigned int y);
78WIIC_EXPORT extern void wiic_set_ir_position(struct wiimote_t* wm, enum ir_position_t pos);
79WIIC_EXPORT extern void wiic_set_aspect_ratio(struct wiimote_t* wm, enum aspect_t aspect);
80WIIC_EXPORT extern void wiic_set_ir_sensitivity(struct wiimote_t* wm, int level);
81
82/* nunchuk.c */
83WIIC_EXPORT extern void wiic_set_nunchuk_orient_threshold(struct wiimote_t* wm, float threshold);
84WIIC_EXPORT extern void wiic_set_nunchuk_accel_threshold(struct wiimote_t* wm, int threshold);
85
86/* speaker.c */
87WIIC_EXPORT extern void wiic_set_speaker(struct wiimote_t* wm, int status);
88WIIC_EXPORT extern void wiic_mute_speaker(struct wiimote_t* wm, int status);
89WIIC_EXPORT extern void wiic_sound(struct wiimote_t* wm);
90
91/* motionplus.c */
92WIIC_EXPORT extern void wiic_set_motion_plus(struct wiimote_t* wm, int status);
93WIIC_EXPORT extern void wiic_calibrate_motion_plus(struct motion_plus_t* mp);
94WIIC_EXPORT extern void wiic_set_mp_threshold(struct wiimote_t* wm, int threshold);
95
96#ifdef __cplusplus
97}
98#endif
Note: See TracBrowser for help on using the repository browser.