#pragma once // uint8_t #include enum LedState { LS_Off = 0, LS_On = 1, }; constexpr LedState operator~(LedState const state) noexcept { return state == LS_On ? LS_Off : LS_On; } class Led final { public: explicit Led(uint8_t pin); void init() noexcept; void setState(LedState state) noexcept; LedState getState() const noexcept; void toggleState() noexcept; private: uint8_t pin_; };