Added hardware invert for ports as well
This commit is contained in:
parent
c1820f62f1
commit
d64793770c
6
io.hpp
6
io.hpp
@ -342,9 +342,15 @@ class Port {
|
|||||||
|
|
||||||
static inline void invert() FORCE_INLINE
|
static inline void invert() FORCE_INLINE
|
||||||
{
|
{
|
||||||
|
#if HARDWARE_TOGGLE
|
||||||
|
constexpr auto pinReg = detail::getPIN(port);
|
||||||
|
|
||||||
|
*pinReg = 0xFF;
|
||||||
|
#else
|
||||||
constexpr auto portReg = detail::getPORT(port);
|
constexpr auto portReg = detail::getPORT(port);
|
||||||
|
|
||||||
*portReg = ~(*portReg);
|
*portReg = ~(*portReg);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint8_t read() FORCE_INLINE
|
static inline uint8_t read() FORCE_INLINE
|
||||||
|
Loading…
Reference in New Issue
Block a user