-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Phasing out most Linux drivers #971
Comments
I don't expect to actually remove anything until RPi7 gets produced. We can hard-code the build systems to select SPIDEV despite the presence of other needed libraries. This should be the least breaking approach we can do to dissuade users from selecting other (seemingly unreliable) drivers. |
in preparation for #971 - affects CMake and configure scripts - adds warnings to docs with reference to #971 - removes docs' note about pigpio needed for IRQ support - fix cross-links in docs (probably a doxygen v1.10.0 difference) * set doxygen favicon * don't override user input about RF24_DRIVER in cmake when not using an env var to set RF24_DRIVER
also defaults RF24_DRIVER to SPIDEV (per nRF24/RF24#971)
also defaults RF24_DRIVER to SPIDEV (per nRF24/RF24#971)
* mesh.checkConnection via parent not master - Adjust mesh.checkConnection function to verify connectivity with parent only. Leave old functionality in place with a #define - Suggestions in place per @2bndy5 closes #249 * Fix last commit - _nodeID not nodeID * review changes * trigger compile size reports for PRs Specifically for PRs that only change the lib src code and not examples. * doc review use doxygen references * [docs] clarify return value of checkConnection() * format RF24Mesh.h Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * review supported CMake options also defaults RF24_DRIVER to SPIDEV (per nRF24/RF24#971) * add reference to new config macro in checkConnection() doc. --------- Co-authored-by: Brendan <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* mesh.checkConnection via parent not master - Adjust mesh.checkConnection function to verify connectivity with parent only. Leave old functionality in place with a #define - Suggestions in place per @2bndy5 closes #249 * Fix last commit - _nodeID not nodeID * review changes * trigger compile size reports for PRs Specifically for PRs that only change the lib src code and not examples. * doc review use doxygen references * [docs] clarify return value of checkConnection() * format RF24Mesh.h Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * review supported CMake options also defaults RF24_DRIVER to SPIDEV (per nRF24/RF24#971) * add reference to new config macro in checkConnection() doc. --------- Co-authored-by: Brendan <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
I see you haven't had a lot of feedback on this yet. I have just stumbled into this library today specifically because of the BCM2835 driver support and needing ultra low latency access to an nRF24 to achieve 160us round trip times from reading RX FIFO to writing to the TX FIFO. This has proven impossible with spidev/ioctl calls. It would be a shame to see direct BCM2835 support dropped while any hardware that supports it remains available for purchase. |
In my experience, the SPIDEV driver is noticeably faster than the RPi driver (using BCM2835) when running examples in hardware tests. Maybe the radio settings used in the examples affect this observation? There are other quirks about the BCM2835 library that we cannot control. For example, the BCM2835 lib will "own" the I2C bus when it is used to initialize an SPI bus, and certain pins other than CEx pins (like I2S pins) are set HIGH unexpectedly as well. Controlling a secondary SPI bus' CS pin(s) with the BCM2835 lib isn't the same as controlling the primary SPI bus' CS pin(s), which results in bloated code or unexpected behavior (like not able to share a secondary SPI bus with multiple SPI peripherals). Again, the BCM2835 lib's days are numbered; there is no way to get that lib working on a RPi5 (and likely future RPi models) because RPi hardware design changed so significantly in RPi5. The main problem here is maintainability and compatibility. Maintaining 1 Linux driver instead of a multitude (whose source code we cannot control) is a big 👍🏼. Its hard enough to maintain the SPIDEV driver because the Linux kernel docs are famously not helpful, but at least we don't have to worry about what hardware is support with the Linux kernel. This issue is actually part of our project named "RF24 v2.0 ideas". So, when we address it, there will be a major version bump to signify breaking changes. History
The main reason there were so many different driver implementations (for GPIO and SPI access) is because the Linux kernel's "sys fs" interface was woefully inadequate. Now that we have migrated to the Linux kernel's "char dev" interface, there is no reason to use any other driver library; it works fast on any Linux (not just RPi OS). We don't even require libgpiod installed (which isn't pre-installed on most Linux OS distros) since it just wraps around the Linux kernel's char dev interface. |
I'm of the opinion that all but SPIDEV should be phased out.
Originally posted by @2bndy5 in #969 (comment)
The text was updated successfully, but these errors were encountered: