xpertsavenue/WiringOP-Zero

pinModeAlt not working (fixed)

Opened this issue · 1 comments

For any poor sods trying to use pinModeAlt and finding it to be broken, this is because the developer simply couldn't be arsed to make it work, and instead opted for the "brute force" approach of making the function a complete no-op when running on a Banana or Orange Pi.

This, of course, leaves all the poor saps (like me) who bought an Orange instead of a Raspberry without any method whatsoever to set the pins back to (e.g) ALT5 after setting them to IN or OUT. An endeavour which caused me much frustration, and cost me the best part of two days to solve.

Incidentally, the solution required the addition of ONE line of code. Why didn't the dev just do that? Your guess is as good as mine.

You can find a working version here in my fork. You're welcome.

I used your fix and put it in my PR with other changes.