2 This file is part of Smoothie (http://smoothieware.org/). The motion control part is heavily based on Grbl (https://github.com/simen/grbl).
3 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.
4 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.
5 You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>.
11 #include "libs/Module.h"
17 class Stepper
: public Module
21 void on_module_loaded();
22 void on_config_reload(void *argument
);
23 void on_block_begin(void *argument
);
24 void on_block_end(void *argument
);
25 void on_gcode_received(void *argument
);
26 void on_gcode_execute(void *argument
);
27 void on_play(void *argument
);
28 void on_pause(void *argument
);
29 void on_halt(void *argument
);
30 uint32_t main_interrupt(uint32_t dummy
);
31 void trapezoid_generator_reset();
32 void set_step_events_per_second(float);
33 void trapezoid_generator_tick(void);
34 uint32_t stepper_motor_finished_move(uint32_t dummy
);
35 int config_step_timer( int cycles
);
36 void turn_enable_pins_on();
37 void turn_enable_pins_off();
39 float get_trapezoid_adjusted_rate() const { return trapezoid_adjusted_rate
; }
40 const Block
*get_current_block() const { return current_block
; }
44 float trapezoid_adjusted_rate
;
45 StepperMotor
*main_stepper
;
48 bool enable_pins_status
:1;
49 bool force_speed_update
:1;