-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
55 lines (38 loc) · 969 Bytes
/
main.c
File metadata and controls
55 lines (38 loc) · 969 Bytes
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
51
52
53
/*
* File: main.c
* Author: Scott
*
* Created on April 4, 2018, 8:02 PM
*/
#include "main.h"
#include "config.h"
#include "timer.h"
#include "clock.h"
#include "sevenseg.h"
#include "buttons.h"
#include "RGB.h"
#include "speaker.h"
void main(void)
{
SYSTEM_TICKS = 0;
//initialize everything!
initialize_peripherals();
enable_interrupts();
init_RGB();
init_sevenseg();
init_buttons();
init_speaker();
//==================MAIN LOOP=======================
while(1)
{
//Basically just check tasks in order to see whether there is something to do
//update time display
sevenseg_update_display();
//check whether alarm has occurred
clock_handle_alarms();
//handle input from the user
buttons_handle_input();
//update the RGB LED back-lighting
RGB_update_LEDs();
}
}