stm32f103
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
UART Class Reference

Implements an abstraction layer for UART interface. More...

#include <uart.h>

Classes

struct  Config
 Configuration for individual UART interfaces. More...
 

Public Member Functions

 UART (const Config &config)
 Constructor for UART. More...
 
void EnableInterrupt ()
 Enables interrupt for UART RX. More...
 
void TxByte (const uint8_t byte)
 Transmits one byte. More...
 
void Tx (const char *data,...)
 Transmits a formatted string. More...
 
void Tx (const std::string &str)
 Transmits a string. More...
 

Protected Member Functions

void Init (uint32_t baud_rate)
 Performs initialization for this UART interface. More...
 

Detailed Description

Implements an abstraction layer for UART interface.

Constructor & Destructor Documentation

UART::UART ( const Config config)
explicit

Constructor for UART.

Parameters
configUART configuration

Here is the call graph for this function:

Member Function Documentation

void UART::EnableInterrupt ( )

Enables interrupt for UART RX.

void UART::Init ( uint32_t  baud_rate)
protected

Performs initialization for this UART interface.

Parameters
baud_rateBaud Rate

Here is the caller graph for this function:

void UART::Tx ( const char *  data,
  ... 
)

Transmits a formatted string.

Parameters
dataFormatted string
...Variables

Here is the call graph for this function:

void UART::Tx ( const std::string &  str)

Transmits a string.

Parameters
strString to transmit

Here is the call graph for this function:

void UART::TxByte ( const uint8_t  byte)

Transmits one byte.

Parameters
byteCharacter to transmit

Here is the caller graph for this function:


The documentation for this class was generated from the following files: