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;