distortos  v0.5.0
object-oriented C++ RTOS for microcontrollers
SpiMasterErrorSet.hpp
Go to the documentation of this file.
1 
12 #ifndef INCLUDE_DISTORTOS_DEVICES_COMMUNICATION_SPIMASTERERRORSET_HPP_
13 #define INCLUDE_DISTORTOS_DEVICES_COMMUNICATION_SPIMASTERERRORSET_HPP_
14 
15 #include <bitset>
16 
17 namespace distortos
18 {
19 
20 namespace devices
21 {
22 
29 class SpiMasterErrorSet : public std::bitset<3>
30 {
31 public:
32 
34  enum ErrorBits
35  {
42 
45  };
46 };
47 
48 static_assert(SpiMasterErrorSet{}.size() == SpiMasterErrorSet::errorBitsMax,
49  "Invalid size of SpiMasterErrorSet's underlying bitset!");
50 
51 } // namespace devices
52 
53 } // namespace distortos
54 
55 #endif // INCLUDE_DISTORTOS_DEVICES_COMMUNICATION_SPIMASTERERRORSET_HPP_
master mode fault
Definition: SpiMasterErrorSet.hpp:39
Definition: SpiMasterErrorSet.hpp:29
overrun error
Definition: SpiMasterErrorSet.hpp:41
Top-level namespace of distortos project.
ErrorBits
indexes of error bits in SpiMasterErrorSet
Definition: SpiMasterErrorSet.hpp:34
number of supported error bits - must be last!
Definition: SpiMasterErrorSet.hpp:44
CRC error.
Definition: SpiMasterErrorSet.hpp:37