You are here

DlnUartSetCharacterLength() Function

The DlnUartSetCharacterLength() function selects the data character length of 5, 6, 7, 8 and 9 bits per character. This function is defined in the dln_uart.h file.

Syntax
C/C++
DLN_RESULT DlnUartSetCharacterLength(
    HDLN handle, 
    uint8_t port, 
    uint8_t characterLength
);
Parameters
handle

A handle to the DLN-series adapter.

port

A number of the UART port to be configured.

characterLength

Set the data character length value of 5, 6, 7, 8 and 9 bits per character. You can use predefined constants to set required value.

  • 5 or DLN_UART_CHARACTER_LENGTH_5

  • 6 or DLN_UART_CHARACTER_LENGTH_6

  • 7 or DLN_UART_CHARACTER_LENGTH_7

  • 8 or DLN_UART_CHARACTER_LENGTH_8

  • 9 or DLN_UART_CHARACTER_LENGTH_9

Return Value
DLN_RES_SUCCESS

The operation completed successfully and character length has been set.

User login