Tool Libs
UMIT-TIROL Institute of Automation and Control Engineering library collection
 
Loading...
Searching...
No Matches
UART::HW Struct Reference

Character Buffer Sink & Source wrapping UART Peripheral. More...

#include <uart.h>

Inherits Sink< Buffer< uint8_t > >, and Source< Buffer< uint8_t > >.

Collaboration diagram for UART::HW:
[legend]

Classes

struct  Default
 default init struct More...
 
struct  Manual
 init struct with full control over UART settings More...
 
struct  RX
 rx state More...
 
struct  TX
 tx state More...
 

Public Member Functions

 HW (const Default &conf)
 constructor with default config
 
 HW (const Manual &conf)
 constructor with manually specifiable settings
 
bool full () override
 check if sink is full
 
void push (Buffer< uint8_t > &&tx) override
 push bytebuffer into sending queue
 
Buffer< uint8_t > pop () override
 pull buffer from receiving queue
 
bool empty () override
 check if receiving queue is empty
 
void irqHandler ()
 interrupt handler
 
virtual void push (const Buffer< uint8_t > &t)
 copy semantics does not check for space. guard by using 'if (!full) { ... }'
 
void trypush (Buffer< uint8_t > &&t)
 use this if you don't care if it's going to be successful. data gets discarded if sink is full.
 

Public Attributes

UART_HandleTypeDef handle {}
 HAL handle for use with unwrapped UART capabilities.
 

Static Public Attributes

static Registry< HW, UART_HandleTypeDef, 8 > reg
 stm glue registry for internal use
 

Detailed Description

Character Buffer Sink & Source wrapping UART Peripheral.


Class Documentation

◆ UART::HW::Default

struct UART::HW::Default

default init struct

Collaboration diagram for UART::HW::Default:
[legend]
Class Members
USART_TypeDef * uart UART peripheral.
AFIO rx
AFIO tx alternate function initialized pins
uint32_t baudrate baudrate

◆ UART::HW::Manual

struct UART::HW::Manual

init struct with full control over UART settings

Collaboration diagram for UART::HW::Manual:
[legend]
Class Members
USART_TypeDef * uart UART peripheral.
AFIO rx
AFIO tx alternate function initialized pins
UART_InitTypeDef init HAL Init configuration.

◆ UART::HW::RX

struct UART::HW::RX

rx state

Collaboration diagram for UART::HW::RX:
[legend]

◆ UART::HW::TX

struct UART::HW::TX

tx state

Collaboration diagram for UART::HW::TX:
[legend]

Member Function Documentation

◆ irqHandler()

void HW::irqHandler ( )

interrupt handler

call this directly in interrupt


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