theCore C++ embedded framework
ecl::platform_console Class Reference

#include </home/travis/build/forGGe/theCore/platform/host/export/platform/console.hpp>

Public Types

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

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 (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 err cancel_xfer ()
 Cancels xfer. More...
 

Member Typedef Documentation

◆ channel

◆ event

◆ handler_fn

Member Function Documentation

◆ init()

static ecl::err ecl::platform_console::init ( )
inlinestatic

Lazy initialization.

Returns
Status of operation.

◆ set_rx()

static void ecl::platform_console::set_rx ( uint8_t *  rx,
size_t  size 
)
inlinestatic

Sets rx buffer with given size.

Parameters
[in,out]rxBuffer to write data to. Optional.
[in]sizeSize

◆ set_tx()

static void ecl::platform_console::set_tx ( const uint8_t *  tx,
size_t  size 
)
inlinestatic

Sets tx buffer with given size.

Parameters
[in]txBuffer to transmit. Optional.
[in]sizeBuffer size.

◆ set_handler()

static void ecl::platform_console::set_handler ( const handler_fn handler)
inlinestatic

Sets event handler.

Handler will be used by the bus, until reset_handler() will be called.

Parameters
[in]handlerHandler itself.

◆ reset_buffers()

static void ecl::platform_console::reset_buffers ( )
inlinestatic

Reset xfer buffers.

Buffers that were set by

See also
set_tx() and
set_rx() will be no longer used after this call.

◆ reset_handler()

static void ecl::platform_console::reset_handler ( )
inlinestatic

Resets previously set handler.

◆ do_xfer()

static ecl::err ecl::platform_console::do_xfer ( )
inlinestatic

Executes xfer, using buffers previously set.

When it will be done, handler will be invoked.

Returns
Status of operation.

◆ cancel_xfer()

static err ecl::platform_console::cancel_xfer ( )
inlinestatic

Cancels xfer.

After this call no xfer will occur.

Returns
Status of operation.

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