From 543ee54ccaf7336b0789d378c8c598676c8f90a6 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 10 Jun 2021 21:35:26 +0200 Subject: [PATCH] and now the cfg file not needed anymore --- stm32h7/devicetest/GyroL3GD20H.cpp | 2 +- stm32h7/spi/mspInit.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/stm32h7/devicetest/GyroL3GD20H.cpp b/stm32h7/devicetest/GyroL3GD20H.cpp index 08d73fb..7abdd5f 100644 --- a/stm32h7/devicetest/GyroL3GD20H.cpp +++ b/stm32h7/devicetest/GyroL3GD20H.cpp @@ -1,5 +1,5 @@ #include "GyroL3GD20H.h" -#include "spiConf.h" + #include "../spi/mspInit.h" #include "../spi/spiDefinitions.h" #include "../spi/spiCore.h" diff --git a/stm32h7/spi/mspInit.cpp b/stm32h7/spi/mspInit.cpp index 540dd80..80d2ffe 100644 --- a/stm32h7/spi/mspInit.cpp +++ b/stm32h7/spi/mspInit.cpp @@ -1,6 +1,5 @@ #include #include "mspInit.h" -#include "spiConf.h" #include "spiCore.h" #include "spiInterrupts.h" #include "stm32h743xx.h" @@ -127,7 +126,7 @@ void spi::halMspInitPolling(SPI_HandleTypeDef* hspi, MspCfgBase* cfgBase) { GPIO_InitStruct.Pull = GPIO_PULLDOWN; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; GPIO_InitStruct.Alternate = cfg->sckAlternateFunction; - HAL_GPIO_Init(SPIx_SCK_GPIO_PORT, &GPIO_InitStruct); + HAL_GPIO_Init(cfg->sckPort, &GPIO_InitStruct); /* SPI MISO GPIO pin configuration */ GPIO_InitStruct.Pin = cfg->misoPin;