UART Class

class UARTClass : public EntityClass

UARTClass. 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.

Public Functions

UARTClass()

Constructor.

~UARTClass()

Destructor.

!UARTClass ()

Finalizer.

void init (BrainStem2CLI::ModuleClass^ module, const unsigned char index)

Initializes the class. Should only be called when manually creating classes.

Parameters:
  • pModule – The module.

  • index – The cmdUART index to be addressed.

aErr setEnable(const unsigned char bEnabled)

Enable the UART channel.

Parameters:

bEnabled – true: enabled, false: disabled.

Returns:

Returns common entity return values

aErr getEnable(unsigned char %bEnabled)

Get the UART channel state.

Parameters:

bEnabled – true: enabled, false: disabled.

Returns:

Returns common entity return values

aErr setBaudRate(const unsigned int rate)

Set the UART baud rate.

Parameters:

rate – baud rate.

Returns:

Returns common entity return values

aErr getBaudRate(unsigned int %rate)

Get the UART baud rate.

Parameters:

rate – Pointer variable to be filled with baud rate.

Returns:

Returns common entity return values

aErr setProtocol(const unsigned char protocol)

Set the UART protocol.

Parameters:

protocol – Serial protocol.

Returns:

Returns common entity return values

aErr getProtocol(unsigned char %protocol)

Get the UART protocol.

Parameters:

protocol – Pointer to where result is placed.

Returns:

Returns common entity return values