theCore C++ embedded framework
ecl::usart_bus< dev > Class Template Reference

STM32 USART bus. More...

#include </home/travis/build/forGGe/theCore/platform/stm32/export/aux/usart_bus.hpp>

Public Types

using channel = ecl::bus_channel
 
using event = ecl::bus_event
 
using handler_fn = ecl::bus_handler
 

Public Member Functions

 usart_bus ()=delete
 
 ~usart_bus ()=delete
 
usart_busoperator= (usart_bus &)=delete
 
 usart_bus (usart_bus &)=delete
 

Static Public Member Functions

static ecl::err init ()
 Lazy initialization. More...
 
static void set_rx (uint8_t *rx, size_t size)
 Sets rx buffer with given size. More...
 
static void set_tx (size_t size, uint8_t fill_byte=0xff)
 Sets tx buffer made-up from sequence of similar bytes. More...
 
static void set_tx (const uint8_t *tx, size_t size)
 Sets tx buffer with given size. More...
 
static void set_handler (const handler_fn &handler)
 Sets event handler. More...
 
static void reset_buffers ()
 Reset xfer buffers. More...
 
static void reset_handler ()
 Resets previously set handler. More...
 
static ecl::err do_xfer ()
 Executes xfer, using buffers previously set. More...
 
static ecl::err do_rx ()
 Executes rx transfer, using rx buffer previously set. More...
 
static ecl::err do_tx ()
 Executes tx transfer, using tx buffer previously set. More...
 
static ecl::err cancel_xfer ()
 Cancels xfer. More...
 
static ecl::err cancel_rx ()
 Cancels xfer on rx. More...
 
static ecl::err cancel_tx ()
 Cancels xfer on tx. More...
 
static ecl::err enable_listen_mode ()
 Enables listen mode. More...
 
static ecl::err disable_listen_mode ()
 Disables listen mode. More...
 

Friends

struct bypass_console
 

Detailed Description

template<usart_device dev>
class ecl::usart_bus< dev >

STM32 USART bus.

Member Typedef Documentation

◆ channel

template<usart_device dev>
using ecl::usart_bus< dev >::channel = ecl::bus_channel

◆ event

template<usart_device dev>
using ecl::usart_bus< dev >::event = ecl::bus_event

◆ handler_fn

template<usart_device dev>
using ecl::usart_bus< dev >::handler_fn = ecl::bus_handler

Constructor & Destructor Documentation

◆ usart_bus() [1/2]

template<usart_device dev>
ecl::usart_bus< dev >::usart_bus ( )
delete

◆ ~usart_bus()

template<usart_device dev>
ecl::usart_bus< dev >::~usart_bus ( )
delete

◆ usart_bus() [2/2]

template<usart_device dev>
ecl::usart_bus< dev >::usart_bus ( usart_bus< dev > &  )
delete

Member Function Documentation

◆ operator=()

template<usart_device dev>
usart_bus& ecl::usart_bus< dev >::operator= ( usart_bus< dev > &  )
delete

Friends And Related Function Documentation

◆ bypass_console

template<usart_device dev>
friend struct bypass_console
friend

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