modm API documentation
modm::platform::BitBangSpiMaster< Sck, Mosi, Miso > Class Template Reference

#include <modm/platform/spi/bitbang_spi_master.hpp>

Inheritance diagram for modm::platform::BitBangSpiMaster< Sck, Mosi, Miso >:
modm::SpiMaster modm::PeripheralDriver modm::Spi

Static Public Member Functions

template<class... Signals>
static void connect ()
 
template<class SystemClock , baudrate_t baudrate, percent_t tolerance = pct(5)>
static void initialize ()
 Baudrate is limited to 500kbps.
 
static void setDataMode (DataMode mode)
 
static void setDataOrder (DataOrder order)
 
static uint8_t acquire (void *ctx, ConfigurationHandler handler=nullptr)
 
static uint8_t release (void *ctx)
 
static uint8_t transferBlocking (uint8_t data)
 
static void transferBlocking (const uint8_t *tx, uint8_t *rx, std::size_t length)
 
static modm::ResumableResult< uint8_t > transfer (uint8_t data)
 
static modm::ResumableResult< void > transfer (const uint8_t *tx, uint8_t *rx, std::size_t length)
 
- Static Public Member Functions inherited from modm::SpiMaster
template<class... Signals>
static void connect ()
 
template<class SystemClock , baudrate_t baudrate, percent_t tolerance = 5_pct>
static void initialize ()
 
static void setDataMode (DataMode mode)
 Sets a new data mode.
 
static void setDataOrder (DataOrder order)
 Sets a new data order.
 
static uint8_t acquire (void *ctx, ConfigurationHandler handler=nullptr)
 
static uint8_t release (void *ctx)
 
static uint8_t transferBlocking (uint8_t data)
 
static void transferBlocking (const uint8_t *tx, uint8_t *rx, std::size_t length)
 
static modm::ResumableResult< uint8_t > transfer (uint8_t data)
 
static modm::ResumableResult< void > transfer (const uint8_t *tx, uint8_t *rx, std::size_t length)
 
- Static Public Member Functions inherited from modm::PeripheralDriver
static void initialize ()
 initializes the peripheral, must be called before use.
 
static void configurePurpose ()
 configures a peripheral for a specific purpose
 
static void setParameter ()
 sets a parameter
 
static void getParameter ()
 returns a parameter
 
static bool getInterruptFlag ()
 Read an interrupt flag.
 
static void acknowledgeInterruptFlag ()
 
template<baudrate_t available, baudrate_t requested, percent_t tolerance>
static void assertBaudrateInTolerance ()
 

Additional Inherited Members

- Public Typedefs inherited from modm::Spi
using ConfigurationHandler = void (*)()
 The signature of the configuration function.
 
- Public Types inherited from modm::Spi
enum  DataMode : uint8_t { DataMode::Mode0 = 0b00, DataMode::Mode1 = 0b01, DataMode::Mode2 = 0b10, DataMode::Mode3 = 0b11 }
 Spi Data Mode, Mode0 is the most common mode. More...
 
enum  DataOrder : uint8_t { MsbFirst = 0b0, LsbFirst = 0b1 }
 Spi Data Order, MsbFirst is the most common mode.
 

Detailed Description

template<typename Sck, typename Mosi, typename Miso = GpioUnused>
class modm::platform::BitBangSpiMaster< Sck, Mosi, Miso >

Software emulation of a Simple Spi.

Template Parameters
Sckclock pin [output]
Mosimaster out slave in pin [output]
Misomaster in slave out pin [input]
Author
Niklas Hauser
See also
gpio

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