GPIO Functions

This section describes the GPIO functions. They are used to control and monitor the GPIO module of a DLN-series adapter.

Actual control of the device is performed by use of commands and responses. Each function utilizes respective commands and responses. You can send such commands directly if necessary.

Function Description
DlnGpioGetPortCount() Retrieves the total number of the GPIO ports available in the DLN-series adapter.
DlnGpioGetPinCount() Retrieves the total number of the GPIO ports available in the DLN-series adapter.
DlnGpioPinSetCfg() Changes the configuration of a single GPIO pin.
DlnGpioPinSetCfg() Retrieves current configuration of the specified GPIO pin.
DlnGpioPortGetCfg() Retrieves current configuration of the GPIO pins from the specified port.
DlnGpioPortSetCfg() Changes the configuration of the GPIO pins from the specified port and sets the conditions of the DLN_GPIO_CONDITION_MET_EV event generation.
DlnGpioPortGetVal() Retrieves current level on the I/O lines from the specified port.
DlnGpioPortSetOutVal() Sets output values for I/O lines from the specified GPIO port.
DlnGpioPortGetOutVal() Retrieves current output values for the GPIO pins from the specified port.
DlnGpioSetDebounce() Specifies the minimum duration of the pulse to be registered (the Debounce interval).
DlnGpioGetDebounce() Retrieves the current setting of the minimum duration of the pulse to be registered (the Debounce interval).
DlnGpioPinGetOutVal() Retrieves the pin output value
DlnGpioPinSetOutVal() Sets the output value for the specified GPIO pin.
DlnGpioPinGetVal() Retrieves the current value on the specified GPIO pin.
DlnGpioPinEnable() Configures a pin as general purpose input/output.
DlnGpioPinDisable() Disables a pin as general purpose input/output.
DlnGpioPinIsEnabled() Informs whether the pin is currently configured as general purpose input/output.
DlnGpioPinSetDirection() Configures a pin as input or as output.
DlnGpioPinGetDirection() Retrieves current direction of a GPIO pin.
DlnGpioPinOpendrainEnable() Enables Open Drain mode for the specified pin.
DlnGpioPinOpendrainDisable() Disables Open Drain mode for the specified pin.
DlnGpioPinOpendrainIsEnabled() informs whether the pin output is currently configured as push pull or Open Drain.
DlnGpioPinPullupEnable() Activates an embedded pull-up resistor for the specified pin.
DlnGpioPinPullupDisable() Deactivates an embedded pull-up resistor for the specified pin.
DlnGpioPinPullupIsEnabled() Informs whether an embedded pull-up resistor is enabled for the specified pin.
DlnGpioPinDebounceEnable() Enables debounce filtering for the specified pin.
DlnGpioPinDebounceDisable() Disables debounce filtering for the specified pin.
DlnGpioPinDebounceIsEnabled() Informs whether the debounce filtering is currently enabled for the specified pin.
DlnGpioPinSetEventCfg() Configures the event generation conditions for the specified pin.
DlnGpioPinGetEventCfg() Obtains current event generation conditions for the specified pin.