// // Created by erki on 15.07.22. // #ifndef SKL_TUNNEL_RADIO_INTERRUPTS_HPP #define SKL_TUNNEL_RADIO_INTERRUPTS_HPP #include namespace radio { enum class Interrupts : std::uint8_t { PLL_LOCK = (1 << 0), PLL_UNLOCK = (1 << 1), RX_START = (1 << 2), TRX_END = (1 << 3), CCA_ED_DONE = (1 << 4), AMI = (1 << 5), TRX_UR = (1 << 6), BAT_LOW = (1 << 7) }; inline Interrupts operator|(const Interrupts& lhs, const Interrupts& rhs) { using T = std::underlying_type_t; return static_cast(static_cast(lhs) | static_cast(rhs)); } inline Interrupts operator&(const Interrupts& lhs, const Interrupts& rhs) { using T = std::underlying_type_t; return static_cast(static_cast(lhs) & static_cast(rhs)); } } #endif //SKL_TUNNEL_RADIO_INTERRUPTS_HPP