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

Fix problem with no_std deployments. #16

Merged
merged 1 commit into from
Apr 21, 2019
Merged

Fix problem with no_std deployments. #16

merged 1 commit into from
Apr 21, 2019

Conversation

timboldt
Copy link
Contributor

bit-reverse has a default feature that enables std. To make it work with no_std, this removes the default features, as described in the bit-reverse README file.

bit-reverse has a default feature that enables std. To make it work with no_std, remove the default features.
@RandomInsano
Copy link
Owner

RandomInsano commented Apr 14, 2019 via email

@timboldt
Copy link
Contributor Author

I gave it a try and it allowed my code to compile and run on my Blue Pill (STM32F103) with the embedded-hal.

I then tested with my Lynxmotion PS2 V4 controller and ran into issues with the controller not being recognized. However, I think my problem was independent of the change in this PR. I looked at the SPI bus with a logic analyzer, and saw 0x01 0x42 on the CMD, but no response on DATA. I think the problem is how I had the ATT pin set up.

@RandomInsano
Copy link
Owner

RandomInsano commented Apr 17, 2019 via email

@timboldt
Copy link
Contributor Author

What value pull-up resistor are you using on the ATT line?

I believe that's exactly where I went wrong. I'm so used to consumer I2C devices, which all include at least a vaguely acceptable pull-up resistor, that it never occurred to me to add one.

@RandomInsano
Copy link
Owner

Alright! Got a chance to sit down and test and can confirm things are working great! I ran through the playstation example and notice that my cheap wireless knockoff special updated its state far slower than a wired controller would have (about once per second).

As far as the pull-up resistor, I'm using 1KΩ and it's working well up to 100KHz. I think when I checked the PS2 using a simple voltage divider circuit it was something much lower like 250Ω, but don't hold me to that. :)

Thanks again for catching that feature flag. I need to figure out an easy way to make sure no_std really means no_std while I'm doing testing on the Pi. Let me know how it ends up working out, and if you've got any ideas for issue #13!

@RandomInsano RandomInsano merged commit 915ae5d into RandomInsano:master Apr 21, 2019
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

Successfully merging this pull request may close these issues.

2 participants