extracted stm32 code

This commit is contained in:
2021-05-31 20:40:58 +02:00
parent c84524c90c
commit 4155b44513
6 changed files with 20 additions and 2 deletions

View File

@ -2,6 +2,9 @@
#include "stm32h7xx_nucleo.h"
#include "OBSWConfig.h"
#include "fsfw_hal/stm32h7/devicetest/GyroL3GD20H.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
STM32TestTask::STM32TestTask(object_id_t objectId, bool enablePrintout,
bool blinkyLed): TestTask(objectId, enablePrintout),
blinkyLed(blinkyLed) {
@ -19,5 +22,11 @@ ReturnValue_t STM32TestTask::performPeriodicAction() {
}
ReturnValue_t STM32TestTask::performOneShotAction() {
performSpiL3gd20hTest();
return HasReturnvaluesIF::RETURN_OK;
}
void STM32TestTask::performSpiL3gd20hTest() {
SPI_HandleTypeDef spiHandle = {};
GyroL3GD20H gyroDevice(&spiHandle);
}

View File

@ -2,6 +2,10 @@
#define BSP_STM32_BOARDTEST_STM32TESTTASK_H_
#include <test/TestTask.h>
#include "stm32h7xx_hal.h"
#include "stm32h7xx_hal_spi.h"
class STM32TestTask: public TestTask {
public:
@ -10,6 +14,7 @@ public:
ReturnValue_t performPeriodicAction() override;
ReturnValue_t performOneShotAction() override;
void performSpiL3gd20hTest();
private:
bool blinkyLed = false;