Zpuino and access to ports


Recommended Posts

Yes, it is possible, but only as long as the sequence fits in 32-bits.


outputRegisterForPin(pinNumber) will get you the register for that pin block, and it's 32-bits. So outputRegisterForPin(0) will return the register for the 0-31 pins, outputRegisterForPin(32) for pins 32-63, so on.

register_t bank0 = outputRegisterForPin(0);// All outputs to ones.bank0 = 0xffffffff;// read all inputsunsigned values = bank0;


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.