1
0
Fork 0

[Core] ChibiOS fix O3 and LTO breakage of extra keys and joystick (#12819)

This commit is contained in:
Stefan Kerkmann 2021-06-07 07:16:55 +02:00 committed by GitHub
parent 415dd21206
commit 49fd3c0760
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 35 deletions

View file

@ -272,7 +272,8 @@ static void send_extra(uint8_t report_id, uint16_t data) {
last_id = report_id;
last_data = data;
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};
if (usbInterruptIsReadyShared()) {
usbSetInterruptShared((void *)&report, sizeof(report_extra_t));
}