hal update

This commit is contained in:
Robin Müller 2021-06-10 14:19:26 +02:00
parent 8ab484d3ac
commit 1f9fcecd98
No known key found for this signature in database
GPG Key ID: BE6480244DFE612C
3 changed files with 11 additions and 7 deletions

View File

@ -18,6 +18,10 @@ ReturnValue_t STM32TestTask::performPeriodicAction() {
#endif
BSP_LED_Toggle(LED3);
}
if(gyro != nullptr) {
gyro->performOperation();
}
return TestTask::performPeriodicAction();
}
@ -31,8 +35,7 @@ ReturnValue_t STM32TestTask::performOneShotAction() {
}
void STM32TestTask::performSpiL3gd20hTest() {
SPI_HandleTypeDef spiHandle = {};
GyroL3GD20H gyroDevice(&spiHandle, spi::TransferModes::POLLING);
gyroDevice.initialize();
gyroDevice.performOperation();
gyro = new GyroL3GD20H(&spiHandle, spi::TransferModes::POLLING);
gyro->initialize();
gyro->performOperation();
}

View File

@ -5,7 +5,7 @@
#include "stm32h7xx_hal.h"
#include "stm32h7xx_hal_spi.h"
class GyroL3GD20H;
class STM32TestTask: public TestTask {
public:
@ -18,7 +18,8 @@ public:
private:
bool blinkyLed = false;
SPI_HandleTypeDef spiHandle = {};
GyroL3GD20H* gyro = nullptr;
};

@ -1 +1 @@
Subproject commit 92a3f131721da077ede6ef7c34f5837bccc58021
Subproject commit 05b64b05a3b5777298b28b2fa2ba544554bb2e3b