diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2022-08-08 21:03:52 -0400 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2022-08-08 21:03:52 -0400 |
commit | 86c4b3b5ceaa1bd927a443fa254cdab76b44a480 (patch) | |
tree | 7497711f941d3e351bb690af9aa1f57cdb2264f7 /funreg.hpp | |
parent | c0ca2d3a373e66f474d21ce34c25b38d953a66c7 (diff) |
add guide; couple small fixes
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>); } }; |