gnea\grbl-Mega  1.0f
Source Code Documentation ( Internal Workings )
limits.h File Reference

Go to the source code of this file.

Functions

void limits_init ()
 Initialize the limits module. More...
 
void limits_disable ()
 Disables hard limits. More...
 
uint8_t limits_get_state ()
 Returns limit state as a bit-wise uint8 variable. More...
 
void limits_go_home (uint8_t cycle_mask)
 Perform one portion of the homing cycle based on the input settings. More...
 
void limits_soft_check (float *target)
 Check for soft limit violations. More...
 

Function Documentation

void limits_disable ( )

Disables hard limits.

< Disable specific pins of the Pin Change Interrupt

< Disable Pin Change Interrupt

Definition at line 57 of file limits.c.

uint8_t limits_get_state ( )

Returns limit state as a bit-wise uint8 variable.

Returns limit state as a bit-wise uint8 variable.

Definition at line 66 of file limits.c.

void limits_go_home ( uint8_t  cycle_mask)

Perform one portion of the homing cycle based on the input settings.

Perform one portion of the homing cycle based on the input settings.

Todo:
Move limit pin-specific calls to a general function for portability.

NOTE: settings.max_travel[] is stored as a negative value.

NOTE: This happens to compile smaller than any other implementation tried.

< [sqrt(N_AXIS)] Adjust so individual axes all move at homing rate.

< Set current homing rate.

< Bypass mc_line(). Directly plan homing motion.

< Set to execute homing motion and clear existing flags.

< Prep and fill segment buffer from newly planned block.

< Initiate motion

< Check and prep segment buffer.

NOTE: Should take no longer than 200us.

< Stop motors, if they are running.

< Immediately force kill steppers and reset step segment buffer.

< Delay to allow transient dynamics to dissipate.

NOTE: settings.max_travel[] is stored as a negative value.

< Return step control to normal operation.

Definition at line 145 of file limits.c.

void limits_init ( )

Initialize the limits module.

< Set as input pins

< Enable internal pull-up resistors. Normal high operation.

< Enable specific pins of the Pin Change Interrupt

< Enable Pin Change Interrupt

Definition at line 32 of file limits.c.

void limits_soft_check ( float *  target)

Check for soft limit violations.

Check for soft limit violations.

NOTE: Used by jogging to limit travel within soft-limit volume.

< Issue system reset and ensure spindle and coolant are shutdown.

< Indicate soft limit critical event

< Execute to enter critical event loop and system abort

Definition at line 342 of file limits.c.