You are here

Digital Outputs

You can configure most of the DLN-series adapter pins as general-purpose digital outputs. Call the DlnGpioPinSetDirection() function and pass 1 for the direction parameter to configure the GPIO pin as a digital output. You can call this function either before or after the pin is assigned to the GPIO module by using the DlnGpioPinEnable() function.

To set the value on the pin, use the DlnGpioPinSetOutVal() function. Call the DlnGpioPinGetOutVal()function to retrieve the output value configured for this pin. The actual value of the pin may differ from the configured one (for example, when the pin is in the open drain mode or it is not assigned to the GPIO module). The DlnGpioPinGetVal()function retrieves the actual value present on the pin.

For digital outputs, you can use the Open Drain Mode.

Use the following GPIO Interface functions to control and monitor output pins:

DlnGpioPinSetDirection()

Configures a pin as a digital output. Pass 1 for the direction parameter.

DlnGpioPinSetOutVal()

Sets the output value for the pin.

DlnGpioPinGetOutVal()

Retrieves the output value configured for the pin.

DlnGpioPinGetVal()

Retrieves the actual value on the I/O line.

Rating: 
Average: 1 (1 vote)

User login