distortos  v0.5.0
object-oriented C++ RTOS for microcontrollers
SpiMode.hpp
Go to the documentation of this file.
1 
12 #ifndef INCLUDE_DISTORTOS_DEVICES_COMMUNICATION_SPIMODE_HPP_
13 #define INCLUDE_DISTORTOS_DEVICES_COMMUNICATION_SPIMODE_HPP_
14 
15 #include <cstdint>
16 
17 namespace distortos
18 {
19 
20 namespace devices
21 {
22 
29 enum class SpiMode : uint8_t
30 {
32  _0 = 0 << 0 | 0 << 1,
34  _1 = 0 << 0 | 1 << 1,
36  _2 = 1 << 0 | 0 << 1,
38  _3 = 1 << 0 | 1 << 1,
39 
41  cpol0cpha0 = _0,
43  cpol0cpha1 = _1,
45  cpol1cpha0 = _2,
47  cpol1cpha1 = _3,
48 };
49 
50 } // namespace devices
51 
52 } // namespace distortos
53 
54 #endif // INCLUDE_DISTORTOS_DEVICES_COMMUNICATION_SPIMODE_HPP_
SpiMode
Definition: SpiMode.hpp:29
alias of mode 2 - CPOL == 1, CPHA == 0
mode 1 - CPOL == 0, CPHA == 1
Top-level namespace of distortos project.
alias of mode 3 - CPOL == 1, CPHA == 1
mode 0 - CPOL == 0, CPHA == 0
mode 2 - CPOL == 1, CPHA == 0
alias of mode 0 - CPOL == 0, CPHA == 0
alias of mode 1 - CPOL == 0, CPHA == 1
mode 3 - CPOL == 1, CPHA == 1