start of hmi

This commit is contained in:
hg 2015-02-22 00:42:30 +01:00
parent 69d13b65d0
commit 426e690e26
4 changed files with 42 additions and 1 deletions

22
src/hmi.cpp Normal file
View File

@ -0,0 +1,22 @@
/*
* hmi.cpp
*
* Created on: 22.02.2015
* Author: wn
*/
#include <msp430g2553.h>
#include <isr_compat.h>
#include <stdint.h>
#include "hmi.h"
void hmiInit() {
}
void hmiExec() {
}

16
src/hmi.h Normal file
View File

@ -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_ */

View File

@ -11,6 +11,7 @@
#include <stdint.h> #include <stdint.h>
#include "pwm.h" #include "pwm.h"
#include "hmi.h"
@ -31,10 +32,12 @@ void init() {
int main() { int main() {
init(); init();
pwmInit(); pwmInit();
hmiInit();
__enable_interrupt(); __enable_interrupt();
while (1) { while (1) {
hmiExec();
} }
} }

View File

@ -31,7 +31,7 @@ void pwmInit() {
P1SEL |= BIT6; P1SEL |= BIT6;
P1OUT = 0; P1OUT = 0;
TACCR0 = PWM_MAX; TACCR0 = PWM_MAX;
TACCR1 = 128; TACCR1 = 0;
TACCTL0 = CCIE; TACCTL0 = CCIE;
TACCTL1 = OUTMOD_7; TACCTL1 = OUTMOD_7;
TACTL = MC_1 | ID_0 | TASSEL_2 | TACLR; TACTL = MC_1 | ID_0 | TASSEL_2 | TACLR;