3.2.14.2 DIAG_GPIO_InputOutputDirection

Returns the status of the IO_PORTS_DIRECTION diagnostic

This function verifies if a port pin can be configured as input or output.

It performs the following operations:

  1. Configures the port pin as input or output and confirms its status by reading appropriate registers.

DIAG_TEST_STATUS 
DIAG_GPIO_InputOutputDirection
(
     DIAG_GPIO_PORT_INDEX port,     
     DIAG_GPIO_PORT_PIN pin, 
     DIAG_GPIO_PIN_DIR dir
);

Diagnostic verifies the following faults do not exist

  • Cannot set pin to desired status, Input or Output

Operating Mode

  • Interface can be used at POST and ‘On Demand’
Precondition
  • none

Parameters

  • port - name of port
  • pin - name of pin under port
  • dir - intended pin direction

Returns

  • DIAG_STATUS