You are here

DlnUartRead() Function

The DlnUartRead() function receives data via UART interface.This function is defined in the dln_uart.h file.

Syntax
C/C++
DLN_RESULT DlnUartRead(
    HDLN handle, 
    uint8_t port, 
    uint16_t size, 
    uint8_t *buffer, 
    uint16_t *actualSize
);
Parameters
handle

A handle to the DLN-series adapter.

port

A number of the UART interface port.

size

The size of the message buffer. This parameter is specified in bytes. The maximum value is DLN_UART_MAX_TRANSFER_SIZE (256 bytes).

buffer

A pointer to an array of unsigned 8-bit integers. This array will be filled with received data during the function execution.

actualSize

A pointer to an array of unsigned 16-bit integers. This variable will be filled with actual data size value.

Return Value
DLN_RES_SUCCESS

The operation completed successfully and data has been read.

User login