device handler partly working
This commit is contained in:
@ -22,13 +22,17 @@ ReturnValue_t STM32TestTask::performPeriodicAction() {
|
||||
}
|
||||
|
||||
ReturnValue_t STM32TestTask::performOneShotAction() {
|
||||
// performSpiL3gd20hTest();
|
||||
// Might be confusing but if this is defined to 1, the real device handler is tested and we
|
||||
// should not mess with the SPI bus
|
||||
#if OBSW_PERFORM_L3GD20H_TEST == 0
|
||||
performSpiL3gd20hTest();
|
||||
#endif
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
void STM32TestTask::performSpiL3gd20hTest() {
|
||||
SPI_HandleTypeDef spiHandle = {};
|
||||
GyroL3GD20H gyroDevice(&spiHandle, spi::TransferModes::DMA);
|
||||
GyroL3GD20H gyroDevice(&spiHandle, spi::TransferModes::POLLING);
|
||||
gyroDevice.initialize();
|
||||
gyroDevice.performOperation();
|
||||
}
|
||||
|
Reference in New Issue
Block a user