Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR 185 from 2.0 #10

Closed
Lauszus opened this issue Nov 18, 2015 · 5 comments
Closed

PR 185 from 2.0 #10

Lauszus opened this issue Nov 18, 2015 · 5 comments

Comments

@Lauszus
Copy link
Collaborator

Lauszus commented Nov 18, 2015

We need to make the same fix as in PR: https://github.com/felis/USB_Host_Shield_2.0/pull/185/files.

A quick search shows the relevant files: https://github.com/felis/UHS30/search?utf8=%E2%9C%93&q=epAttribs. I recommend never setting epAttribs explicit to zero, as this will cause bugs if bmNakPower is already set.

@felis
Copy link
Owner

felis commented Nov 18, 2015

hold on on this till the next week. I'm building a permanent test setup so that any fix can be checked quickly against the real gear. It will be a linux machine with several arduino/shield combos always connected. The hardware for the box will arrive Friday, I'll put it online over the weekend.

@Lauszus
Copy link
Collaborator Author

Lauszus commented Nov 18, 2015

@felis sounds awesome! Looking forward to the blog post :)

@xxxajk
Copy link
Collaborator

xxxajk commented Feb 16, 2018

Been a long time for me to actually look into this, and....

Does not apply!

bmNakPower is never cleared or set by the driver code.

Attributes are only reset in the proper places within the core enumeration code and bmNakPower is always set correctly after the clearing of the toggles.

Setting the attributes to zero is faster and less code than setting each individual member of the union.
1 instruction v.s. 2!

So... closing it, 'tis a non-issue.

@xxxajk xxxajk closed this as completed Feb 16, 2018
@Lauszus
Copy link
Collaborator Author

Lauszus commented Feb 16, 2018

It was an issue for the ACM code: felis/USB_Host_Shield_2.0#184. I just decided to change all of them, so people didn't accidentally clear bmNakPower when copying pasting code around.

@xxxajk
Copy link
Collaborator

xxxajk commented Feb 16, 2018

That's the advantage of having such a thing in one place as on UHS3 ;-) Perhaps UHS2 could use a common inline call instead of having it sprinkled all over the place, so that the order is always correct. That way, any copy/paste won't be an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants