From c3767ac0c6bcb9a1aed1e7b666061f829a371e1f Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Fri, 4 May 2018 00:16:36 +0200 Subject: Start own HAL implementation based on MCC's generated files Other changes: - Undo conversion of MCC files to C++ - Delete old Led implementation --- hal/pin.tpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 hal/pin.tpp (limited to 'hal/pin.tpp') diff --git a/hal/pin.tpp b/hal/pin.tpp new file mode 100644 index 0000000..4f6bd4a --- /dev/null +++ b/hal/pin.tpp @@ -0,0 +1,30 @@ +/* + * File: pin.cpp + * Author: naopross + * + * Created on May 3, 2018, 8:02 PM + */ + +#include "pin.hpp" + +template +pin::pin(reg *r) +{ + _register = r; +} + + +template +pin::~pin() +{ + +} + +template +void pin::set(bool v) +{ + if (v) + *reinterpret_cast(_register) |= 1<(_register) &= ~(1<