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:
25
SHAL/Src/Peripheral/GPIO/SHAL_GPIO.cpp
Normal file
25
SHAL/Src/Peripheral/GPIO/SHAL_GPIO.cpp
Normal 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() {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user