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 {
NONE = 0b00,
REQUEST = 0b01,
RESPONSE = 0b10,
PERFORM = 0b11,
NONE = 0,
REQUEST = (1 << 1),
RESPONSE = (1 << 2),
PERFORM = REQUEST | RESPONSE,
};
constexpr ChipEraseState operator|(const ChipEraseState &self, const ChipEraseState &other)