Files
F407-SX1280-FreeRTOS/Core/Src/Components/EXTIHandler_STM32.hpp

25 lines
631 B
C++

/*
* EXTIHandler_STM32.hpp
*
* Created on: Feb 24, 2024
* Author: gabriel
*/
#include "EXTIHandler.hpp"
#include "GPIO_Pin_STM32.hpp"
#ifndef SRC_COMPONENTS_EXTIHANDLER_STM32_HPP_
#define SRC_COMPONENTS_EXTIHANDLER_STM32_HPP_
class EXTIHandler_STM32 : public EXTIHandler {
public:
EXTIHandler_STM32();
int32_t registerCallback(std::function<void(void*)> callbackFunction, void* argument, GPIO_Pin* irqPin);
int32_t setCallbackEnabled(GPIO_Pin* irqPin, bool enabled);
void callback(uint16_t GPIO_Pin);
private:
uint8_t gpioPinToPinNumber(uint16_t GPIO_Pin);
};
#endif /* SRC_COMPONENTS_EXTIHANDLER_STM32_HPP_ */