Comments (8)
Thanks for the quick reply. Ill be watching and give a test when I see it come through
from rppal.
Thanks for the question! Currently RPPAL only implements the "proven" embedded-hal traits. For the GPIO module that would be digital::OutputPin
and PwmPin
for OutputPin
and IoPin
.
The remaining GPIO related traits are all unproven
traits, unless I missed one by mistake. Initially I was hesitant to implement those, since they don't follow semver rules and could introduce breaking changes even in patch releases. However, since many of them make sense to add support for, I've decided to put them behind an additional opt-in feature flag as part of the 0.11.2 release that's currently in development. I'll be starting on those after I'm finished with the UART module, likely in the next week or so.
from rppal.
@jacobrosenthal I've implemented all unproven
embedded-hal traits for Pin
, InputPin
, OutputPin
and IoPin
where applicable, on the master branch. Feel free to give them a try by enabling the hal-unproven
feature flag.
I still need to go through the other peripherals, as well as add generic delay/rng implementations, but this should help you with your project.
from rppal.
The input pin is working for my uses
https://github.com/jacobrosenthal/rust-bitbang-wiegand
from rppal.
ws-rs was giving me trouble with libc, it wants 0.2.40
https://github.com/housleyjk/ws-rs/blob/master/Cargo.toml#L32
Though I had to drop back the libc version so I could use ws-rs
jacobrosenthal@31c2a6a
How is this thing generally handled in the Rust ecosystem?
from rppal.
Glad to hear the unproven
traits are helpful.
Regarding the libc version, assuming the libc crate follows semver rules, 0.2.50 doesn't contain any breaking changes compared to 0.2.40. The "0.2.40" libc version dependency for ws-rs is equivalent to "^0.2.40", which also matches 0.2.50, so there shouldn't be a need to downgrade rppal's libc dependency. Cargo should be using 0.2.50 for both. What kind of issues/errors did you run into?
from rppal.
error: failed to select a version for `libc`.
... required by package `rppal v0.11.1 (https://github.com/golemparts/rppal.git#f25e302a)`
... which is depended on by `bitbang-wiegand v0.1.0 (https://github.com/jacobrosenthal/rust-bitbang-wiegand.git#0ee1fb23)`
... which is depended on by `littlebird-backend v0.1.0 (/Users/jacobrosenthal/Downloads/access-control-software/backend)`
versions that meet the requirements `^0.2.50` are: 0.2.50
all possible versions conflict with previously selected packages.
previously selected package `libc v0.2.43`
... which is depended on by `rppal v0.11.1`
... which is depended on by `littlebird-backend v0.1.0 (/Users/jacobrosenthal/Downloads/access-control-software/backend)`
from rppal.
I'm not sure what would cause that issue in this situation, unless either littlebird-backend or one of its other dependencies has a strict libc requirement not to go passed 0.2.43. ws-rs requires ^0.2.40, so it should build fine with rppal's ^0.2.50 requirement.
Perhaps the Cargo.lock
for your project was created before you added rppal as a dependency, and it's still pointing to a libc 0.2.43 requirement. Running cargo update
should fix that.
I haven't run into this kind of version conflict before myself, but based on what you've shared, and if the issue isn't caused by an out of date Cargo.lock
, I would look for the source of the conflict in another crate that also depends on libc besides rppal and ws-rs. I suspect you haven't run into issues with ws-rs before, because its ^0.2.40 requirement is compatible with the 0.2.43 requirement of this suspected other crate. You might be able to find the cause by searching your Cargo.lock
file for libc dependencies. cargo tree might make it easier to visualize all the dependencies.
I just built a basic test project that depends on both the current rppal version on GitHub, and the latest ws-rs with all features enabled so libc is included. Cargo selected libc 0.2.50, and I didn't encounter any errors while building the project.
from rppal.
Related Issues (20)
- Syncronous Interrupt hanging HOT 2
- InputPin trait not implemented HOT 1
- Interrupt reading multiple same level edges clarification
- ioctl compile errors for all arm musl targets HOT 3
- Support 1 Wire protocol HOT 1
- PinNotAvailable(): how to drop and reinit pin? HOT 1
- `rppal::gpio::Error` should impl `Serialize`
- Reason for not supporting 10-bit i2c addressing HOT 1
- Error Compiling rppal v0.13.1 HOT 1
- Accessing GPIOs > 54 on BCM2711 causes errors
- Does rppal support non-blocking SPI? HOT 2
- Soft PWM broken in 0.14.0 - subtraction undeflow error HOT 1
- cargo check yields errors after adding to Cargo.toml HOT 3
- GPIO starts fluctating HOT 1
- Set multiple pins at once? HOT 2
- Interrupt service routines for Timers? HOT 1
- is there any clear or clean or cleanup method? HOT 3
- Wrong library. My mistake. HOT 1
- Raspberry Pi5 HOT 53
- Banana Pi M5 support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rppal.