commit 326c6f10fab2f4a85769cde12e3999fa845f5f93 parent 6d7d10885ddc8fb913f6e01e8c0a247877bf40cb Author: Henry Wilson <m3henry@googlemail.com> Date: Tue, 19 Jun 2018 14:14:35 +0100 Added timer.h Diffstat:
A | timer.h | | | 55 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 55 insertions(+), 0 deletions(-)
diff --git a/timer.h b/timer.h @@ -0,0 +1,55 @@ +#pragma once +#include "utils.h" + + +namespace timer +{ +namespace one +{ +auto& control() +{ + return memory<uint16_t>(0x80); +} +auto& inputCapture() +{ + return memory<uint16_t>(0x86); +} +auto& outputCompareA() +{ + return memory<uint16_t>(0x88); +} +auto& outputCompareB() +{ + return memory<uint16_t>(0x8A); +} +} + +namespace two +{ +auto& control() +{ + return memory<uint16_t>(0xB0); +} +auto& value() +{ + return memory(0xB2); +} +auto& outputCompareA() +{ + return memory(0xB3); +} +auto& outputCompareB() +{ + return memory(0xB4); +} +auto& interruptMask() +{ + return memory(0x70); +} +auto const& interruptFlags() +{ + return memory(0x37); +} +} + +}