-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RPiGPIOMex: Remove sysmode support, rewrite wait-for-trigger.
Waiting for trigger only worked in sysmode as non-root, whereas almost everything else useful needed gpiomode. Lets get rid of this mess. The wait for trigger function was rewritten into a simple polling loop that waits for a low->high transition, aka raising edge, with one poll every ~200 microseconds. Now we don't need sysmode anymore and remove all support code. We always use GPIO mode. This needs either 'sudo octave' for root, or as a better solution, needs the user to be part of the gpio Unix user group, something done automatically when a user runs PsychLinuxConfiguration() during initial setup of their account on the RPi. -> Can always operate all functionality as normal non-root user. -> RaspberryPiGPIODemo.m adapted accordingly. Note this still depends on the deprecated libwiringPi library.
- Loading branch information
Showing
2 changed files
with
101 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters