Browse Source

Fix STM32 _WRITE macro parameter (#17121)

BigTreeTech 4 years ago
parent
commit
8bad6e11e2
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/src/HAL/HAL_STM32/fastio.h

+ 1
- 1
Marlin/src/HAL/HAL_STM32/fastio.h View File

55
     else   FastIOPortMap[STM_PORT(digitalPin[IO])]->BRR  = _BV32(STM_PIN(digitalPin[IO])) ; \
55
     else   FastIOPortMap[STM_PORT(digitalPin[IO])]->BRR  = _BV32(STM_PIN(digitalPin[IO])) ; \
56
   }while(0)
56
   }while(0)
57
 #else
57
 #else
58
-  #define _WRITE(IO, V) (FastIOPortMap[STM_PORT(digitalPin[IO])]->BSRR = _BV32(STM_PIN(digitalPin[IO]) + (V ? 0 : 16)))
58
+  #define _WRITE(IO, V) (FastIOPortMap[STM_PORT(digitalPin[IO])]->BSRR = _BV32(STM_PIN(digitalPin[IO]) + ((V) ? 0 : 16)))
59
 #endif
59
 #endif
60
 
60
 
61
 #define _READ(IO)               bool(READ_BIT(FastIOPortMap[STM_PORT(digitalPin[IO])]->IDR, _BV32(STM_PIN(digitalPin[IO]))))
61
 #define _READ(IO)               bool(READ_BIT(FastIOPortMap[STM_PORT(digitalPin[IO])]->IDR, _BV32(STM_PIN(digitalPin[IO]))))

Loading…
Cancel
Save