You are here

DlnGpioPinGetOutVal() Function

The DlnGpioPinGetOutVal() function retrieves the pin output value.

Syntax
C/C++
DLN_RESULT DlnGpioPinGetOutVal(
    HDLN handle,
    uint8_t pin, 
    uint8_t* value
 );
Parameters
handle

A handle to the DLN-series adapter.

pin

A number of the pin which output value you want to know.

value

A pointer to an unsigned 8-bit integer. After the function execution, this integer is filled with the pin output value.

Return Value
DLN_RES_SUCCESS (0x00)

The function retrieved the pin output value successfully.

DLN_RES_INVALID_PIN_NUMBER (0xAB)

The pin number is not valid. Use the DlnGpioGetPinCount() function to find the maximum possible pin number.

Remarks

The default pin output value is 0. By using the DlnGpioPinSetOutVal() function you can change the output value. If the specified pin is not assigned to the GPIO module or is not an output, the DlnGpioPinGetOutVal() function takes the output value from the internal memory, where it is saved.

The DlnGpioPinGetOutVal() function is declared in the dln_gpio.h file.

Contents

Languages

User login