Data Structures |
struct | note |
| datastructure to store a note. More...
|
Defines |
#define | SPEAKERPORT LATCbits.LATC2 |
Functions |
void | initSound (void) |
| Initialize sound functionality. This routine initializes sound functionality of the Dwengo board. It configures the C pins as digital outputs. C2 is used as the speaker output. It also configures timer0 and timer1 and dispatches the sound interrupt service routine, using the dwengo interrupt library. Timer0 is the low interrupt timer. Its interrupts determine the rythm. Timer1 is the high interrupt timer. This one regulates the frequency of the notes.
|
void | startSong (note *song, unsigned int bpm) |
| Plays a song.
|
void | stopSound (void) |
| stops the timers, effectively stopping the sound.
|
void | playFrequency (unsigned int frequency) |
| keeps generating a tone on the C2 pin untill stopSound() is called
|
void | frequencyHighISR () |
| ISR that handles the frequency.
|
void | beatLowISR () |
| ISR that handles the tempo.
|
unsigned int | noteFrequency (note Note) |
| help function that returns the frequency of a note.
|
Sound library for Dwengo.