diff options
Diffstat (limited to 'funreg.hpp')
-rw-r--r-- | funreg.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -46,7 +46,7 @@ struct MemoryIO { constexpr static auto addr = Addr; /** - * Gets a pointer to the register. + * Reads the register's value. */ constexpr static T read() { return *reinterpret_cast<volatile T*>(Addr); @@ -392,7 +392,7 @@ struct RegisterMaskValue * Tests if this value is currently set in the register. */ static bool test() { - return Mask::read() & (value << BitOffset<Mask>); + return (Mask::read() & Mask::mask) == (value << BitOffset<Mask>); } }; |