Quellcode durchsuchen

Code style and comment tweaks

Scott Lahteine vor 5 Jahren
Ursprung
Commit
6e658a7c04

+ 1
- 1
Marlin/src/HAL/HAL_DUE/HAL_SPI.cpp Datei anzeigen

@@ -240,7 +240,7 @@
240 240
   }
241 241
 
242 242
   // all the others
243
-  static uint32_t spiDelayCyclesX4 = (F_CPU) / 1000000; // 4uS => 125khz
243
+  static uint32_t spiDelayCyclesX4 = (F_CPU) / 1000000; // 4µs => 125khz
244 244
 
245 245
   static uint8_t spiTransferX(uint8_t b) { // using Mode 0
246 246
     int bits = 8;

+ 1
- 1
Marlin/src/HAL/HAL_DUE/usb/uotghs_device_due.c Datei anzeigen

@@ -1479,7 +1479,7 @@ static void udd_ctrl_in_sent(void)
1479 1479
 	// The IN data don't must be written in endpoint 0 DPRAM during
1480 1480
 	// a next setup reception in same endpoint 0 DPRAM.
1481 1481
 	// Thereby, an OUT ZLP reception must check before IN data write
1482
-	// and if no OUT ZLP is recevied the data must be written quickly (800us)
1482
+	// and if no OUT ZLP is received the data must be written quickly (800µs)
1483 1483
 	// before an eventually ZLP OUT and SETUP reception
1484 1484
 	flags = cpu_irq_save();
1485 1485
 	if (Is_udd_out_received(0)) {

+ 1
- 1
Marlin/src/HAL/HAL_ESP32/i2s.cpp Datei anzeigen

@@ -177,7 +177,7 @@ int i2s_init() {
177 177
    *
178 178
    *   fwclk = fbclk / 32
179 179
    *
180
-   *   for fwclk = 250kHz (4uS pulse time)
180
+   *   for fwclk = 250kHz (4µS pulse time)
181 181
    *      N = 10
182 182
    *      M = 20
183 183
    */

+ 1
- 1
Marlin/src/HAL/HAL_ESP32/timers.h Datei anzeigen

@@ -47,7 +47,7 @@ typedef uint64_t hal_timer_t;
47 47
 
48 48
 #if ENABLED(I2S_STEPPER_STREAM)
49 49
   #define STEPPER_TIMER_PRESCALE     1
50
-  #define STEPPER_TIMER_RATE         250000                           // 250khz, 4us pulses of i2s word clock
50
+  #define STEPPER_TIMER_RATE         250000                           // 250khz, 4µs pulses of i2s word clock
51 51
   #define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs // wrong would be 0.25
52 52
 #else
53 53
   #define STEPPER_TIMER_PRESCALE     40

+ 2
- 2
Marlin/src/HAL/HAL_LPC1768/u8g/LCD_delay.h Datei anzeigen

@@ -26,8 +26,8 @@
26 26
  *
27 27
  * These are based on the LPC1768 routines.
28 28
  *
29
- * Couldn't just call exact copies because the overhead resulted in the
30
- * one microsecond delay being about 4uS.
29
+ * Couldn't just call exact copies because the overhead
30
+ * results in a one microsecond delay taking about 4µS.
31 31
  */
32 32
 
33 33
 #ifdef __cplusplus

+ 1
- 1
Marlin/src/MarlinCore.cpp Datei anzeigen

@@ -618,7 +618,7 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
618 618
   #if PIN_EXISTS(FET_SAFETY)
619 619
     static millis_t FET_next;
620 620
     if (ELAPSED(ms, FET_next)) {
621
-      FET_next = ms + FET_SAFETY_DELAY;  // 2uS pulse every FET_SAFETY_DELAY mS
621
+      FET_next = ms + FET_SAFETY_DELAY;  // 2µs pulse every FET_SAFETY_DELAY mS
622 622
       OUT_WRITE(FET_SAFETY_PIN, !FET_SAFETY_INVERTED);
623 623
       DELAY_US(2);
624 624
       WRITE(FET_SAFETY_PIN, FET_SAFETY_INVERTED);

+ 1
- 1
Marlin/src/module/configuration_store.cpp Datei anzeigen

@@ -2352,7 +2352,7 @@ void MarlinSettings::reset() {
2352 2352
   #endif
2353 2353
 
2354 2354
   #if HAS_BED_PROBE
2355
-    constexpr float dpo[XYZ] = NOZZLE_TO_PROBE_OFFSET;
2355
+    constexpr float dpo[] = NOZZLE_TO_PROBE_OFFSET;
2356 2356
     static_assert(COUNT(dpo) == 3, "NOZZLE_TO_PROBE_OFFSET must contain offsets for X, Y, and Z.");
2357 2357
     #if HAS_PROBE_XY_OFFSET
2358 2358
       LOOP_XYZ(a) probe_offset[a] = dpo[a];

+ 2
- 2
Marlin/src/module/stepper.cpp Datei anzeigen

@@ -1492,7 +1492,7 @@ void Stepper::stepper_pulse_phase_isr() {
1492 1492
           // Don't step E here - But remember the number of steps to perform
1493 1493
           motor_direction(E_AXIS) ? --LA_steps : ++LA_steps;
1494 1494
         #else
1495
-          step_needed[E_AXIS] = delta_error.e >= 0;
1495
+          step_needed.e = delta_error.e >= 0;
1496 1496
         #endif
1497 1497
       }
1498 1498
     #elif HAS_E0_STEP
@@ -1519,7 +1519,7 @@ void Stepper::stepper_pulse_phase_isr() {
1519 1519
 
1520 1520
     #if DISABLED(LIN_ADVANCE)
1521 1521
       #if ENABLED(MIXING_EXTRUDER)
1522
-        if (step_needed[E_AXIS]) E_STEP_WRITE(mixer.get_next_stepper(), !INVERT_E_STEP_PIN);
1522
+        if (step_needed.e) E_STEP_WRITE(mixer.get_next_stepper(), !INVERT_E_STEP_PIN);
1523 1523
       #elif HAS_E0_STEP
1524 1524
         PULSE_START(E);
1525 1525
       #endif

Laden…
Abbrechen
Speichern