grblHAL core  20241107
gcode.c File Reference
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include "hal.h"
#include "motion_control.h"
#include "protocol.h"
#include "state_machine.h"
#include "ngc_params.h"

Data Structures

union  modal_groups_t
 
struct  word_bit_t
 
union  ijk_words_t
 

Macros

#define MAX_LINE_NUMBER   10000000
 
#define MAX_TOOL_NUMBER   4294967294
 
#define MACH3_SCALING
 
#define I_VALUE   X_AXIS
 
#define J_VALUE   Y_AXIS
 
#define K_VALUE   Z_AXIS
 
#define FAIL(status)   return(status);
 

Enumerations

enum  axis_command_t {
  AxisCommand_None = 0 , AxisCommand_NonModal , AxisCommand_MotionMode , AxisCommand_ToolLengthOffset ,
  AxisCommand_Scaling
}
 

Functions

parser_state_tgc_get_state (void)
 
float * gc_get_scaling (void)
 
axes_signals_t gc_get_g51_state (void)
 
float gc_get_offset (uint_fast8_t idx, bool real_time)
 
void gc_set_tool_offset (tool_offset_mode_t mode, uint_fast8_t idx, int32_t offset)
 
plane_tgc_get_plane_data (plane_t *plane, plane_select_t select)
 
void gc_init (void)
 
bool gc_laser_ppi_enable (uint_fast16_t ppi, uint_fast16_t pulse_length)
 
spindle_tgc_spindle_get (spindle_num_t spindle)
 
void gc_spindle_off (void)
 
void gc_coolant (coolant_state_t state)
 
void gc_output_message (char *message)
 
parameter_words_t gc_get_g65_arguments (void)
 
bool gc_modal_state_restore (gc_modal_t *copy)
 
char * gc_normalize_block (char *block, status_code_t *status, char **message)
 
status_code_t gc_execute_block (char *block)
 

Variables

parser_state_t gc_state
 

Macro Definition Documentation

◆ FAIL

#define FAIL (   status)    return(status);

◆ I_VALUE

#define I_VALUE   X_AXIS

◆ J_VALUE

#define J_VALUE   Y_AXIS

◆ K_VALUE

#define K_VALUE   Z_AXIS

◆ MACH3_SCALING

#define MACH3_SCALING

◆ MAX_LINE_NUMBER

#define MAX_LINE_NUMBER   10000000

◆ MAX_TOOL_NUMBER

#define MAX_TOOL_NUMBER   4294967294

Enumeration Type Documentation

◆ axis_command_t

Enumerator
AxisCommand_None 
AxisCommand_NonModal 
AxisCommand_MotionMode 
AxisCommand_ToolLengthOffset 
AxisCommand_Scaling 

Function Documentation

◆ gc_coolant()

void gc_coolant ( coolant_state_t  state)

◆ gc_execute_block()

status_code_t gc_execute_block ( char *  block)

◆ gc_get_g51_state()

axes_signals_t gc_get_g51_state ( void  )

◆ gc_get_g65_arguments()

parameter_words_t gc_get_g65_arguments ( void  )

◆ gc_get_offset()

float gc_get_offset ( uint_fast8_t  idx,
bool  real_time 
)

◆ gc_get_plane_data()

plane_t* gc_get_plane_data ( plane_t plane,
plane_select_t  select 
)

◆ gc_get_scaling()

float* gc_get_scaling ( void  )

◆ gc_get_state()

parser_state_t* gc_get_state ( void  )

◆ gc_init()

void gc_init ( void  )

◆ gc_laser_ppi_enable()

bool gc_laser_ppi_enable ( uint_fast16_t  ppi,
uint_fast16_t  pulse_length 
)

◆ gc_modal_state_restore()

bool gc_modal_state_restore ( gc_modal_t copy)

◆ gc_normalize_block()

char* gc_normalize_block ( char *  block,
status_code_t *  status,
char **  message 
)

◆ gc_output_message()

void gc_output_message ( char *  message)

◆ gc_set_tool_offset()

void gc_set_tool_offset ( tool_offset_mode_t  mode,
uint_fast8_t  idx,
int32_t  offset 
)

◆ gc_spindle_get()

spindle_t* gc_spindle_get ( spindle_num_t  spindle)

◆ gc_spindle_off()

void gc_spindle_off ( void  )

Variable Documentation

◆ gc_state

parser_state_t gc_state