-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMyProjectMain.cpp
56 lines (45 loc) · 1.58 KB
/
MyProjectMain.cpp
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
54
55
/*
* This empty project serves as a blueprint for new projects using FastArduino library.
* The project comes configured for all supported targets, but you may possibly
* choose only one target in your project.
* If you do use several targets it si likely that you will need to add conditional
* compilation with `#ifdef` to set different constants (e.g. pins, ports) according
* to each target you want to support, as shown below.
*/
// Include necessary fastarduino headers
//--------------------------------------
#include <fastarduino/boards/board.h>
#include <fastarduino/gpio.h>
// Define specific constants per target
//-------------------------------------
// If you have only one target then you can remove all this section.
#if defined(ARDUINO_UNO) || defined(BREADBOARD_ATMEGA328P) || defined(ARDUINO_NANO)
#elif defined(ARDUINO_LEONARDO)
#elif defined (ARDUINO_MEGA)
#elif defined (BREADBOARD_ATTINYX4)
#else
#error "Current target is not yet supported!"
#endif
// Register all ISR here if any
//-----------------------------
// Main entry point
//-----------------
// Your main() function is the starting point of your program, it will be called
// as soon as the MCU is switched on or reset.
int main()
{
// DO NOT REMOVE this line!
board::init();
// Add any specific initialization needed by your project before allowing interrupts
// Do something
// Enable interrupts
sei();
// Main loop should go here
while (true)
{
// Do your stuff here
}
// Normally you should never reach the following line, but it is necessary to
// make the compiler happy :-)
return 0;
}