Shop OBEX P1 Docs P2 Docs Learn Events
No addpins in Flexbasic? — Parallax Forums

No addpins in Flexbasic?

It seems FlexBasic doesn't know what addpins is , so I have to set every pins individually.

Is there any equivalent? (or am I blind enough to not see it?) If no... this is the feature request. Addpins for p2 not only makes pin setting faster, but, what is more important, does this in the same time for more than one pins

Of course inline asm can do this but it would be a good thing to have this in FlexBasic.

Comments

  • AribaAriba Posts: 2,682

    The equivalent is: + (npins<<6) while npins is the number of pins to add. Not sure if the parentheses are needed or not in Basic,
    in Spin they are not needed.
    For example:

                wrpin(pi_tx + (2<<6), P_ASYNC_TX + P_OE)
    

    Andy

Sign In or Register to comment.