Skip to content

Commit

Permalink
Fix STM32 _WRITE macro parameter (MarlinFirmware#17121)
Browse files Browse the repository at this point in the history
  • Loading branch information
bigtreetech authored and oechslein committed Mar 21, 2020
1 parent 2f3a74e commit 97495d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Marlin/src/HAL/HAL_STM32/fastio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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]))))
Expand Down

0 comments on commit 97495d5

Please sign in to comment.