Browse Source

Fix STM32 _WRITE macro parameter (#17121)

vanilla_fb_2.0.x
BigTreeTech 5 years ago
committed by GitHub
parent
commit
8bad6e11e2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Marlin/src/HAL/HAL_STM32/fastio.h

2
Marlin/src/HAL/HAL_STM32/fastio.h

@ -55,7 +55,7 @@ void FastIO_init(); // Must be called before using fast io macros
else FastIOPortMap[STM_PORT(digitalPin[IO])]->BRR = _BV32(STM_PIN(digitalPin[IO])) ; \
}while(0)
#else
#define _WRITE(IO, V) (FastIOPortMap[STM_PORT(digitalPin[IO])]->BSRR = _BV32(STM_PIN(digitalPin[IO]) + (V ? 0 : 16)))
#define _WRITE(IO, V) (FastIOPortMap[STM_PORT(digitalPin[IO])]->BSRR = _BV32(STM_PIN(digitalPin[IO]) + ((V) ? 0 : 16)))
#endif
#define _READ(IO) bool(READ_BIT(FastIOPortMap[STM_PORT(digitalPin[IO])]->IDR, _BV32(STM_PIN(digitalPin[IO]))))

Loading…
Cancel
Save