Improved formatting

This commit is contained in:
BlackMark 2019-07-30 21:51:13 +02:00
parent 6861b8f5d1
commit f0a3cd6da8
2 changed files with 10 additions and 24 deletions

View File

@ -65,18 +65,11 @@ enum class ControlFlagsC0 {
MODE_SEL_1 = UMSEL01,
};
constexpr int operator<<(const int &lhs, const ControlFlagsA0 &rhs)
{
return lhs << static_cast<int>(rhs);
}
constexpr int operator<<(const int &lhs, const ControlFlagsB0 &rhs)
{
return lhs << static_cast<int>(rhs);
}
constexpr int operator<<(const int &lhs, const ControlFlagsC0 &rhs)
{
return lhs << static_cast<int>(rhs);
}
// clang-format off
constexpr int operator<<(const int &lhs, const ControlFlagsA0 &rhs) { return lhs << static_cast<int>(rhs); }
constexpr int operator<<(const int &lhs, const ControlFlagsB0 &rhs) { return lhs << static_cast<int>(rhs); }
constexpr int operator<<(const int &lhs, const ControlFlagsC0 &rhs) { return lhs << static_cast<int>(rhs); }
// clang-format on
#else
#error "This chip is not supported"

View File

@ -52,18 +52,11 @@ enum class ControlFlagsC1 {
MODE_SEL_1 = UMSEL11,
};
constexpr int operator<<(const int &lhs, const ControlFlagsA1 &rhs)
{
return lhs << static_cast<int>(rhs);
}
constexpr int operator<<(const int &lhs, const ControlFlagsB1 &rhs)
{
return lhs << static_cast<int>(rhs);
}
constexpr int operator<<(const int &lhs, const ControlFlagsC1 &rhs)
{
return lhs << static_cast<int>(rhs);
}
// clang-format off
constexpr int operator<<(const int &lhs, const ControlFlagsA1 &rhs) { return lhs << static_cast<int>(rhs); }
constexpr int operator<<(const int &lhs, const ControlFlagsB1 &rhs) { return lhs << static_cast<int>(rhs); }
constexpr int operator<<(const int &lhs, const ControlFlagsC1 &rhs) { return lhs << static_cast<int>(rhs); }
// clang-format on
#define HAS_UART1