#include <modm/platform/spi/bitbang_spi_master.hpp>
|
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 void | acknowledgeInterruptFlag () |
|
template<baudrate_t available, baudrate_t requested, percent_t tolerance> |
static void | assertBaudrateInTolerance () |
|
static void | configurePurpose () |
| configures a peripheral for a specific purpose
|
|
static bool | getInterruptFlag () |
| Read an interrupt flag.
|
|
static void | getParameter () |
| returns a parameter
|
|
static void | initialize () |
| initializes the peripheral, must be called before use.
|
|
static void | setParameter () |
| sets a parameter
|
|
template<typename Sck, typename Mosi, typename Miso = GpioUnused>
class modm::platform::BitBangSpiMaster< Sck, Mosi, Miso >
Software emulation of a Simple Spi.
- Template Parameters
-
Sck | clock pin [output] |
Mosi | master out slave in pin [output] |
Miso | master in slave out pin [input] |
- Author
- Niklas Hauser
- See also
- gpio
Spi Data Mode, Mode0 is the most common mode.
Enum Values | Documentation |
---|
Mode0 | clock normal, sample on rising edge
|
Mode1 | clock normal, sample on falling edge
|
Mode2 | clock inverted, sample on falling edge
|
Mode3 | clock inverted, sample on rising edge
|
static void modm::PeripheralDriver::acknowledgeInterruptFlag |
( |
| ) |
|
|
inheritedstatic |
Acknowledge an interrupt flag.
We use acknowledge here, since it describes the intention rather than the actual implementation.
template<baudrate_t available, baudrate_t requested, percent_t tolerance>
static void modm::PeripheralDriver::assertBaudrateInTolerance |
( |
| ) |
|
|
inheritedinlinestatic |
Since baudrates are usually generated by prescaling a system clock, only several distinct values can be generated. This method checks if the user requested baudrate is within error tolerance of the system achievable baudrate.
The documentation for this class was generated from the following file: