Help with Spin code
jime
Posts: 4
I am new at programming with Spin. I am looking at K W Agyeman's Half Duplex Communication Engine from the OBEX. What does the following code do?
if(!RXPin)
dira[RXPin] := outa[RXPin] := 0
if(!RXPin)
dira[RXPin] := outa[RXPin] := 0
Comments
...which sets the pin to input state (first line) and clears the output bit (second line) for that pin.
No, I don't actually have a Captain Obvious costume. But I know a lot of pro cosplayers and I work in Hollywood -- I could have one any time I want! It would of course be Propeller powered.
Now the comments in the EngineStart method make sense. As a beginner, I prefer your coding style.
Jime
A program serves two purposes: 1) to instruct the controller, and 2) to inform other programmers. We can handle #2 with comments, but I prefer to write obvious code the documents itself.