-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.c
48 lines (35 loc) · 857 Bytes
/
main.c
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
/*
* main.c
*
* "DE808" Classic TR808/909 style drum machine implemented on
* a De1-SoC.
*
*
* Authors: Nicholas Savva, Calum Boustead, Samrudh Sharma
*/
#include "DE1SoC_LT24/DE1SoC_LT24.h"
#include "Playback_Engine/Playback_Engine.h"
#include <stdlib.h>
#include <stdio.h>
int main(void) {
//Init Peripherals
setup_playback();
setup_codec();
setup_graphics();
//fillFIFO();
setup_IRQ();
update7seg(128);
//Reset the watchdog.
HPS_ResetWatchdog();
ResetWDT();
//////////////////////////////////////////////////////////////////////////////////////////////
while (1) {
audioPlaybackPolling();
HPS_ResetWatchdog();
//These functions are constantly polled as the push button ISR sets a flag if these need to be called
//(Keeps button ISR as short as possible)
latchSequence();
incrementCH();
updateBPM();
}
}