DlnUartSetParity() Function

The DlnUartSetParity() function selects even, odd, mark (when the parity bit is always 1), space (the bit is always 0) or none parity.This function is defined in the dln_uart.h file.

Syntax
C/C++
DLN_RESULT DlnUartSetParity(
    HDLN handle, 
    uint8_t port,
    uint8_t parity
);
Parameters
handle

A handle to the DLN-series adapter.

port

A number of the UART port to be configured.

parity

The parity value parameter. You can use predefined constants to set required value.

  • 0 or DLN_UART_PARITY_EVEN

  • 1 or DLN_UART_PARITY_ODD

  • 2 or DLN_UART_PARITY_SPACE

  • 3 or DLN_UART_PARITY_MARK

  • 4 or NONE

Return Value
DLN_RES_SUCCESS

The operation completed successfully and parity has been set.