initial, ported from constantly failed C++ variant

This commit is contained in:
Wolfgang Hottgenroth
2016-08-29 19:24:24 +02:00
commit 157866a4a5
16 changed files with 635 additions and 0 deletions

49
src/main.c Normal file
View File

@ -0,0 +1,49 @@
/*
* main.c
*
* Created on: 29.08.2016
* Author: wn
*/
#include <msp430g2553.h>
#include <stdint.h>
#include <intrinsics.h>
#include "gpio.h"
#include "time.h"
#include "display.h"
#include "PontCoopScheduler.h"
#include "testTask.h"
int main() {
WDTCTL = WDTPW | WDTHOLD;
// highest possible system clock
DCOCTL = DCO0 | DCO1 | DCO2;
BCSCTL1 = XT2OFF | RSEL0 | RSEL1 | RSEL2 | RSEL3;
BCSCTL2 = 0;
BCSCTL3 = 0;
gpioInitPins();
timeInit();
schInit();
// interrupts are required for delay function in displayInit();
__enable_interrupt();
displayInit();
__disable_interrupt();
testTaskInit();
// schAdd(displayExec, 0, 100);
schAdd(testTaskExec, 0, 100);
while (1) {
schExec();
}
}