52 lines
618 B
C++
52 lines
618 B
C++
/*
|
|
* main.cpp
|
|
*
|
|
* Created on: 16. 01. 2016
|
|
* Author: wn
|
|
*/
|
|
|
|
#include <msp430g2553.h>
|
|
#include <stdint.h>
|
|
#include <intrinsics.h>
|
|
#include <isr_compat.h>
|
|
|
|
#include "engine.h"
|
|
#include "hmi.h"
|
|
#include "debug.h"
|
|
|
|
|
|
int main() {
|
|
WDTCTL = WDTPW | WDTHOLD;
|
|
|
|
// highest possible system clock
|
|
DCOCTL = DCO0 | DCO1 | DCO2;
|
|
BCSCTL1 = XT2OFF | RSEL0 | RSEL1 | RSEL2 | RSEL3;
|
|
BCSCTL2 = 0;
|
|
BCSCTL3 = 0;
|
|
|
|
|
|
P1DIR |= BIT7;
|
|
P1OUT &= ~BIT7;
|
|
P1OUT |= BIT7;
|
|
|
|
engineInit();
|
|
hmiInit();
|
|
debugInit();
|
|
|
|
__enable_interrupt();
|
|
|
|
|
|
debugWrite(0);
|
|
|
|
|
|
|
|
while (1) {
|
|
//P1OUT &= ~BIT7;
|
|
//P1OUT |= BIT7;
|
|
|
|
hmiExec();
|
|
}
|
|
}
|
|
|
|
|