28 #ifndef ARM_CORTEX_STM32_COMMON_REG_SPI_HPP_INCLUDED 29 #define ARM_CORTEX_STM32_COMMON_REG_SPI_HPP_INCLUDED 44 template<reg_addr_t _base_addr>
53 :
public reg< std::uint_fast16_t, base_addr + 0x00, rw, 0x0000 >
62 template<
unsigned prescaler>
65 prescaler == 2 ? 0x0 :
66 prescaler == 4 ? 0x1 :
67 prescaler == 8 ? 0x2 :
68 prescaler == 16 ? 0x3 :
69 prescaler == 32 ? 0x4 :
70 prescaler == 64 ? 0x5 :
71 prescaler == 128 ? 0x6 :
72 prescaler == 256 ? 0x7 :
76 static_assert(prescaler == 2 || prescaler == 4 || prescaler == 8 || prescaler == 16 ||
77 prescaler == 32 || prescaler == 64 || prescaler == 128 || prescaler == 256
78 ,
"invalid baud rate prescaler");
102 :
public reg< std::uint_fast16_t, base_addr + 0x04, rw, 0x0000 >
118 :
public reg< std::uint_fast16_t, base_addr + 0x08, rw, 0x0002 >
156 :
public reg< std::uint_fast16_t, base_addr + 0x1c, rw, 0x0000 >
174 :
public reg< std::uint_fast16_t, base_addr + 0x20, rw, 00000010 >
188 template<reg_addr_t base_addr>
195 struct CR2 :
public base_type::CR2 {
198 struct SR :
public base_type::SR {
205 #endif // ARM_CORTEX_STM32_COMMON_REG_SPI_HPP_INCLUDED Some architectures (e.g.
Definition: spi.hpp:189
Baud Rate Control.
Definition: spi.hpp:59
I2S configuration register.
Definition: spi.hpp:155
Control register 1.
Definition: spi.hpp:52
Status register.
Definition: spi.hpp:117
I2S prescaler register.
Definition: spi.hpp:173
static constexpr reg_addr_t base_addr
Definition: spi.hpp:47
Serial peripheral interface (SPI)
Definition: spi.hpp:45
Control register 2.
Definition: spi.hpp:101