adding the Endstop module, first commit
[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"
feb204be 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"
cf44cb59 14#include "modules/utils/configurator/Configurator.h"
0e8b102e 15#include "modules/utils/currentcontrol/CurrentControl.h"
81b547a1 16#include "modules/utils/pausebutton/PauseButton.h"
b6c86164 17#include "libs/ChaNFSSD/SDFileSystem.h"
4cff3ded 18#include "libs/Config.h"
4eb9c745
AW
19#include "libs/nuts_bolts.h"
20#include "libs/utils.h"
4cff3ded 21
feb204be
AW
22//#include "libs/USBCDCMSC/USBCDCMSC.h"
23//SDFileSystem sd(p5, p6, p7, p8, "sd"); // LPC17xx specific : comment if you are not using a SD card ( for example with a mBed ).
24LocalFileSystem local("local"); // LPC17xx specific : comment if you are not running a mBed
25//USBCDCMSC cdcmsc(&sd); // LPC17xx specific : Composite serial + msc USB device
4cff3ded 26
4cff3ded 27int main() {
feb204be 28
4cff3ded 29 Kernel* kernel = new Kernel();
3a4fa0c1 30
26c569a2 31 kernel->serial->printf("Smoothie ( grbl port ) version 0.6 \r\n");
4cff3ded
AW
32
33 kernel->add_module( new Laser(p21) );
feb204be 34 //kernel->add_module( new Extruder() );
4eb9c745 35 kernel->add_module( new SimpleShell() );
d3a6143b 36 kernel->add_module( new Configurator() );
0e8b102e 37 kernel->add_module( new CurrentControl() );
3c132bd0 38 kernel->add_module( new TemperatureControlPool() );
81b547a1
AW
39 kernel->add_module( new PauseButton() );
40
feb204be 41 //kernel->add_module( &cdcmsc );
26c569a2
AW
42
43 kernel->serial->printf("start\r\n");
423df6df 44
4cff3ded
AW
45 while(1){
46 kernel->call_event(ON_MAIN_LOOP);
f9005ebe 47 kernel->call_event(ON_IDLE);
4cff3ded 48 }
4cff3ded 49}
13e4a3f9 50