Fork of Smoothie to port to mbed non-LPC targets.
Fork of Smoothie by
StepTicker.h
00001 /* 00002 This file is part of Smoothie (http://smoothieware.org/). The motion control part is heavily based on Grbl (https://github.com/simen/grbl). 00003 Smoothie is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 00004 Smoothie is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 00005 You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>. 00006 */ 00007 00008 00009 00010 #ifndef STEPTICKER_H 00011 #define STEPTICKER_H 00012 00013 using namespace std; 00014 #include <vector> 00015 #include <stdint.h> 00016 00017 #include "libs/Module.h" 00018 00019 class StepperMotor; 00020 00021 class StepTicker{ 00022 public: 00023 StepTicker(); 00024 void set_frequency( float frequency ); 00025 void tick(); 00026 void signal_moves_finished(); 00027 StepperMotor* add_stepper_motor(StepperMotor* stepper_motor); 00028 void set_reset_delay( float seconds ); 00029 void reset_tick(); 00030 void add_motor_to_active_list(StepperMotor* motor); 00031 void remove_motor_from_active_list(StepperMotor* motor); 00032 00033 float frequency; 00034 vector<StepperMotor*> stepper_motors; 00035 uint32_t delay; 00036 uint32_t period; 00037 uint32_t debug; 00038 uint32_t last_duration; 00039 bool has_axes; 00040 00041 bool moves_finished; 00042 bool reset_step_pins; 00043 00044 StepperMotor* active_motors[12]; 00045 uint32_t active_motor_bm; 00046 00047 }; 00048 00049 00050 00051 #endif
Generated on Tue Jul 12 2022 20:09:02 by 1.7.2