From 426e690e26576cc3cea64a987e3cc0abfe37590b Mon Sep 17 00:00:00 2001 From: hg Date: Sun, 22 Feb 2015 00:42:30 +0100 Subject: [PATCH] start of hmi --- src/hmi.cpp | 22 ++++++++++++++++++++++ src/hmi.h | 16 ++++++++++++++++ src/main.cpp | 3 +++ src/pwm.cpp | 2 +- 4 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 src/hmi.cpp create mode 100644 src/hmi.h diff --git a/src/hmi.cpp b/src/hmi.cpp new file mode 100644 index 0000000..5288bce --- /dev/null +++ b/src/hmi.cpp @@ -0,0 +1,22 @@ +/* + * hmi.cpp + * + * Created on: 22.02.2015 + * Author: wn + */ + +#include +#include +#include + +#include "hmi.h" + + + +void hmiInit() { + +} + +void hmiExec() { + +} diff --git a/src/hmi.h b/src/hmi.h new file mode 100644 index 0000000..0b09b17 --- /dev/null +++ b/src/hmi.h @@ -0,0 +1,16 @@ +/* + * hmi.h + * + * Created on: 22.02.2015 + * Author: wn + */ + +#ifndef HMI_H_ +#define HMI_H_ + + +void hmiInit(); +void hmiExec(); + + +#endif /* HMI_H_ */ diff --git a/src/main.cpp b/src/main.cpp index 5847c4c..5699fc6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -11,6 +11,7 @@ #include #include "pwm.h" +#include "hmi.h" @@ -31,10 +32,12 @@ void init() { int main() { init(); pwmInit(); + hmiInit(); __enable_interrupt(); while (1) { + hmiExec(); } } diff --git a/src/pwm.cpp b/src/pwm.cpp index 1b2fe8e..db55e79 100644 --- a/src/pwm.cpp +++ b/src/pwm.cpp @@ -31,7 +31,7 @@ void pwmInit() { P1SEL |= BIT6; P1OUT = 0; TACCR0 = PWM_MAX; - TACCR1 = 128; + TACCR1 = 0; TACCTL0 = CCIE; TACCTL1 = OUTMOD_7; TACTL = MC_1 | ID_0 | TASSEL_2 | TACLR;