Merge pull request #8 from logxen/edge
[clinton/Smoothieware.git] / src / main.cpp
CommitLineData
4cff3ded
AW
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
4cff3ded
AW
8#include "libs/Kernel.h"
9#include "modules/tools/laser/Laser.h"
10#include "modules/tools/extruder/Extruder.h"
3c132bd0 11#include "modules/tools/temperaturecontrol/TemperatureControlPool.h"
13e4a3f9 12#include "modules/robot/Player.h"
4eb9c745 13#include "modules/utils/simpleshell/SimpleShell.h"
81b547a1 14#include "modules/utils/pausebutton/PauseButton.h"
b6c86164 15#include "libs/ChaNFSSD/SDFileSystem.h"
4cff3ded 16#include "libs/Config.h"
4eb9c745
AW
17#include "libs/nuts_bolts.h"
18#include "libs/utils.h"
4cff3ded 19
b6c86164 20#include "libs/USBCDCMSC/USBCDCMSC.h"
cd011f58
AW
21SDFileSystem sd(p5, p6, p7, p8, "sd"); // LPC17xx specific : comment if you are not using a SD card ( for example with a mBed ).
22//LocalFileSystem local("local"); // LPC17xx specific : comment if you are not running a mBed
23USBCDCMSC cdcmsc(&sd); // LPC17xx specific : Composite serial + msc USB device
4cff3ded 24
4cff3ded
AW
25int main() {
26
27 Kernel* kernel = new Kernel();
3a4fa0c1 28
cd011f58 29 kernel->serial->printf("Smoothie ( grbl port ) version 0.6 \r\nstart\r\n");
4cff3ded
AW
30
31 kernel->add_module( new Laser(p21) );
0eb11a06 32 kernel->add_module( new Extruder(p26,p27) );
4eb9c745 33 kernel->add_module( new SimpleShell() );
3c132bd0 34 kernel->add_module( new TemperatureControlPool() );
81b547a1
AW
35 kernel->add_module( new PauseButton() );
36
b6c86164 37 kernel->add_module( &cdcmsc );
423df6df 38
4cff3ded
AW
39 while(1){
40 kernel->call_event(ON_MAIN_LOOP);
41 }
4cff3ded 42}
13e4a3f9 43