08-07-2017, 07:21 AM
(This post was last modified: 08-07-2017, 07:49 AM by MarkHaysHarris777.)
(08-07-2017, 12:11 AM)pfeerick Wrote: If I export a pin, and then read the direction parameter, and see that it is "in", and it doesn't work, then I call that a bug, because it is not doing what it says it should be doing. Simple as that.
Except that it IS NOT as simple as that.
... Exporting a pin doesn't set anything. The export only makes the pad available in user space; that's all, exporting alone is not a complete operation, and as incomplete it alone does not guarantee anything about the state of the pin nor the direction, nor the pullup|pulldown. You must also set the direction and if input set the pull, and if output set the value; with the /sys/class/gpio/ method it really is as complicated as that on the PineA64.
Now then, if you don't want to do the complete operation, well that's fine; except that it won't work -- simple as that.
Note: I do understand 'what' everyone believes export "should" accomplish, and I certainly also believe that it should be possible to guarantee the default operation of an exported pad; however, my personal 'reality' is that it is more important to help users understand the complete operation rather than arguing over what 'should' be happening. At the end of the day, do you want the pad to work or not ?? That's the simple question you need to answer for yourself.
marcushh777
please join us for a chat @ irc.pine64.xyz:6667 or ssl irc.pine64.xyz:6697
( I regret that I am not able to respond to personal messages; let's meet on irc! )
please join us for a chat @ irc.pine64.xyz:6667 or ssl irc.pine64.xyz:6697
( I regret that I am not able to respond to personal messages; let's meet on irc! )