|Top Previous Next|
Gets or sets the direction (input or output) of each port pin.
A bit mask identifying the port pins that are outputs.
Setting a bit of the direction property to 1 makes the corresponding port pin an output. Setting the bit to zero makes the pin an input.
Each port pin has a corresponding bit value, as shown in the table:
To set pins as outputs, OR together their corresponding bit values and assign the result to direction.
When a pin is set as an input, a pull-up resistor can be enabled. This is set with the pullup property.