Improve semantics for chip erase state enum

This commit is contained in:
BlackMark 2020-04-12 15:07:58 +02:00
parent a72bf67b07
commit 41f81247ce

View File

@ -506,10 +506,10 @@ static inline void formatErrorAnswer(Message &msg)
} }
enum class ChipEraseState { enum class ChipEraseState {
NONE = 0b00, NONE = 0,
REQUEST = 0b01, REQUEST = (1 << 1),
RESPONSE = 0b10, RESPONSE = (1 << 2),
PERFORM = 0b11, PERFORM = REQUEST | RESPONSE,
}; };
constexpr ChipEraseState operator|(const ChipEraseState &self, const ChipEraseState &other) constexpr ChipEraseState operator|(const ChipEraseState &self, const ChipEraseState &other)