[BUG] Found an error on pio_usb_host.c
Closed this issue · 1 comments
luisibalaz commented
So I was playing around with that file given that I'm writing an xinput USB host implementation for the Pico, when I found a bug.
It looks like it is a typo, it is on line 851 (request_length
is declared on line 849):
https://github.com/sekigon-gonnoc/Pico-PIO-USB/blob/main/src/pio_usb_host.c#L851
uint16_t request_length =
get_configuration_descriptor_request.length_lsb |
(get_configuration_descriptor_request.index_msb << 8); // <- HERE, that *index_msb* should be *length_msb*
It should say:
uint16_t request_length =
get_configuration_descriptor_request.length_lsb |
(get_configuration_descriptor_request.length_msb << 8);
It is a minor typo, but generates wrong information.
soulfish5 commented
@luisibalaz thanks for this! I ran into this problem a few months back when I was porting a driver from the PICOs USB to PIO.