43 lines
		
	
	
		
			699 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			43 lines
		
	
	
		
			699 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #include <msp430g2553.h>
 | |
| #include <stdint.h>
 | |
| #include <stdlib.h>
 | |
| 
 | |
| #include "spi.h"
 | |
| #include "psg.h"
 | |
| #include "scheduler.h"
 | |
| #include "sequencer.h"
 | |
| #include "melody_tetris.h"
 | |
| #include "melody_tusch1.h"
 | |
| #include "mute.h"
 | |
| 
 | |
| 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();
 | |
| 
 | |
| //  spiInit();
 | |
|   psgInit();
 | |
|   muteInit();
 | |
|   sequencerInit();
 | |
| 
 | |
|   __enable_interrupt();
 | |
| 
 | |
|   playMelodyTetris();
 | |
|   schAdd(playTusch1, NULL, 5000, 0);
 | |
|   schAdd(mute, NULL, 10000, 0);
 | |
|   schAdd(unMute, NULL, 12000, 0);
 | |
| 
 | |
|   while (1) {
 | |
|     schExec();
 | |
|   }
 | |
| }
 |