-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathplayer.h
50 lines (40 loc) · 913 Bytes
/
player.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* Bob Somers 2011
* http://bobsomers.com
*
* Released under the Beerware License
* http://en.wikipedia.org/wiki/Beerware
*/
#ifndef PLAYER_H_
#define PLAYER_H_
#include "music.h"
/* Define led port connections. */
#define LED_RED BIT0
#define LED_GREEN BIT6
#define LED_DIR P1DIR
#define LED_OUT P1OUT
/* Define button connections. */
#define BUTTON BIT3
#define BUTTON_DIR P1DIR
#define BUTTON_IN P1IN
/* Define speaker connections. */
#define SPEAKER BIT7
#define SPEAKER_DIR P1DIR
#define SPEAKER_OUT P1OUT
/*
* Intialize the necessary peripherals.
*/
void init();
/*
* CCR0 timer interrupt handler (note signal).
*/
void __attribute__((interrupt (TIMERA0_VECTOR))) timer_sound_isr();
/*
* TAIV timer interrupt handler (elapsed time counting).
*/
void __attribute__((interrupt (TIMERA1_VECTOR))) timer_elapsed_isr();
/*
* Program entry point.
*/
int main();
#endif // PLAYER_H_