Part of the issue is that the interface parameter check is now run against each candidate interface and if it doesn't match, the loop is exited. This PR changes this so that the loop continues if the parameters do not match expectations so that it's possible for a subsequent interface to be found.
With this change in place my board (1 row, 3 button, 1 knob) still fails to upload with this error:
No valid interface/endpoint combination found!
This caused by another change of logic in e360b93. Previously the endpoint descriptor was found using the value passed by the developer options or the first one was used if that was not supplied:
let endpt_desc = if let Some(endpoint_address) = options.devel_options.endpoint_address {
endpt_descs
.find(|d| d.address() == endpoint_address)
.ok_or_else(|| anyhow!("endpoint with address {} not found", endpoint_address))?
} else {
endpt_descs
.exactly_one()
.map_err(|_| {
anyhow!(indoc!(
"single interrupt endpoint is expected, got:
{:#?}
You may try to choose one using --endpoint-address"
), intf_desc.endpoint_descriptors().format("\n"))
})?
};
Now the endpoint address defaults to 4 if not supplied, which does not match my board which uses this decriptor (address 2):
This partially addresses #50
The regression in was introduced in e360b93. In that commit the code was changed from using a fixed interface number of 1:
to looping over all the interfaces.
Part of the issue is that the interface parameter check is now run against each candidate interface and if it doesn't match, the loop is exited. This PR changes this so that the loop continues if the parameters do not match expectations so that it's possible for a subsequent interface to be found.
With this change in place my board (1 row, 3 button, 1 knob) still fails to upload with this error:
This caused by another change of logic in e360b93. Previously the endpoint descriptor was found using the value passed by the developer options or the first one was used if that was not supplied:
Now the endpoint address defaults to 4 if not supplied, which does not match my board which uses this decriptor (address 2):
I can successfully program my board if I the changes in this PR are applied and I pass
--endpoint-address 2
.