-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
38 lines (30 loc) · 1.15 KB
/
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
//
//updated by Paul McElroy on 11/9/2015
//For use in the Baby Bird Feeding Game
// Project libraries
#include "src/system.h"
#include "src/oled.h"
#include "src/led.h"
#include "src/buttons.h"
#include "src/buttons.h"
#include "src/game.h"
#include "src/speaker.h"
//*************************************************************************************************
// Main program to initialize hardware and execute Tasks.
//*************************************************************************************************
void main(void) {
// Create the tasks, the definitions are passed to the scheduler
xTaskCreate(OLEDTask, "OLEDTask", 512 + 256, NULL, 3, NULL); // Note the higher priority for the display
xTaskCreate(LEDTask, "LEDTask", 32, NULL, 1, NULL);
xTaskCreate(buttonsTask, "buttonsTask", 256, NULL, 1, NULL);
xTaskCreate(gameTask, "gameTask", 512, NULL, 2, NULL);
xTaskCreate(speakerTask, "speakerTask", 32, NULL, 4, NULL);
// Initialize system
systemInit();
// Display the initial image
startScreen();
// Start the FreeRTOS Scheduler
vTaskStartScheduler();
// The infinite loop is necessary for the FreeRTOS Scheduler
while(true);
}