yarf 0.1
Yet Another RepRap Firmware
src/input/gcode.h
Go to the documentation of this file.
00001 /*
00002  * gcode.h
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 
00030 #ifndef GCODE_H
00031 #define GCODE_H
00032 
00033 #include <stdio.h>
00034 
00035 #define GCODE_UNEXPECTED_LINE                    -8
00036 #define GCODE_SYNTAX_ERROR                       -7
00037 #define GCODE_COMMAND_UNKNOWN                    -6
00038 #define GCODE_PARSE_COMMAND_CHECKSUM_FAILED      -5
00039 #define GCODE_PARSE_COMMAND_READ_FAILURE         -4
00040 #define GCODE_PARSE_COMMAND_UNEXPECTED_CHARACTER -3
00041 #define GCODE_PARSE_COMMAND_SYNTAX_ERROR         -2
00042 #define GCODE_PARSE_COMMAND_EMPTY                -1
00043 #define GCODE_PARSE_COMMAND_SUCCESS               0
00044 #define GCODE_PROCESS_COMMAND_SUCCESS             0
00045 
00052 void gcode_init(FILE *host_stream);
00053 
00060 int gcode_process_command(void);
00061 
00062 #endif //GCODE_H
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines