|
|
|
|
@ -903,7 +903,8 @@ static void send_extra(uint8_t report_id, uint16_t data) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
report_extra_t report = {.report_id = report_id, .usage = data};
|
|
|
|
|
static report_extra_t report;
|
|
|
|
|
report = (report_extra_t){.report_id = report_id, .usage = data};
|
|
|
|
|
|
|
|
|
|
usbStartTransmitI(&USB_DRIVER, SHARED_IN_EPNUM, (uint8_t *)&report, sizeof(report_extra_t));
|
|
|
|
|
osalSysUnlock();
|
|
|
|
|
@ -1051,11 +1052,11 @@ void virtser_task(void) {
|
|
|
|
|
#ifdef JOYSTICK_ENABLE
|
|
|
|
|
|
|
|
|
|
void send_joystick_packet(joystick_t *joystick) {
|
|
|
|
|
joystick_report_t rep = {
|
|
|
|
|
static joystick_report_t rep;
|
|
|
|
|
rep = (joystick_report_t) {
|
|
|
|
|
# if JOYSTICK_AXES_COUNT > 0
|
|
|
|
|
.axes =
|
|
|
|
|
{
|
|
|
|
|
joystick->axes[0],
|
|
|
|
|
{ joystick->axes[0],
|
|
|
|
|
|
|
|
|
|
# if JOYSTICK_AXES_COUNT >= 2
|
|
|
|
|
joystick->axes[1],
|
|
|
|
|
@ -1076,8 +1077,7 @@ void send_joystick_packet(joystick_t *joystick) {
|
|
|
|
|
# endif // JOYSTICK_AXES_COUNT>0
|
|
|
|
|
|
|
|
|
|
# if JOYSTICK_BUTTON_COUNT > 0
|
|
|
|
|
.buttons =
|
|
|
|
|
{
|
|
|
|
|
.buttons = {
|
|
|
|
|
joystick->buttons[0],
|
|
|
|
|
|
|
|
|
|
# if JOYSTICK_BUTTON_COUNT > 8
|
|
|
|
|
|