extracted stm32 code
This commit is contained in:
parent
c84524c90c
commit
4155b44513
@ -29,6 +29,10 @@ if(TGT_BSP MATCHES "arm/raspberrypi")
|
||||
set(FSFW_HAL_ADD_RASPBERRY_PI ON)
|
||||
endif()
|
||||
|
||||
if(TGT_BSP MATCHES "arm/stm32h743zi-nucleo")
|
||||
set(FSFW_HAL_ADD_STM32H7 ON)
|
||||
endif()
|
||||
|
||||
# Perform steps like loading toolchain files where applicable.
|
||||
include(${CMAKE_SCRIPT_PATH}/PreProjectConfig.cmake)
|
||||
pre_project_config()
|
||||
@ -37,7 +41,6 @@ pre_project_config()
|
||||
project(fsfw_example ASM C CXX)
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
# Pre-Sources preparation
|
||||
################################################################################
|
||||
|
@ -29,6 +29,7 @@ target_sources(${LIB_STM_HAL_NAME} PRIVATE
|
||||
Src/stm32h7xx_hal_pwr.c
|
||||
Src/stm32h7xx_hal_pwr_ex.c
|
||||
Src/stm32h7xx_hal_i2c.c
|
||||
Src/stm32h7xx_hal_spi.c
|
||||
Src/stm32h7xx_hal_i2c_ex.c
|
||||
Src/stm32h7xx_hal_uart.c
|
||||
Src/stm32h7xx_hal_uart_ex.c
|
||||
|
@ -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;
|
||||
|
BIN
doc/stm32_nucleo/stm32h743-rm0433-datasheet.pdf
Normal file
BIN
doc/stm32_nucleo/stm32h743-rm0433-datasheet.pdf
Normal file
Binary file not shown.
2
fsfw_hal
2
fsfw_hal
@ -1 +1 @@
|
||||
Subproject commit 4ba4e45789a9fc37c8ff45d09b7986ee1dbd53ca
|
||||
Subproject commit 4c546820fdb28bf46fae6606716ae34e2f4ba950
|
Reference in New Issue
Block a user