initial, ported from constantly failed C++ variant
This commit is contained in:
49
src/main.c
Normal file
49
src/main.c
Normal 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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user