DlnGpioPinGetDirection() Function
Syntax
- C/C++
-
DLN_RESULT DlnGpioPinGetDirection( HDLN handle, uint8_t pin, uint8_t* direction );
The DlnGpioPinGetDirection() function retrieves current direction of a GPIO pin.
Parameters:
- handle
- A handle to the DLN-series adapter.
- pin
- A number of the GPIO pin to retrieve the information from.
- direction
-
A pointer to an unsigned 8-bit integer. The integer will be filled with the pin current direction after the function execution. Possible values:
Value Description 1 The pin is an output. 0 The pin is an input.
Results:
| Result | Description |
|---|---|
| DLN_RES_SUCCESS | Pin direction has been successfully retrieved. |
| DLN_RES_INVALID_PIN_NUMBER | Invalid pin number was specified. |
This function is defined in the dln_gpio.h file.
2006-2012