yarf 0.1
Yet Another RepRap Firmware
|
00001 /* 00002 * yarf.c 00003 * 00004 * Copyright 2011 Pieter Agten 00005 * 00006 * This file is part of Yarf. 00007 * 00008 * Yarf is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation, either version 3 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * Yarf is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with Yarf. If not, see <http://www.gnu.org/licenses/>. 00020 */ 00021 00032 #include "yarf.h" 00033 00034 00035 #include "hardware/io.h" 00036 #include "hardware/usart.h" 00037 #include "hardware/steppers.h" 00038 #include "hardware/clock.h" 00039 #include "input/gcode.h" 00040 #include "movement/planner.h" 00041 #include "movement/block_handler.h" 00042 #include "scheduling/periodic.h" 00043 #include "temperature/temperature.h" 00044 00045 #include <avr/interrupt.h> 00046 00055 FUSES = 00056 { 00057 .low = LFUSE, 00058 .high = HFUSE, 00059 .extended = EFUSE, 00060 }; 00061 00062 00063 00071 int 00072 main(void) 00073 { 00074 /* Initialization */ 00075 usart_init(); 00076 io_init(); 00077 clock_init(); 00078 periodic_init(); 00079 temp_init(); 00080 steppers_init(); 00081 gcode_init(&HOST_USART); 00082 plan_init(); 00083 block_handler_init(); 00084 00085 /* Enable the global interrupt flag */ 00086 sei(); 00087 00088 fprintf(&HOST_USART,"start\n"); 00089 while (true) { 00090 gcode_process_command(); 00091 } 00092 } 00093