fsfw-hal/stm32h7/spi/spiDefinitions.h

25 lines
626 B
C++

#ifndef FSFW_HAL_STM32H7_SPI_SPIDEFINITIONS_H_
#define FSFW_HAL_STM32H7_SPI_SPIDEFINITIONS_H_
#include "../../common/spi/spiCommon.h"
#include "stm32h7xx_hal.h"
#include "stm32h7xx_hal_spi.h"
namespace spi {
void assignSpiMode(SpiModes spiMode, SPI_HandleTypeDef* spiHandle);
/**
* @brief Set SPI frequency to calculate correspondent baud-rate prescaler.
* @param clock_src_freq Frequency of clock source
* @param baudrate_mbps Baudrate to set to set
* @retval Baudrate prescaler
*/
uint32_t getPrescaler(uint32_t clock_src_freq, uint32_t baudrate_mbps);
}
#endif /* FSFW_HAL_STM32H7_SPI_SPIDEFINITIONS_H_ */