Visible to Intel only — GUID: iga1405563191016
Ixiasoft
Visible to Intel only — GUID: iga1405563191016
Ixiasoft
28.5.2.2. direction Register
The direction register controls the data direction for each PIO port, assuming the port is bidirectional. When bit n in direction is set to 1, port n drives out the value in the corresponding bit of the data register.
The direction register only exists when the PIO core hardware is configured in bidirectional mode. In input-only, output-only and inout mode, the direction register does not exist. In this case, reading direction returns an undefined value, writing direction has no effect. The mode (input, output, inout or bidirectional) is specified at system generation time, and cannot be changed at runtime.
After reset, all direction register bits are 0, so that all bidirectional I/O ports are configured as inputs. If those PIO ports are connected to device pins, the pins are held in a high-impedance state. In bi-directional mode, you will need to write to the direction register to change the direction of the PIO port (0-input, 1-output).