OpenMPTL - STM32F10X
C++ Microprocessor Template Library
Public Types | List of all members
mptl::spi< spi_no, system_clock_type, gpio_sck_type, gpio_miso_type, gpio_mosi_type, gpio_output_speed > Class Template Reference

#include <spi.hpp>

Inheritance diagram for mptl::spi< spi_no, system_clock_type, gpio_sck_type, gpio_miso_type, gpio_mosi_type, gpio_output_speed >:
mptl::spi_stm32_common< spi_no, system_clock_type >

Public Types

using resources = typelist< typename base_type::resources, typename mpl::spi_gpio_output_resources< gpio_sck_type, gpio_output_speed >::type, typename mpl::spi_gpio_input_resources< gpio_miso_type >::type, typename mpl::spi_gpio_output_resources< gpio_mosi_type, gpio_output_speed >::type >
 
- Public Types inherited from mptl::spi_stm32_common< spi_no, system_clock_type >
typedef SPI< spi_noSPIx
 
typedef irq::spi< spi_noirq
 
typedef rcc_spi_clock_resources< spi_noresources
 
typedef reglist< regval< typename SPIx::CR1::MSTR, 1 >, regval< typename SPIx::CR1::SSI, 1 > > master
 
typedef regval< typename SPIx::CR1::MSTR, 0 > slave
 
typedef regval< typename SPIx::CR1::SSM, 1 > software_slave_management
 
typedef regval< typename SPIx::CR1::BR,(value==0 ? 0 :value >=clk_freq/2 ? 0 :value >=clk_freq/4 ? 1 :value >=clk_freq/8 ? 2 :value >=clk_freq/16 ? 3 :value >=clk_freq/32 ? 4 :value >=clk_freq/64 ? 5 :value >=clk_freq/128 ? 6 :7) > max_frequency
 
typedef typename std::enable_if< value==8||value==16, regval< typename SPIx::CR1::DFF, value==16 ? 1 :0 > >::type data_size
 

Additional Inherited Members

- Static Public Member Functions inherited from mptl::spi_stm32_common< spi_no, system_clock_type >
static void configure (void)
 
static void reconfigure (void)
 
static void reset_crc (void)
 
static void enable (void)
 
static void disable (void)
 
static void wait_transmit_empty (void)
 
static void wait_receive_not_empty (void)
 
static void wait_not_busy (void)
 
static void send (uint16_t data)
 
static void send_blocking (uint16_t data)
 
static SPIx::DR::value_type receive (void)
 
static SPIx::DR::value_type receive_blocking (void)
 
static unsigned char writeread_blocking (uint16_t data)
 
- Static Public Attributes inherited from mptl::spi_stm32_common< spi_no, system_clock_type >
static constexpr unsigned spi_no
 
static constexpr unsigned clk_freq
 

Member Typedef Documentation

◆ resources

template<unsigned spi_no, typename system_clock_type , typename gpio_sck_type = void, typename gpio_miso_type = void, typename gpio_mosi_type = void, freq_t gpio_output_speed = mhz(50)>
using mptl::spi< spi_no, system_clock_type, gpio_sck_type, gpio_miso_type, gpio_mosi_type, gpio_output_speed >::resources = typelist< typename base_type::resources, typename mpl::spi_gpio_output_resources< gpio_sck_type, gpio_output_speed >::type, typename mpl::spi_gpio_input_resources< gpio_miso_type >::type, typename mpl::spi_gpio_output_resources< gpio_mosi_type, gpio_output_speed >::type >

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