00001 #ifndef _GCODE_PARSE_H
00002 #define _GCODE_PARSE_H
00003
00004 #include <stdint.h>
00005
00006 #include "dda.h"
00007
00011 typedef struct {
00012 uint32_t mantissa;
00013 uint8_t exponent:7;
00014 uint8_t sign:1;
00015 } decfloat;
00016
00018 typedef struct {
00019 union {
00020 struct {
00021 uint8_t seen_G:1;
00022 uint8_t seen_M:1;
00023 uint8_t seen_X:1;
00024 uint8_t seen_Y:1;
00025 uint8_t seen_Z:1;
00026 uint8_t seen_F:1;
00027 uint8_t seen_S:1;
00028 uint8_t seen_P:1;
00029 uint8_t seen_T:1;
00030 uint8_t seen_N:1;
00031 uint8_t seen_parens_comment:1;
00032 uint8_t option_all_relative:1;
00033 uint8_t option_inches:1;
00034 };
00035 uint16_t flags;
00036 };
00037 uint8_t G;
00038 uint8_t M;
00039 TARGET target;
00040 int16_t S;
00041 uint16_t P;
00042 uint8_t T;
00043 } GCODE_COMMAND;
00044
00046 extern GCODE_COMMAND next_target;
00047
00048 void gcode_init(void);
00049
00051 void gcode_parse_char(uint8_t c);
00052
00053 #endif