Running the "HID Tests" suite of the USB 3 Command Verifier (USB3CV)
tool resulted in the following error:
(HID: 3.2.61) The report descriptor returned in response to a
GetDescriptor(Report) must be compliant with the HID specification.
Byte Number: 37h ( 55d)
Data Field: 91 02
Mnemonic: Output
Value: (Variable)
Errors: Error: LOGICAL MAX MUST be bounded by Report Size
The error stems from the fact that logical minimum and maximum are
global items, which means that the next item in a report descriptor
inherits the value from the previously set value. In this case the
status leds item inherited the logical minimum (=0) and maximum (=255)
from the keycodes item. As the status leds set a report size of 1 bit,
wich can only hold a boolean, it becomes clear that this range would
never fit.
The fix is straightforward, we just define a appropriate logical maximum
(=1), the mismatch is solved and our keyboard now passes the compliance
tests. Defining the logical minimum is redundant in this case but is
kept to form a logical block.
The code for Helix rev3 boards could not be built with, e.g.,
`CONVERT_TO=rp2040_ce` due to invalid `#include <stdio.h>` in the
keyboard level `config.h` (apparently the AVR version of that file
contains guards against usage in assembly code, which was hiding the
bug). Move `#include <stdio.h>` to the C sources which need it.
Co-authored-by: adophoxia <100170946+adophoxia@users.noreply.github.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: wb-joy <chang.li@westberrytech.com>
Co-authored-by: Joy Lee <joylee.lc@foxmail.com>
Co-authored-by: jack <0x6a73@protonmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Joel Challis <git@zvecr.com>
Previously, if the user tried to use `#define AUDIO_MAX_SIMULTANEOUS_TONES 1` to conserve CPU time, their firmware would fail to build with this error:
```
platforms/chibios/drivers/audio_dac_additive.c:91:73: error: excess elements in array initializer [-Werror]
91 | static float active_tones_snapshot[AUDIO_MAX_SIMULTANEOUS_TONES] = {0, 0};
| ^
```
This also affected the preset `#define AUDIO_DAC_QUALITY_VERY_HIGH`, which called up only one simultaneous tone at 88200 Hz.