Browse Source

Code style and comment tweaks

Scott Lahteine 5 years ago
parent
commit
6e658a7c04

+ 1
- 1
Marlin/src/HAL/HAL_DUE/HAL_SPI.cpp View File

240
   }
240
   }
241
 
241
 
242
   // all the others
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
   static uint8_t spiTransferX(uint8_t b) { // using Mode 0
245
   static uint8_t spiTransferX(uint8_t b) { // using Mode 0
246
     int bits = 8;
246
     int bits = 8;

+ 1
- 1
Marlin/src/HAL/HAL_DUE/usb/uotghs_device_due.c View File

1479
 	// The IN data don't must be written in endpoint 0 DPRAM during
1479
 	// The IN data don't must be written in endpoint 0 DPRAM during
1480
 	// a next setup reception in same endpoint 0 DPRAM.
1480
 	// a next setup reception in same endpoint 0 DPRAM.
1481
 	// Thereby, an OUT ZLP reception must check before IN data write
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
 	// before an eventually ZLP OUT and SETUP reception
1483
 	// before an eventually ZLP OUT and SETUP reception
1484
 	flags = cpu_irq_save();
1484
 	flags = cpu_irq_save();
1485
 	if (Is_udd_out_received(0)) {
1485
 	if (Is_udd_out_received(0)) {

+ 1
- 1
Marlin/src/HAL/HAL_ESP32/i2s.cpp View File

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

+ 1
- 1
Marlin/src/HAL/HAL_ESP32/timers.h View File

47
 
47
 
48
 #if ENABLED(I2S_STEPPER_STREAM)
48
 #if ENABLED(I2S_STEPPER_STREAM)
49
   #define STEPPER_TIMER_PRESCALE     1
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
   #define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs // wrong would be 0.25
51
   #define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs // wrong would be 0.25
52
 #else
52
 #else
53
   #define STEPPER_TIMER_PRESCALE     40
53
   #define STEPPER_TIMER_PRESCALE     40

+ 2
- 2
Marlin/src/HAL/HAL_LPC1768/u8g/LCD_delay.h View File

26
  *
26
  *
27
  * These are based on the LPC1768 routines.
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
 #ifdef __cplusplus
33
 #ifdef __cplusplus

+ 1
- 1
Marlin/src/MarlinCore.cpp View File

618
   #if PIN_EXISTS(FET_SAFETY)
618
   #if PIN_EXISTS(FET_SAFETY)
619
     static millis_t FET_next;
619
     static millis_t FET_next;
620
     if (ELAPSED(ms, FET_next)) {
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
       OUT_WRITE(FET_SAFETY_PIN, !FET_SAFETY_INVERTED);
622
       OUT_WRITE(FET_SAFETY_PIN, !FET_SAFETY_INVERTED);
623
       DELAY_US(2);
623
       DELAY_US(2);
624
       WRITE(FET_SAFETY_PIN, FET_SAFETY_INVERTED);
624
       WRITE(FET_SAFETY_PIN, FET_SAFETY_INVERTED);

+ 1
- 1
Marlin/src/module/configuration_store.cpp View File

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

+ 2
- 2
Marlin/src/module/stepper.cpp View File

1492
           // Don't step E here - But remember the number of steps to perform
1492
           // Don't step E here - But remember the number of steps to perform
1493
           motor_direction(E_AXIS) ? --LA_steps : ++LA_steps;
1493
           motor_direction(E_AXIS) ? --LA_steps : ++LA_steps;
1494
         #else
1494
         #else
1495
-          step_needed[E_AXIS] = delta_error.e >= 0;
1495
+          step_needed.e = delta_error.e >= 0;
1496
         #endif
1496
         #endif
1497
       }
1497
       }
1498
     #elif HAS_E0_STEP
1498
     #elif HAS_E0_STEP
1519
 
1519
 
1520
     #if DISABLED(LIN_ADVANCE)
1520
     #if DISABLED(LIN_ADVANCE)
1521
       #if ENABLED(MIXING_EXTRUDER)
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
       #elif HAS_E0_STEP
1523
       #elif HAS_E0_STEP
1524
         PULSE_START(E);
1524
         PULSE_START(E);
1525
       #endif
1525
       #endif

Loading…
Cancel
Save