1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 13:56:24 +00:00

tick() => isr() to spotlight interrupt-time

This commit is contained in:
Scott Lahteine 2021-04-08 15:43:16 -05:00 committed by Scott Lahteine
parent d34a143d82
commit 42d63258e9
3 changed files with 8 additions and 10 deletions

View File

@ -885,11 +885,9 @@ class Planner {
// Wait for moves to finish and disable all steppers
static void finish_and_disable();
// Periodic tick to handle cleaning timeouts
// Periodic handler to manage the cleaning buffer counter
// Called from the Temperature ISR at ~1kHz
static void tick() {
if (cleaning_buffer_counter) --cleaning_buffer_counter;
}
static void isr() { if (cleaning_buffer_counter) --cleaning_buffer_counter; }
/**
* Does the buffer have any blocks queued?

View File

@ -2835,12 +2835,12 @@ void Temperature::readings_ready() {
* - Step the babysteps value for each axis towards 0
* - For PINS_DEBUGGING, monitor and report endstop pins
* - For ENDSTOP_INTERRUPTS_FEATURE check endstops if flagged
* - Call planner.tick to count down its "ignore" time
* - Call planner.isr to count down its "ignore" time
*/
HAL_TEMP_TIMER_ISR() {
HAL_timer_isr_prologue(TEMP_TIMER_NUM);
Temperature::tick();
Temperature::isr();
HAL_timer_isr_epilogue(TEMP_TIMER_NUM);
}
@ -2879,7 +2879,7 @@ public:
* - Endstop polling
* - Planner clean buffer
*/
void Temperature::tick() {
void Temperature::isr() {
static int8_t temp_count = -1;
static ADCSensorState adc_sensor_state = StartupDelay;
@ -3363,8 +3363,8 @@ void Temperature::tick() {
// Poll endstops state, if required
endstops.poll();
// Periodically call the planner timer
planner.tick();
// Periodically call the planner timer service routine
planner.isr();
}
#if HAS_TEMP_SENSOR

View File

@ -600,8 +600,8 @@ class Temperature {
/**
* Called from the Temperature ISR
*/
static void isr();
static void readings_ready();
static void tick();
/**
* Call periodically to manage heaters