#include
#include
#include
#include "definitions.h"
#include "wiiuse_internal.h"
#include "dynamics.h"
#include "events.h"
#include "nunchuk.h"
Functions |
|
static void | nunchuk_pressed_buttons (struct nunchuk_t *nc, byte now) |
Find what buttons are pressed. |
|
int | nunchuk_handshake (struct wiimote_t *wm, struct nunchuk_t *nc, byte *data, unsigned short len) |
Handle the handshake data from the nunchuk. |
|
void | nunchuk_disconnected (struct nunchuk_t *nc) |
The nunchuk disconnected. |
|
void | nunchuk_event (struct nunchuk_t *nc, byte *msg) |
Handle nunchuk event. |
|
void | wiiuse_set_nunchuk_orient_threshold (struct wiimote_t *wm, float threshold) |
Set the orientation event threshold for the nunchuk. |
|
void | wiiuse_set_nunchuk_accel_threshold (struct wiimote_t *wm, int threshold) |
Set the accelerometer event threshold for the nunchuk. |
void nunchuk_disconnected | ( | struct nunchuk_t * | nc | ) |
The nunchuk disconnected.
nc | A pointer to a nunchuk_t structure. |
void nunchuk_event | ( | struct nunchuk_t * | nc, | |
byte * | msg | |||
) |
Handle nunchuk event.
nc | A pointer to a nunchuk_t structure. | |
msg | The message specified in the event packet. |
int nunchuk_handshake | ( | struct wiimote_t * | wm, | |
struct nunchuk_t * | nc, | |||
byte * | data, | |||
unsigned short | len | |||
) |
Handle the handshake data from the nunchuk.
nc | A pointer to a nunchuk_t structure. | |
data | The data read in from the device. | |
len | The length of the data block, in bytes. |
static void nunchuk_pressed_buttons | ( | struct nunchuk_t * | nc, | |
byte | now | |||
) | [static] |
Find what buttons are pressed.
nc | Pointer to a nunchuk_t structure. | |
msg | The message byte specified in the event packet. |
void wiiuse_set_nunchuk_accel_threshold | ( | struct wiimote_t * | wm, | |
int | threshold | |||
) |
Set the accelerometer event threshold for the nunchuk.
wm | Pointer to a wiimote_t structure with a nunchuk attached. | |
threshold | The decimal place that should be considered a significant change. |
void wiiuse_set_nunchuk_orient_threshold | ( | struct wiimote_t * | wm, | |
float | threshold | |||
) |
Set the orientation event threshold for the nunchuk.
wm | Pointer to a wiimote_t structure with a nunchuk attached. | |
threshold | The decimal place that should be considered a significant change. |