Update to use skullc for enums
This commit is contained in:
parent
c67c41f166
commit
e25b54add4
1
main.cpp
1
main.cpp
@ -3,7 +3,6 @@
|
||||
#include <utility_logging.hpp>
|
||||
#include <utility_assert.hpp>
|
||||
#include <utility_staticpointer.hpp>
|
||||
#include <cassert>
|
||||
#include <utility_function.hpp>
|
||||
|
||||
#include "radio_hw_instance.hpp"
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
#define SKL_TUNNEL_RADIO_INTERRUPTS_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <utility_enum_helpers.hpp>
|
||||
|
||||
namespace radio
|
||||
{
|
||||
@ -22,17 +23,7 @@ enum class Interrupts : std::uint8_t
|
||||
BAT_LOW = (1 << 7)
|
||||
};
|
||||
|
||||
inline Interrupts operator|(const Interrupts& lhs, const Interrupts& rhs)
|
||||
{
|
||||
using T = std::underlying_type_t<Interrupts>;
|
||||
return static_cast<Interrupts>(static_cast<T>(lhs) | static_cast<T>(rhs));
|
||||
}
|
||||
|
||||
inline Interrupts operator&(const Interrupts& lhs, const Interrupts& rhs)
|
||||
{
|
||||
using T = std::underlying_type_t<Interrupts>;
|
||||
return static_cast<Interrupts>(static_cast<T>(lhs) & static_cast<T>(rhs));
|
||||
}
|
||||
SKULLC_ENUM_DECLARE_BITFLAG_OPERATORS(Interrupts)
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user