UART Entity

group UARTEntity

UART Class: A UART is a “Universal Asynchronous Receiver/Transmitter. Many times referred to as a COM (communication), Serial, or TTY (teletypewriter) port.

The UART Class allows the enabling and disabling of the UART data lines.

void uart_setEnable(unsigned int *id, struct Result *result, const int index, const unsigned char bEnabled)

Enable the UART channel.

Parameters:
  • id – The id assigned by the create stem vi.

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • bEnabled – true: enabled, false: disabled.

Returns:

Returns common entity return values

void uart_getEnable(unsigned int *id, struct Result *result, const int index)

Get the enabled state of the uart.

Parameters:
  • id – The id assigned by the create stem vi.

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure.

  • index – The index of the entity in question.

Returns:

Returns common entity return values

void uart_setBaudRate(unsigned int *id, struct Result *result, const int index, const unsigned int rate)

Set the UART baud rate.

Parameters:
  • id – The id assigned by the create stem vi.

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • rate – baud rate.

Returns:

Returns common entity return values

void uart_getBaudRate(unsigned int *id, struct Result *result, const int index)

Get the UART baud rate.

Parameters:
  • id – The id assigned by the create stem vi.

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure.

  • index – The index of the entity in question.

Returns:

Returns common entity return values

void uart_setProtocol(unsigned int *id, struct Result *result, const int index, const unsigned char protocol)

Set the UART protocol.

Parameters:
  • id – The id assigned by the create stem vi.

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • protocol – An enumeration of serial protocols.

Returns:

Returns common entity return values

void uart_getProtocol(unsigned int *id, struct Result *result, const int index)

Get the UART protocol.

Parameters:
  • id – The id assigned by the create stem vi.

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure.

  • index – The index of the entity in question.

Returns:

Returns common entity return values