Bladeren bron

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

Scott Lahteine 4 jaren geleden
bovenliggende
commit
6ab7baa413
3 gewijzigde bestanden met toevoegingen van 8 en 10 verwijderingen
  1. 2
    4
      Marlin/src/module/planner.h
  2. 5
    5
      Marlin/src/module/temperature.cpp
  3. 1
    1
      Marlin/src/module/temperature.h

+ 2
- 4
Marlin/src/module/planner.h Bestand weergeven

885
     // Wait for moves to finish and disable all steppers
885
     // Wait for moves to finish and disable all steppers
886
     static void finish_and_disable();
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
     // Called from the Temperature ISR at ~1kHz
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
      * Does the buffer have any blocks queued?
893
      * Does the buffer have any blocks queued?

+ 5
- 5
Marlin/src/module/temperature.cpp Bestand weergeven

2835
  *  - Step the babysteps value for each axis towards 0
2835
  *  - Step the babysteps value for each axis towards 0
2836
  *  - For PINS_DEBUGGING, monitor and report endstop pins
2836
  *  - For PINS_DEBUGGING, monitor and report endstop pins
2837
  *  - For ENDSTOP_INTERRUPTS_FEATURE check endstops if flagged
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
 HAL_TEMP_TIMER_ISR() {
2840
 HAL_TEMP_TIMER_ISR() {
2841
   HAL_timer_isr_prologue(TEMP_TIMER_NUM);
2841
   HAL_timer_isr_prologue(TEMP_TIMER_NUM);
2842
 
2842
 
2843
-  Temperature::tick();
2843
+  Temperature::isr();
2844
 
2844
 
2845
   HAL_timer_isr_epilogue(TEMP_TIMER_NUM);
2845
   HAL_timer_isr_epilogue(TEMP_TIMER_NUM);
2846
 }
2846
 }
2879
  *  - Endstop polling
2879
  *  - Endstop polling
2880
  *  - Planner clean buffer
2880
  *  - Planner clean buffer
2881
  */
2881
  */
2882
-void Temperature::tick() {
2882
+void Temperature::isr() {
2883
 
2883
 
2884
   static int8_t temp_count = -1;
2884
   static int8_t temp_count = -1;
2885
   static ADCSensorState adc_sensor_state = StartupDelay;
2885
   static ADCSensorState adc_sensor_state = StartupDelay;
3363
   // Poll endstops state, if required
3363
   // Poll endstops state, if required
3364
   endstops.poll();
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
 #if HAS_TEMP_SENSOR
3370
 #if HAS_TEMP_SENSOR

+ 1
- 1
Marlin/src/module/temperature.h Bestand weergeven

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

Laden…
Annuleren
Opslaan