Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
stepper.h
00001 /* 00002 stepper.h - stepper motor driver: executes motion plans of planner.c using the stepper motors 00003 Part of Grbl 00004 00005 Copyright (c) 2011-2016 Sungeun K. Jeon for Gnea Research LLC 00006 Copyright (c) 2009-2011 Simen Svale Skogsrud 00007 00008 Grbl 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 Grbl 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 Grbl. If not, see <http://www.gnu.org/licenses/>. 00020 */ 00021 00022 #ifndef stepper_h 00023 #define stepper_h 00024 00025 #ifndef SEGMENT_BUFFER_SIZE 00026 #ifdef AVRTARGET 00027 #define SEGMENT_BUFFER_SIZE 6 00028 #else 00029 #define SEGMENT_BUFFER_SIZE 10 00030 #endif 00031 #endif 00032 00033 // Initialize and setup the stepper motor subsystem 00034 void stepper_init(); 00035 00036 // Enable steppers, but cycle does not start unless called by motion control or realtime command. 00037 void st_wake_up(); 00038 00039 // Immediately disables steppers 00040 void st_go_idle(); 00041 00042 // Generate the step and direction port invert masks. 00043 void st_generate_step_dir_invert_masks(); 00044 00045 // Reset the stepper subsystem variables 00046 void st_reset(); 00047 00048 // Changes the run state of the step segment buffer to execute the special parking motion. 00049 void st_parking_setup_buffer(); 00050 00051 // Restores the step segment buffer to the normal run state after a parking motion. 00052 void st_parking_restore_buffer(); 00053 00054 // Reloads step segment buffer. Called continuously by realtime execution system. 00055 void st_prep_buffer(); 00056 00057 // Called by planner_recalculate() when the executing block is updated by the new plan. 00058 void st_update_plan_block_parameters(); 00059 00060 // Called by realtime status reporting if realtime rate reporting is enabled in config.h. 00061 float st_get_realtime_rate(); 00062 00063 extern const PORTPINDEF step_pin_mask[N_AXIS]; 00064 extern const PORTPINDEF direction_pin_mask[N_AXIS]; 00065 extern const PORTPINDEF limit_pin_mask[N_AXIS]; 00066 00067 #endif
Generated on Tue Jul 12 2022 20:45:31 by
 1.7.2
 1.7.2