Skip to content

Instantly share code, notes, and snippets.

@MayaPosch

MayaPosch/stm32_gpio_write.cpp Secret

Created Oct 28, 2020
Embed
What would you like to do?
STM32 GPIO write
if (level == GPIO_LEVEL_LOW) {
instance.regs->ODR &= ~(0x1 << pin);
}
else if (level == GPIO_LEVEL_HIGH) {
instance.regs->ODR |= (0x1 << pin);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.