Software/StNucleo/Drivers/BSP/X-NUCLEO-IHMxx/x_nucleo_ihm03a1_stm32f4xx.c
uint8_t Powerstep01_Board_SpiInit(void)
{
  HAL_StatusTypeDef status;
  
  /* Initialises the SPI  --------------------------------------------------*/
  SpiHandle.Instance               = SPIx;
  SpiHandle.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_32; 
  SpiHandle.Init.Direction         = SPI_DIRECTION_2LINES;
  SpiHandle.Init.CLKPhase          = SPI_PHASE_2EDGE;    
  SpiHandle.Init.CLKPolarity       = SPI_POLARITY_HIGH;
  SpiHandle.Init.CRCCalculation    = SPI_CRCCALCULATION_DISABLED;
  SpiHandle.Init.CRCPolynomial     = 7;
  SpiHandle.Init.DataSize          = SPI_DATASIZE_8BIT;
  SpiHandle.Init.FirstBit          = SPI_FIRSTBIT_MSB;
  SpiHandle.Init.NSS               = SPI_NSS_SOFT;
  SpiHandle.Init.TIMode            = SPI_TIMODE_DISABLED;
  
  SpiHandle.Init.Mode = SPI_MODE_MASTER;
  
  status = HAL_SPI_Init(&SpiHandle);
  
  return (uint8_t) status;
}
/******************************************************/
/**
 * @brief  Initialise the SPI used by powerSTEP01
 * @retval HAL_OK if SPI transaction is OK, HAL_KO else
 **********************************************************/
@brief  Initialise the SPI used by powerSTEP01
@retval HAL_OK if SPI transaction is OK, HAL_KO else
@brief Initialise the SPI used by powerSTEP01 @retval HAL_OK if SPI transaction is OK HAL_KO else
uint8_t Powerstep01_Board_SpiInit(void)
{
  HAL_StatusTypeDef status;
  SpiHandle.Instance               = SPIx;
  SpiHandle.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_32; 
  SpiHandle.Init.Direction         = SPI_DIRECTION_2LINES;
  SpiHandle.Init.CLKPhase          = SPI_PHASE_2EDGE;    
  SpiHandle.Init.CLKPolarity       = SPI_POLARITY_HIGH;
  SpiHandle.Init.CRCCalculation    = SPI_CRCCALCULATION_DISABLED;
  SpiHandle.Init.CRCPolynomial     = 7;
  SpiHandle.Init.DataSize          = SPI_DATASIZE_8BIT;
  SpiHandle.Init.FirstBit          = SPI_FIRSTBIT_MSB;
  SpiHandle.Init.NSS               = SPI_NSS_SOFT;
  SpiHandle.Init.TIMode            = SPI_TIMODE_DISABLED;
  SpiHandle.Init.Mode = SPI_MODE_MASTER;
  status = HAL_SPI_Init(&SpiHandle);
  return (uint8_t) status;
}
uint8_t Powerstep01_Board_SpiInit ( void ) { HAL_StatusTypeDef status ; SpiHandle . Instance = SPIx ; SpiHandle . Init . BaudRatePrescaler = SPI_BAUDRATEPRESCALER_32 ; SpiHandle . Init . Direction = SPI_DIRECTION_2LINES ; SpiHandle . Init . CLKPhase = SPI_PHASE_2EDGE ; SpiHandle . Init . CLKPolarity = SPI_POLARITY_HIGH ; SpiHandle . Init . CRCCalculation = SPI_CRCCALCULATION_DISABLED ; SpiHandle . Init . CRCPolynomial = 7 ; SpiHandle . Init . DataSize = SPI_DATASIZE_8BIT ; SpiHandle . Init . FirstBit = SPI_FIRSTBIT_MSB ; SpiHandle . Init . NSS = SPI_NSS_SOFT ; SpiHandle . Init . TIMode = SPI_TIMODE_DISABLED ; SpiHandle . Init . Mode = SPI_MODE_MASTER ; status = HAL_SPI_Init ( & SpiHandle ) ; return ( uint8_t ) status ; }
@brief  Initialise the SPI used by powerSTEP01
 @retval HAL_OK if SPI transaction is OK, HAL_KO else
@brief Initialise the SPI used by powerSTEP01 @retval HAL_OK if SPI transaction is OK HAL_KO else
/* Initialises the SPI  --------------------------------------------------*/