Skip to content

Added interrupt service routine (ISR) support and new pin controllers with change detection#5

Open
spacepope wants to merge 16 commits intomikeclayton:masterfrom
spacepope:master
Open

Added interrupt service routine (ISR) support and new pin controllers with change detection#5
spacepope wants to merge 16 commits intomikeclayton:masterfrom
spacepope:master

Conversation

@spacepope
Copy link
Copy Markdown

Hi there,
nothing happened since a long time.
I continously enhanced the functionality for one of my personal projetcs and possibly should have done a pull request earlier - but hey, better late than never ;-)

So what's new compared to your version:

  • fixed some minor errors on SpiDev
  • added wide support for interrupt service routines (ISR) on PiFace. Short explanation: PiFace connects an internal wire to Raspberry Pi's GPIO25. When enabling PiFace interrupt handling on digital inputs (accessed via GPINTENB), input changes result in a change of GPIO25. So the when registering an interrupt on GPIO25 we can then query PiFace interrupt latch and pin states..
  • added extended pin controllers InputPinController, InputPinGroupController and ButtonInputController with pin change detection.

You can see a small example in the ISRSampleConsole demo project.

Hope that i can make somebody else happy, who ever wants to do that kinda stuff with their PiFace on Mono..

If you have any questions, feel free to ask..

Best regards
Hannes

… unmanaged safe array.

- added lseek method import.
… enabled via constructor and raises an event every time a masked input state changes. (this functionality uses Raspberry Pi ISR on GPIO Pin 25 per default, on which the PiFace connects its ISR signaling line.)
- added InputPinController
- added sample console app for ISR usage
…k and hold actions.

- modified ISR sample to demonstrate ButtonInputController
- added InputPinGroupController (like InputPinController to observe multiple pins via byte mask)
- added IDisposable to PiFaceDevice
…ilehandle writes (gpio utility was only part of WiringPi installation).
@mikeclayton
Copy link
Copy Markdown
Owner

Hey, sorry for not reviewing sooner - I appreciate the work you've put into this PR. Input pin interrupts were something I wanted to try to get working, but I didn't really know where to start so it's great that you've added this functionality.

Raspberry Pi / PiFace was a bit of a hobby while I had the time to play with them but I've had to put it on hold for the last couple of years due to other commitments so I've not really had time to look at this.

I'll leave the PR active, and hopefully one day I'll get around to merging it all!

Thanks again.

Mike

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants