27 #define WII_FLAG_MOTION_PLUS_CONNECTED 0x01
28 #define WII_FLAG_NUNCHUCK_CONNECTED 0x02
30 #define wii_check_flag(flag) (wii_event_flag & (flag))
31 #define wii_set_flag(flag) (wii_event_flag |= (flag))
32 #define wii_clear_flag(flag) (wii_event_flag &= ~(flag))
373 return (wiiState & 0x08);
402 bool activeConnection;
406 uint8_t wii_event_flag;
408 uint32_t ButtonState;
409 uint32_t OldButtonState;
410 uint32_t ButtonClickState;
411 uint16_t hatValues[4];
413 uint8_t HIDBuffer[3];
415 uint16_t stateCounter;
416 bool unknownExtensionConnected;
417 bool extensionConnected;
419 bool motionPlusInside;
422 uint8_t control_scid[2];
423 uint8_t control_dcid[2];
424 uint8_t interrupt_scid[2];
425 uint8_t interrupt_dcid[2];
428 void HID_Command(uint8_t* data, uint8_t nbytes);
429 void setReportMode(
bool continuous, uint8_t mode);
431 void writeData(uint32_t offset, uint8_t size, uint8_t* data);
432 void initExtension1();
433 void initExtension2();
435 void statusRequest();
437 void readData(uint32_t offset, uint16_t size,
bool EEPROM);
438 void readExtensionType();
441 void checkMotionPresent();
442 void initMotionPlus();
443 void activateMotionPlus();
448 bool activateNunchuck;
449 bool motionValuesReset;
453 uint8_t batteryLevel;
457 void enableIRCamera1();
458 void enableIRCamera2();
459 void writeSensitivityBlock1();
460 void writeSensitivityBlock2();
461 void write0x08Value();
462 void setWiiModeNumber(uint8_t mode_number);
464 uint16_t IR_object_x1;
465 uint16_t IR_object_y1;
466 uint8_t IR_object_s1;
467 uint16_t IR_object_x2;
468 uint16_t IR_object_y2;
469 uint8_t IR_object_s2;
470 uint16_t IR_object_x3;
471 uint16_t IR_object_y3;
472 uint8_t IR_object_s3;
473 uint16_t IR_object_x4;
474 uint16_t IR_object_y4;
475 uint8_t IR_object_s4;
double getNunchuckPitch()
void setLedToggle(LEDEnum a)
void setLedRaw(uint8_t value)
uint8_t getAnalogHat(HatEnum a)
void ACLData(uint8_t *ACLData)
uint8_t getBatteryLevel()
WII(BTD *p, bool pair=false)
bool getButtonClick(ButtonEnum b)
bool wiiUProControllerConnected
bool getButtonPress(ButtonEnum b)