Created structs and enums for alternate function UART pins

This commit is contained in:
2025-09-06 19:49:36 -07:00
parent f6e21fbd88
commit d763965cb8
6 changed files with 81 additions and 10 deletions

View File

@@ -55,7 +55,7 @@ void GPIO::setHigh() {
static_cast<GPIO_TypeDef*>(gpioPeripheral.registers)->ODR |= (1 << gpioPeripheral.global_offset);
}
void GPIO::toggle() {
void GPIO::toggle() volatile {
auto gpioPeripheral = getGPIORegister(m_GPIO_KEY);
static_cast<GPIO_TypeDef*>(gpioPeripheral.registers)->ODR ^= (1 << gpioPeripheral.global_offset);
}