Skip to content
Snippets Groups Projects
Unverified Commit 8bad6e11 authored by BigTreeTech's avatar BigTreeTech Committed by GitHub
Browse files

Fix STM32 _WRITE macro parameter (#17121)

parent 112245ee
Branches
Tags
No related merge requests found
......@@ -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]))))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment