diff --git a/io.hpp b/io.hpp index db5de65..10a0b99 100644 --- a/io.hpp +++ b/io.hpp @@ -342,9 +342,15 @@ class Port { static inline void invert() FORCE_INLINE { +#if HARDWARE_TOGGLE + constexpr auto pinReg = detail::getPIN(port); + + *pinReg = 0xFF; +#else constexpr auto portReg = detail::getPORT(port); *portReg = ~(*portReg); +#endif } static inline uint8_t read() FORCE_INLINE