-
Notifications
You must be signed in to change notification settings - Fork 35
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
implement the embedded-hal traits and ... #81
Comments
@japaric I'll try this next week. Will play around and try to understand the framework this week |
@tekjar Please CC me on your work for this. I'd be happy to help review it. |
@tekjar 👍. I believe that @brandonedens was also going to look into this after tackling rust-embedded/svd2rust#107. You might want to let the other know when you start working on this you don't both end up doing the same work. |
I can confirm that it compiles in debug and release mode. |
@brandonedens Thanks a lot for this. Build works for me after adding below lines to
Set
or else I'm facing this error
Unfortunately |
Is anyone working on SPI support? I have tried to take a stab at it, copying most of the implementation from The trouble I'm having is that the initialization is subtly different between |
@nordmoen I got this working few days back but couldn't structure it well due to lack of time https://github.com/tekjar/f3/blob/spi/src/spi.rs |
Thanks @tekjar I tried with your initialization and now I'm able to communicate! I'll take a stab at creating a |
So I have tried to implement support for the Edit: |
@nordmoen Awesome :). Do you have plans for working on accelerometer as well? |
@tekjar Thanks =]. I'll have a look at it, however, since |
@nordmoen I'll try to work on it after your spi pull request |
I still have some questions for the SPI portion of the code. There should be 2 SPI interfaces on the F3Discovery, but the the two Unrelated to the above, I was wondering how I can get the gyroscope interrupt to function. I think I'm doing everything correct on the sensor side, but I can't figure out how to set it up within the RTFMv2 framework. I have tried the following to enable interrupt on Line0 selecting // Enable interrupt from Gyroscope
p.SYSCFG.exticr1.write(|w| unsafe {
w.exti0().bits(0x04)
});
p.EXTI.imr1.write(|w| w.mr0().set_bit());
p.EXTI.rtsr1.write(|w| w.tr0().set_bit()); |
Btw, v0.2 of this crate had support for both the gyro and the accelerometer. You can look at the code of that release for guidance. I haven't tried to use the gyroscope interrupt feature or the EXTI* stuff so I can't comment on that. Also, it's fine to send a PR with gyro API and a single (not generic) SPI API. We can make it generic later. |
I have I just wanted to test for my self that I understood the interrupt mechanics of the RTFMv2 framework before submitting. The only thing left I think is to properly scale the measurements according to the sensitivity. |
This has been done in v0.5.0 |
make implementations like
Serial
generic around the USART peripheral instance. Basically do the same thing that the blue-pill does.I don't think I'm going to have time to do this myself. So tagging as help-wanted.
cc @brandonedens @Susurrus maybe one of you is interested in tackling this?
The text was updated successfully, but these errors were encountered: