Quellcode durchsuchen

Fix "spontaneous heating" issue (WRITE bug) on STM32 (#13356)

Should fix "spontanous heating" problems due to order of operations error. Error occurs at least with ststm32 v5.1.0 in PlatformIO.
pinchies vor 5 Jahren
Ursprung
Commit
4c43e6c48b
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1
    1
      Marlin/src/HAL/HAL_STM32F1/fastio_STM32F1.h

+ 1
- 1
Marlin/src/HAL/HAL_STM32F1/fastio_STM32F1.h Datei anzeigen

@@ -30,7 +30,7 @@
30 30
 #include <libmaple/gpio.h>
31 31
 
32 32
 #define READ(IO)              (PIN_MAP[IO].gpio_device->regs->IDR & (1U << PIN_MAP[IO].gpio_bit) ? HIGH : LOW)
33
-#define WRITE(IO,V)           (PIN_MAP[IO].gpio_device->regs->BSRR = (1U << PIN_MAP[IO].gpio_bit) << (16 * !(bool)V))
33
+#define WRITE(IO,V)           (PIN_MAP[IO].gpio_device->regs->BSRR = (1U << PIN_MAP[IO].gpio_bit) << (16 * !((bool)V)))
34 34
 #define TOGGLE(IO)            (PIN_MAP[IO].gpio_device->regs->ODR = PIN_MAP[IO].gpio_device->regs->ODR ^ (1U << PIN_MAP[IO].gpio_bit))
35 35
 #define WRITE_VAR(IO,V)       WRITE(IO,V)
36 36
 

Laden…
Abbrechen
Speichern