merging edge into stepper
[clinton/Smoothieware.git] / src / main.cpp
1 /*
2 This file is part of Smoothie (http://smoothieware.org/). The motion control part is heavily based on Grbl (https://github.com/simen/grbl).
3 Smoothie is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
4 Smoothie is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
5 You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>.
6 */
7
8 #include "libs/Kernel.h"
9 #include "modules/tools/laser/Laser.h"
10 //#include "modules/tools/extruder/Extruder.h"
11 #include "modules/tools/temperaturecontrol/TemperatureControlPool.h"
12 #include "modules/tools/endstops/Endstops.h"
13 #include "modules/tools/switch/SwitchPool.h"
14 #include "modules/robot/Player.h"
15 #include "modules/utils/simpleshell/SimpleShell.h"
16 #include "modules/utils/configurator/Configurator.h"
17 #include "modules/utils/currentcontrol/CurrentControl.h"
18 #include "modules/utils/pausebutton/PauseButton.h"
19 #include "libs/ChaNFSSD/SDFileSystem.h"
20 #include "libs/Config.h"
21 #include "libs/nuts_bolts.h"
22 #include "libs/utils.h"
23
24 #include "libs/USBCDCMSC/USBCDCMSC.h"
25 SDFileSystem sd(p5, p6, p7, p8, "sd"); // LPC17xx specific : comment if you are not using a SD card ( for example with a mBed ).
26 //LocalFileSystem local("local"); // LPC17xx specific : comment if you are not running a mBed
27 USBCDCMSC cdcmsc(&sd); // LPC17xx specific : Composite serial + msc USB device
28
29 int main() {
30
31 Kernel* kernel = new Kernel();
32
33 kernel->streams->printf("Smoothie ( grbl port ) version 0.6.1 \r\n");
34
35 //kernel->add_module( new Laser(p21) );
36 //kernel->add_module( new Extruder() );
37 kernel->add_module( new SimpleShell() );
38 kernel->add_module( new Configurator() );
39 kernel->add_module( new CurrentControl() );
40 kernel->add_module( new TemperatureControlPool() );
41 kernel->add_module( new SwitchPool() );
42 kernel->add_module( new PauseButton() );
43 kernel->add_module( new Endstops() );
44
45 kernel->add_module( &cdcmsc );
46
47 kernel->streams->printf("start\r\n");
48
49 while(1){
50 kernel->call_event(ON_MAIN_LOOP);
51 kernel->call_event(ON_IDLE);
52 }
53 }
54