blinky1/main.c

42 lines
662 B
C
Raw Normal View History

2019-01-24 08:51:21 +01:00
#include <msp430g2553.h>
#include <stdint.h>
#include <intrinsics.h>
#include <stdlib.h>
#include <stdbool.h>
#include "time.h"
#include "PontCoopScheduler.h"
#include "led.h"
2019-02-02 16:54:24 +01:00
#include "pattern.h"
#include "measure.h"
2019-01-24 08:51:21 +01:00
int main() {
2019-01-24 09:15:08 +01:00
WDTCTL = WDTPW | WDTHOLD;
2019-01-24 08:51:21 +01:00
2019-01-24 09:15:08 +01:00
__disable_interrupt();
2019-01-24 08:51:21 +01:00
2019-01-24 09:15:08 +01:00
// highest possible system clock
DCOCTL = DCO0 | DCO1 | DCO2;
BCSCTL1 = XT2OFF | RSEL0 | RSEL1 | RSEL2 | RSEL3;
BCSCTL2 = 0;
BCSCTL3 = 0;
2019-01-24 08:51:21 +01:00
2019-01-24 09:15:08 +01:00
timeInit();
schInit();
2019-01-24 08:51:21 +01:00
2019-01-24 09:15:08 +01:00
ledInit();
2019-02-02 18:03:04 +01:00
patternInit();
measureInit();
// ledSetMatrix(0, 0, BLUE);
2019-01-24 08:51:21 +01:00
2019-01-24 09:15:08 +01:00
__enable_interrupt();
2019-01-24 08:51:21 +01:00
2019-01-24 09:15:08 +01:00
while (1) {
schExec();
2019-02-02 16:54:24 +01:00
ledExec();
2019-01-24 09:15:08 +01:00
}
2019-01-24 08:51:21 +01:00
}