-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdavinci.c
48 lines (41 loc) · 1.01 KB
/
davinci.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
48
/* File: davinci.c
* =-=-=-=-=-=-=-=
* @author Joe Robertazzi - Winter 2024 - <tazzi@stanford.edu>
* Main program to run Legonardo Davinci project. Contains
* all relavent dependencies and runs the printer in main
* function.
*/
// Library Imports
#include "console.h"
#include "interrupts.h"
#include "keyboard.h"
#include "shell.h"
#include "timer.h"
#include "uart.h"
// Project Imports
#include "bitmaps.h"
#include "colormaps.h"
#include "img_process.h"
#include "printer.h"
#include "printer_assets.h"
#include "printer_driver.h"
// Constants
#define NA -1
// Main Executon
void main(void) {
// Asset Initialization:
interrupts_init();
gpio_init();
timer_init();
uart_init();
// Printer Initialization:
configure_steppers();
configure_limit_switches();
configure_vacuum();
// Keyboard Initialization:
keyboard_init(KEYBOARD_CLOCK, KEYBOARD_DATA);
// Printer Initialization:
printer_init(keyboard_read_next);
interrupts_global_enable();
printer_run();
}