-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.cpp
More file actions
33 lines (24 loc) · 705 Bytes
/
main.cpp
File metadata and controls
33 lines (24 loc) · 705 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
//
// zero - pre-emptive multitasking kernel for AVR
//
// Techno Cosmic Research Institute Dirk Mahoney dirk@tcri.com.au
// Catchpole Robotics Christian Catchpole christian@catchpole.net
//
#include <avr/pgmspace.h>
#include "thread.h"
using namespace zero;
int myThreadMain()
{
// put your thread code here
while ( true ) {
// empty
}
// and if you exit, be sure to return something
return 0;
}
// Set things up, spawn your initial Threads. Get your party started here.
// But let main() exit - only once main() returns will the kernel finish initializing.
int main()
{
new Thread( PSTR( "myThreadName" ), 256, myThreadMain );
}