-
-
Save thehans/7ac8a5f5030407dd94cee5c81dbafc15 to your computer and use it in GitHub Desktop.
Example concept of setting multiple disparate pins on STM32. (updated for separate GPIOA/B/C)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GPIOB->regs->ODR ^= (((data >> 0) & 3) ^ ((GPIOB->regs->ODR >> 8) & 3)) << 8; | |
GPIOC->regs->ODR ^= (((data >> 2) & 7) ^ ((GPIOC->regs->ODR >>13) & 7)) <<13; | |
GPIOA->regs->ODR ^= (((data >> 5) & 7) ^ ((GPIOA->regs->ODR >> 0) & 7)) << 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment