24 #define PSBUZZ_VID 0x054C // Sony Corporation
25 #define PSBUZZ_PID 0x1000 // PS Buzz Controller
35 } __attribute__((packed))
btn[4];
37 } __attribute__((packed));
67 pFuncOnInit = funcOnInit;
82 bool getButtonPress(
ButtonEnum b, uint8_t controller = 0);
83 bool getButtonClick(
ButtonEnum b, uint8_t controller = 0);
95 void setLedRaw(
bool value, uint8_t controller = 0);
99 for (uint8_t i = 1; i < 4; i++)
109 setLedRaw(
false, controller);
115 for (uint8_t i = 1; i < 4; i++)
125 setLedRaw(
true, controller);
133 setLedRaw(!ledState[controller], controller);
146 void ParseHIDData(
USBHID *hid,
bool is_rpt_id, uint8_t len, uint8_t *buf);
153 uint8_t OnInitSuccessful();
158 psbuzzButtons.val = 0;
159 oldButtonState.val = 0;
160 buttonClickState.val = 0;
161 for (uint8_t i = 0; i <
sizeof(ledState); i++)
172 virtual bool VIDPIDOK(uint16_t vid, uint16_t pid) {
178 void (*pFuncOnInit)(void);
180 void PSBuzz_Command(uint8_t *data, uint16_t nbytes);
182 PSBUZZButtons psbuzzButtons, oldButtonState, buttonClickState;
void setLedToggle(uint8_t controller=0)
void attachOnInit(void(*funcOnInit)(void))
virtual bool VIDPIDOK(uint16_t vid, uint16_t pid)
void setLedOff(uint8_t controller=0)
void setLedOn(uint8_t controller=0)