Adicionados drivers de SPI e GPIO
This commit is contained in:
25
Core/Src/Components/start.cpp
Normal file
25
Core/Src/Components/start.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* 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"
|
||||
|
||||
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);
|
||||
|
||||
void start(){
|
||||
spiRadio.init();
|
||||
}
|
||||
Reference in New Issue
Block a user