Fix problem with no_std deployments.#16
Conversation
bit-reverse has a default feature that enables std. To make it work with no_std, remove the default features.
|
Thanks! I’ll give this a merge once I’m at a machine again.
Have you given it a try or did you just find that while browsing through the code?
… On Apr 9, 2019, at 11:28 PM, Tim Boldt ***@***.***> wrote:
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.
You can view, comment on, or merge this pull request online at:
#16
Commit Summary
Fix problem with no_std deployments.
File Changes
M Cargo.toml (2)
Patch Links:
https://github.com/RandomInsano/pscontroller-rs/pull/16.patch
https://github.com/RandomInsano/pscontroller-rs/pull/16.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
|
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. |
|
I own something very similar from Amazon and it worked just fine... What value pull-up resistor are you using on the ATT line?
I dug into some of your repos and you’ve done this sort of thing before... I’ve also had to dumb down the baud rate before, but I’m not sure if that’s due to interference (lack of Sony’s ferrite bead) or something else.
Regards,
Edwin
… On Apr 15, 2019, at 8:37 PM, Tim Boldt ***@***.***> wrote:
Lynxmotion PS2 V4
|
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. |
|
Alright! Got a chance to sit down and test and can confirm things are working great! I ran through the 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! |
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.