Changed SHAL_Peripheral to take in a void* of any peripheral struct, and added SHAL_Peripheral_Register for individual registers

This commit is contained in:
2025-08-30 16:57:52 -07:00
parent 2da3413329
commit 33fc098dfc
11 changed files with 139 additions and 78 deletions

View File

@@ -0,0 +1,25 @@
//
// Created by Luca on 8/30/2025.
//
#include "SHAL_GPIO.h"
GPIO::GPIO() {
}
GPIO::GPIO(GPIO_Key key) {
}
void GPIO::setLow() {
getGPIORegister(GPIO_KEY)->ODR &= ~(1 << getGPIOAPB(GPIO_KEY).offset);
}
void GPIO::setHigh() {
getGPIORegister(GPIO_KEY)->ODR |= (1 << getGPIOAPB(GPIO_KEY).offset);
}
void GPIO::toggle() {
}