Skip to content

Conversation

@2bndy5
Copy link
Member

@2bndy5 2bndy5 commented Mar 11, 2024

  • uses Linux Kernel's Character Device v2 ABI instead of the deprecated v1 ABI
  • caches the File Descriptors used to control GPIO pins
@2bndy5
Copy link
Member Author

2bndy5 commented Mar 11, 2024

I still want to test the caching of FDs. Specifically,

  • does not break other apps that use the same /dev/gpiochipX when RF24 app is running
  • still works when dynamically init-ing pins with RF24::begin() instead of c'tor

I'm opening this PR as the solution for #943 will be separate from these changes implemented for non-IRQ GPIO usage.

@2bndy5 2bndy5 marked this pull request as ready for review March 12, 2024 22:49
Copy link
Member

@TMRh20 TMRh20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested everything, but looks like you've been thorough.

Works like a charm!

The new install script with automated selection for branches is prettynice to have now too for testing stuff.

This should allow for easier code reuse when implementing a similar cache for interrupts
@2bndy5
Copy link
Member Author

2bndy5 commented Mar 13, 2024

The new install script with automated selection for branches is prettynice to have now too for testing stuff.

I think it would be helpful to have it git pull --rebase after git checkout <branch/tag>. That way you don't have to contend with installing from branches that are already checked out locally but have force-pushed updates on the remote.


Anyway. Yeah, I'm ready to merge this and move on to #943. I've been testing it pretty thoroughly (even in my local pyRF24 cloned repo).

@2bndy5 2bndy5 merged commit 05efe34 into master Mar 13, 2024
@2bndy5 2bndy5 deleted the char-dev-v2-ABI branch March 13, 2024 10:46
@TMRh20
Copy link
Member

TMRh20 commented Mar 13, 2024

Cool, been running this on all my RPis overnight as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants