37 lines
494 B
C
Raw Permalink Normal View History

2024-06-02 18:34:16 +02:00
#include <msp430g2553.h>
#include <stdint.h>
#include <stdlib.h>
#include "scheduler.h"
2024-06-11 21:24:54 +02:00
#include "sequencer.h"
2024-06-02 21:06:52 +02:00
#include "psg.h"
2024-06-11 21:24:54 +02:00
#include "melody.h"
2024-06-02 18:34:16 +02:00
int main() {
WDTCTL = WDTPW | WDTHOLD;
__disable_interrupt();
// highest possible system clock
DCOCTL = DCO0 | DCO1 | DCO2;
BCSCTL1 = XT2OFF | RSEL0 | RSEL1 | RSEL2 | RSEL3;
BCSCTL2 = 0;
BCSCTL3 = 0;
schInit();
2024-06-02 21:06:52 +02:00
psgInit();
2024-06-11 21:24:54 +02:00
sequencerInit();
melodyInit();
2024-06-02 21:06:52 +02:00
2024-06-02 18:34:16 +02:00
__enable_interrupt();
while (1) {
schExec();
}
}