PortRead/developers
From Wiring
< PortRead
|
|
This page is intended as a reference for core developers only, and the content is only changed after a consensus has been reached through discussion of any such changes. Please use the Discussion page to talk about any changes or issues you have with the current implementation. |
| Classification | Digital Port Function |
|---|---|
| Suggested location | WDigital.h |
| C++ required | No |
| Timing constraints | None |
| Version introduced | 1.0 (0100) |
| Framework dependencies | None |
| Prototype(s) | uint8_t portRead(uint8_t) |
| Required? | Yes |
| Issues | None |
Contents |
Description
The portRead() function/method returns the digital input value read from the provided port number.
Black Box Input
The port number is provided.
Black Box Output
If possible, the digital value of the input port is read and returned, as either HIGH for a digital "high" value, and LOW for a digital "low" value.
Overloading
None. Single signature only.
Notes
The Atmel AVR8Bit core uses look-up tables to translate the input pin to a port number and a port bit value.