libyggdrasil  v1.0.0
bsp::drv::UART< Context, UARTImpl > Struct Template Reference

Base class for UART abstraction. More...

#include <uart.hpp>

Public Types

using Impl = UARTImpl< Context >
 

Public Member Functions

 UART ()=delete
 

Static Public Member Functions

static auto init (auto ... args)
 UART initialization. More...
 
static auto deinit (auto ... args)
 UART initialization. More...
 
static std::string readString ()
 UART read string function. More...
 
template<size_t N>
static std::array< u8, N > read ()
 UART read function. More...
 
static void write (std::string_view data)
 UART write string function. More...
 
template<size_t N>
static void write (const std::array< u8, N > &data)
 UART write string function. More...
 

Detailed Description

template<auto Context, template< auto > typename UARTImpl>
struct bsp::drv::UART< Context, UARTImpl >

Base class for UART abstraction.

Template Parameters
ContextUART context
UARTImplUART implementation

Member Typedef Documentation

◆ Impl

template<auto Context, template< auto > typename UARTImpl>
using bsp::drv::UART< Context, UARTImpl >::Impl = UARTImpl<Context>

Constructor & Destructor Documentation

◆ UART()

template<auto Context, template< auto > typename UARTImpl>
bsp::drv::UART< Context, UARTImpl >::UART ( )
delete

Member Function Documentation

◆ deinit()

template<auto Context, template< auto > typename UARTImpl>
static auto bsp::drv::UART< Context, UARTImpl >::deinit ( auto ...  args)
inlinestatic

UART initialization.

Parameters
argsPlatform specific arguments
Returns
Success

◆ init()

template<auto Context, template< auto > typename UARTImpl>
static auto bsp::drv::UART< Context, UARTImpl >::init ( auto ...  args)
inlinestatic

UART initialization.

Parameters
argsPlatform specific arguments
Returns
Success

◆ read()

template<auto Context, template< auto > typename UARTImpl>
template<size_t N>
static std::array<u8, N> bsp::drv::UART< Context, UARTImpl >::read ( )
inlinestatic

UART read function.

Template Parameters
NSize to read
Returns
Read data

◆ readString()

template<auto Context, template< auto > typename UARTImpl>
static std::string bsp::drv::UART< Context, UARTImpl >::readString ( )
inlinestatic

UART read string function.

Returns
Read string

◆ write() [1/2]

template<auto Context, template< auto > typename UARTImpl>
template<size_t N>
static void bsp::drv::UART< Context, UARTImpl >::write ( const std::array< u8, N > &  data)
inlinestatic

UART write string function.

Template Parameters
NSize to write
Parameters
dataData to write

◆ write() [2/2]

template<auto Context, template< auto > typename UARTImpl>
static void bsp::drv::UART< Context, UARTImpl >::write ( std::string_view  data)
inlinestatic

UART write string function.

Parameters
dataString to write

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