I would like to read multiple pins at once in Arduino Due via registers just like PINB, PINC, PIND of the arduino uno. I know that the pins will be scattered to multiple registers, but i deduce it would still be faster this way since there for sure there will be multiple pins on a single register rather than call digitalRead 40 times.
Arduino shared the documentation for what digital/analog pins corressponds to the what ports to the actual sam chip, i just need that snippet of code that reads via registers.
So if any can give me the equivalents to these, It would be greatly appreciated:
- DDRx - The Port C Data Direction Register - read/write
- PORTx - The Port C Data Register - read/write
- PINx - The Port C Input Pins Register - read only