Libusbpp
Libusbpp copied to clipboard
Reference endpoints by address, not number.
An endpoint address is made up of two nibbles. The upper nibble specifies the endpoint direction, and the lower nibble is the endpoint number.
libusbpp currently treats endpoint numbers as unique, which is problematic in the case of a bidirectional endpoint (eg addresses 0x04 and 0x84.)
Change the API to reference endpoints by address, not number.
In reality 0x04 and 0x84 are two different endpoint in the context of USB. The only bi-directional endpoint is the control endpoint (usually EP0).