extracted stm32 code
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user