DlnGpioPortSetOutVal() Function
Syntax
- C/C++
-
DLN_RESULT DlnGpioPortSetOutVal( HDLN handle, uint8_t port, uint8_t mask, uint8_t values );
The DlnGpioPortSetOutVal() function sets output values for I/O lines from the specified GPIO port. If a pin is an output, the value is applied immediately. If a pin is an input, the value is stored in an internal latch buffer. This value will be applied when the pin becomes output.
The mask parameter allows a user to change the output value for all of the pins from the port or only some of them. This parameter is a byte value. Each of the eight bits, contained in the byte, corresponds to a pin of the port. The new output values will be applied only to the pins with their mask bits set to 1. The output values of the pins with mask bits set to 0 will remain unchanged.
Parameters:
- handle
- A handle to the DLN-series adapter.
- port
- A port, whose output values are to be changed.
- mask
- A bit field that defines I/O lines, whose output values are to be changed.
- values
- Values to be set.
Results:
| Result | Description |
|---|---|
| DLN_RES_SUCCESS | Pin output values for the specified GPIO port have been successfully applied. |
This function is defined in the dln_gpio.h file.
2006-2012