theCore C++ embedded framework
|
Driver implementation for SPI. More...
#include </home/travis/build/forGGe/theCore/platform/skel/export/aux/spi.hpp>
Public Types | |
using | channel = bus_channel |
using | event = bus_event |
using | handler_fn = bus_handler |
using | config = spi_cfg< ch > |
Public Member Functions | |
spi ()=delete | |
~spi ()=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 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... | |
Static Protected Member Functions | |
static void | irq_handler () |
SPI interrupt handler. More... | |
Driver implementation for SPI.
ch | SPI configuration |
using ecl::skel::spi< ch >::channel = bus_channel |
using ecl::skel::spi< ch >::event = bus_event |
using ecl::skel::spi< ch >::handler_fn = bus_handler |
using ecl::skel::spi< ch >::config = spi_cfg<ch> |
|
delete |
|
delete |