Digistump Forums
The Digispark => Digispark Libraries => Topic started by: ricardojlrufino on October 28, 2014, 10:01:30 pm
-
I wonder how do I increase the number of buttons, I need 32.
I tried to move on DigiJoystick.h gcn64_usbHidReportDescriptor, but I could not work.
A library is like this:
https://www.pjrc.com/teensy/td_joystick.html
thanks
-
Please add this method
void setButtons(unsigned long buttons) {
last_built_report[8] = (int)((buttons >> 8) & 0XFF);
last_built_report[9] = (int)((buttons & 0XFF));
}
/*
for 32
void setButtons(unsigned long buttons) {
// last_built_report[6] = (int)((buttons >> 24) & 0xFF);
// last_built_report[7] = (int)((buttons >> 16) & 0xFF);
// last_built_report[8] = (int)((buttons >> 8) & 0XFF);
// last_built_report[9] = (int)((buttons & 0XFF));
}*/
-
Did this work? Were you able to increase the number of buttons to 32?