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))
198 pFuncOnInit = funcOnInit;
390 return (wiiState & 0x08);
404 void (*pFuncOnInit)(void);
410 bool activeConnection;
414 uint32_t l2cap_event_flag;
415 uint8_t wii_event_flag;
417 uint32_t ButtonState;
418 uint32_t OldButtonState;
419 uint32_t ButtonClickState;
420 uint16_t hatValues[4];
422 uint8_t HIDBuffer[3];
424 uint16_t stateCounter;
425 bool unknownExtensionConnected;
426 bool extensionConnected;
428 bool motionPlusInside;
431 uint8_t control_scid[2];
432 uint8_t control_dcid[2];
433 uint8_t interrupt_scid[2];
434 uint8_t interrupt_dcid[2];
438 void HID_Command(uint8_t* data, uint8_t nbytes);
439 void setReportMode(
bool continuous, uint8_t mode);
441 void writeData(uint32_t offset, uint8_t size, uint8_t* data);
442 void initExtension1();
443 void initExtension2();
445 void statusRequest();
447 void readData(uint32_t offset, uint16_t size,
bool EEPROM);
448 void readExtensionType();
451 void checkMotionPresent();
452 void initMotionPlus();
453 void activateMotionPlus();
458 bool activateNunchuck;
459 bool motionValuesReset;
463 uint8_t batteryLevel;
467 void enableIRCamera1();
468 void enableIRCamera2();
469 void writeSensitivityBlock1();
470 void writeSensitivityBlock2();
471 void write0x08Value();
472 void setWiiModeNumber(uint8_t mode_number);
474 uint16_t IR_object_x1;
475 uint16_t IR_object_y1;
476 uint8_t IR_object_s1;
477 uint16_t IR_object_x2;
478 uint16_t IR_object_y2;
479 uint8_t IR_object_s2;
480 uint16_t IR_object_x3;
481 uint16_t IR_object_y3;
482 uint8_t IR_object_s3;
483 uint16_t IR_object_x4;
484 uint16_t IR_object_y4;
485 uint8_t IR_object_s4;
double getNunchuckPitch()
void setLedToggle(LEDEnum a)
void setLedRaw(uint8_t value)
uint8_t getAnalogHat(HatEnum a)
virtual void ACLData(uint8_t *ACLData)
uint8_t getBatteryLevel()
virtual void disconnect()
WII(BTD *p, bool pair=false)
bool getButtonClick(ButtonEnum b)
bool wiiUProControllerConnected
void attachOnInit(void(*funcOnInit)(void))
bool getButtonPress(ButtonEnum b)