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

Driver implementation for SPI and I2S. More...

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

Public Types

using channel = bus_channel
 
using event = bus_event
 
using handler_fn = bus_handler
 
using config = spi_i2s_cfg< dev >
 

Public Member Functions

 spi_i2s_bus ()=delete
 
 ~spi_i2s_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...
 
template<ecl::i2s::audio_frequency frequency, class Iface_cfg = config>
static std::enable_if_t< Iface_cfg::bus_type==spi_bus_type::i2s, ecl::erri2s_set_audio_frequency ()
 Sets audio frequency for I2S mode. More...
 
template<ecl::i2s::data_format format, class Iface_cfg = config>
static std::enable_if_t< Iface_cfg::bus_type==spi_bus_type::i2s, ecl::erri2s_set_data_format ()
 Sets data format for I2S mode. More...
 
static void enable_circular_mode ()
 Enables circular mode for the bus. More...
 
static void disable_circular_mode ()
 Disables circular mode for the bus. More...
 
static bool is_circular_mode ()
 Returns the circular mode state. More...
 

Detailed Description

template<spi_device dev>
class ecl::spi_i2s_bus< dev >

Driver implementation for SPI and I2S.

Template Parameters
spi_i2s_configcommon configuration

Member Typedef Documentation

◆ channel

template<spi_device dev>
using ecl::spi_i2s_bus< dev >::channel = bus_channel

◆ event

template<spi_device dev>
using ecl::spi_i2s_bus< dev >::event = bus_event

◆ handler_fn

template<spi_device dev>
using ecl::spi_i2s_bus< dev >::handler_fn = bus_handler

◆ config

template<spi_device dev>
using ecl::spi_i2s_bus< dev >::config = spi_i2s_cfg<dev>

Constructor & Destructor Documentation

◆ spi_i2s_bus()

template<spi_device dev>
ecl::spi_i2s_bus< dev >::spi_i2s_bus ( )
delete

◆ ~spi_i2s_bus()

template<spi_device dev>
ecl::spi_i2s_bus< dev >::~spi_i2s_bus ( )
delete

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