grblHAL core  20240704
protocol.c File Reference
#include <stdlib.h>
#include <string.h>
#include "hal.h"
#include "nuts_bolts.h"
#include "nvs_buffer.h"
#include "override.h"
#include "state_machine.h"
#include "motion_control.h"
#include "sleep.h"
#include "protocol.h"
#include "machine_limits.h"

Data Structures

union  line_flags_t
 
struct  delayed_task_t
 
struct  realtime_queue_t
 

Macros

#define RT_QUEUE_SIZE   16
 

Functions

bool protocol_enqueue_gcode (char *gcode)
 
bool protocol_main_loop (void)
 
bool protocol_buffer_synchronize (void)
 
void protocol_auto_cycle_start (void)
 
bool protocol_execute_realtime (void)
 
bool protocol_exec_rt_system (void)
 
ISR_CODE bool ISR_FUNC() protocol_enqueue_realtime_command (char c)
 
ISR_CODE bool ISR_FUNC() protocol_enqueue_foreground_task (fg_task_ptr fn, void *data)
 Enqueue a function to be called once by the foreground process. More...
 
ISR_CODE bool ISR_FUNC() protocol_enqueue_rt_command (on_execute_realtime_ptr fn)
 Enqueue a function to be called once by the foreground process. More...
 
void protocol_execute_noop (sys_state_t state)
 

Macro Definition Documentation

◆ RT_QUEUE_SIZE

#define RT_QUEUE_SIZE   16

Function Documentation

◆ protocol_auto_cycle_start()

void protocol_auto_cycle_start ( void  )

◆ protocol_buffer_synchronize()

bool protocol_buffer_synchronize ( void  )

◆ protocol_enqueue_foreground_task()

ISR_CODE bool ISR_FUNC() protocol_enqueue_foreground_task ( fg_task_ptr  fn,
void *  data 
)

Enqueue a function to be called once by the foreground process.

Parameters
fnpointer to a foreground_task_ptr type of function.
datapointer to data to be passed to the callee.
Returns
true if successful, false otherwise.

◆ protocol_enqueue_gcode()

bool protocol_enqueue_gcode ( char *  gcode)

◆ protocol_enqueue_realtime_command()

ISR_CODE bool ISR_FUNC() protocol_enqueue_realtime_command ( char  c)

◆ protocol_enqueue_rt_command()

ISR_CODE bool ISR_FUNC() protocol_enqueue_rt_command ( on_execute_realtime_ptr  fn)

Enqueue a function to be called once by the foreground process.

Parameters
fnpointer to a on_execute_realtime_ptr type of function.
Returns
true if successful, false otherwise. NOTE: Deprecated, use protocol_enqueue_foreground_task instead.

◆ protocol_exec_rt_system()

bool protocol_exec_rt_system ( void  )

◆ protocol_execute_noop()

void protocol_execute_noop ( sys_state_t  state)

◆ protocol_execute_realtime()

bool protocol_execute_realtime ( void  )

◆ protocol_main_loop()

bool protocol_main_loop ( void  )