Files
F407-SX1280-FreeRTOS/Core/Src/Components/SSL_Comms.cpp

38 lines
735 B
C++

/*
* SSL_Radio.cpp
*
* Created on: Feb 24, 2024
* Author: gabriel
*/
#include "SSL_Comms.hpp"
#include "main.h"
#include "EXTIHandler.hpp"
#include "SX1280Lib/sx1280-hal.h"
extern SPI_HandleTypeDef hspi1;
SX1280Hal pRadio(pSpiPeripheral, pNssPin, pBusyPin, pIrqPin, pRstPin, callbacks);
SSL_Comms::SSL_Comms(GPIO_Pin* but) : but(but) {
// TODO Auto-generated constructor stub
}
SSL_Comms::~SSL_Comms() {
// TODO Auto-generated destructor stub
}
void SSL_Comms::irqCallback(void *arg) {
__NOP();
}
int32_t SSL_Comms::init(){
__NOP();
std::function<void(void*)> callbackFunction = [this](void* ptr){irqCallback(ptr);};
EXTIHandler::getInstance()->registerCallback(callbackFunction, nullptr, but);
return 0;
}