theCore C++ embedded framework
|
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::err > | i2s_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::err > | i2s_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... | |
Driver implementation for SPI and I2S.
spi_i2s_config | common configuration |
using ecl::spi_i2s_bus< dev >::channel = bus_channel |
using ecl::spi_i2s_bus< dev >::event = bus_event |
using ecl::spi_i2s_bus< dev >::handler_fn = bus_handler |
using ecl::spi_i2s_bus< dev >::config = spi_i2s_cfg<dev> |
|
delete |
|
delete |