Ok, I feel the need to get on the SoapBox again, because I'm currently working with Swing UI and pin control.
I have made tonnes of mistakes, the stuff I'm refactoring now could be a shiney example of what "not to do". With that said, I think Arduio's following functions were a mistake :
Linux & C from the beginning of time have had
One of Linux & C's success is the simplicity of "everything" having the same capability of reading and writing. They do not have 'special' reads and writes. This is true for 'everything' Linux can see - you can 'read' or 'write' to any device.
Arduino has chosen to create digitalWrite & analogWrite. Why the added complexity ? Shouldn't I just be able to write the appropriate value weather its 1 or 255 ? And why do I need to use the correct PinMode if I'm reading or writing. Isn't the fact that I'm doing one of these functions gif enough information for the pin to put itself in the correct state ?
Imagine the amount of children eaten by Raptors, if Linux did not maintain its wonderful standardization. We need to close the door, is that digitalWrite or analogWrite ? Was the pinmode set ? Gaahhh! Munch Munch Munch....
Perhaps MRL should offer a read & write which hide these complexities ?
I looked up BeagleBoard's pin calls and they do it the 'same' way .. Whyyyyyyy !