31 lines
731 B
C++
31 lines
731 B
C++
/*
|
|
* Start.cpp
|
|
*
|
|
* Created on: Feb 10, 2024
|
|
* Author: Gabriel
|
|
*/
|
|
|
|
#include "start.hpp"
|
|
#include "GPIO_Pin_STM32.hpp"
|
|
#include "SPI_Peripheral_STM32.hpp"
|
|
#include "BinLeds.hpp"
|
|
#include "SSL_Comms.hpp"
|
|
|
|
extern SPI_HandleTypeDef hspi2;
|
|
|
|
GPIO_Pin_STM32 ledOrange(LD3_GPIO_Port, LD3_Pin);
|
|
GPIO_Pin_STM32 ledGreen(LD4_GPIO_Port, LD4_Pin);
|
|
GPIO_Pin_STM32 ledRed(LD5_GPIO_Port, LD5_Pin);
|
|
GPIO_Pin_STM32 ledBlue(LD6_GPIO_Port, LD6_Pin);
|
|
BinLeds discoveryLeds((GPIO_Pin*[]){&ledOrange, &ledGreen, &ledRed, &ledBlue}, 4);
|
|
|
|
SPI_Peripheral_STM32 spiRadio(&hspi2, 1000);
|
|
|
|
GPIO_Pin_STM32 blueButton(B1_GPIO_Port, B1_Pin);
|
|
SSL_Comms radio0(&blueButton);
|
|
|
|
void start(){
|
|
spiRadio.init();
|
|
radio0.init();
|
|
}
|