Procházet zdrojové kódy

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

Scott Lahteine před 3 roky
rodič
revize
6ab7baa413

+ 2
- 4
Marlin/src/module/planner.h Zobrazit soubor

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

+ 5
- 5
Marlin/src/module/temperature.cpp Zobrazit soubor

@@ -2835,12 +2835,12 @@ void Temperature::readings_ready() {
2835 2835
  *  - Step the babysteps value for each axis towards 0
2836 2836
  *  - For PINS_DEBUGGING, monitor and report endstop pins
2837 2837
  *  - For ENDSTOP_INTERRUPTS_FEATURE check endstops if flagged
2838
- *  - Call planner.tick to count down its "ignore" time
2838
+ *  - Call planner.isr to count down its "ignore" time
2839 2839
  */
2840 2840
 HAL_TEMP_TIMER_ISR() {
2841 2841
   HAL_timer_isr_prologue(TEMP_TIMER_NUM);
2842 2842
 
2843
-  Temperature::tick();
2843
+  Temperature::isr();
2844 2844
 
2845 2845
   HAL_timer_isr_epilogue(TEMP_TIMER_NUM);
2846 2846
 }
@@ -2879,7 +2879,7 @@ public:
2879 2879
  *  - Endstop polling
2880 2880
  *  - Planner clean buffer
2881 2881
  */
2882
-void Temperature::tick() {
2882
+void Temperature::isr() {
2883 2883
 
2884 2884
   static int8_t temp_count = -1;
2885 2885
   static ADCSensorState adc_sensor_state = StartupDelay;
@@ -3363,8 +3363,8 @@ void Temperature::tick() {
3363 3363
   // Poll endstops state, if required
3364 3364
   endstops.poll();
3365 3365
 
3366
-  // Periodically call the planner timer
3367
-  planner.tick();
3366
+  // Periodically call the planner timer service routine
3367
+  planner.isr();
3368 3368
 }
3369 3369
 
3370 3370
 #if HAS_TEMP_SENSOR

+ 1
- 1
Marlin/src/module/temperature.h Zobrazit soubor

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

Loading…
Zrušit
Uložit