Src/custom_bus.c
int32_t BSP_SPI2_RegisterDefaultMspCallbacks (void)
{

  __HAL_SPI_RESET_HANDLE_STATE(&hspi2);
  
  /* Register MspInit Callback */
  if (HAL_SPI_RegisterCallback(&hspi2, HAL_SPI_MSPINIT_CB_ID, SPI2_MspInit)  != HAL_OK)
  {
    return BSP_ERROR_PERIPH_FAILURE;
  }
  
  /* Register MspDeInit Callback */
  if (HAL_SPI_RegisterCallback(&hspi2, HAL_SPI_MSPDEINIT_CB_ID, SPI2_MspDeInit) != HAL_OK)
  {
    return BSP_ERROR_PERIPH_FAILURE;
  }
  IsSPI2MspCbValid = 1;
  
  return BSP_ERROR_NONE;  
}
/**
  * @brief Register Default BSP SPI2 Bus Msp Callbacks
  * @retval BSP status
  */
@brief Register Default BSP SPI2 Bus Msp Callbacks
@retval BSP status
@brief Register Default BSP SPI2 Bus Msp Callbacks @retval BSP status
int32_t BSP_SPI2_RegisterDefaultMspCallbacks (void)
{
  __HAL_SPI_RESET_HANDLE_STATE(&hspi2);
  if (HAL_SPI_RegisterCallback(&hspi2, HAL_SPI_MSPINIT_CB_ID, SPI2_MspInit)  != HAL_OK)
  {
    return BSP_ERROR_PERIPH_FAILURE;
  }
  if (HAL_SPI_RegisterCallback(&hspi2, HAL_SPI_MSPDEINIT_CB_ID, SPI2_MspDeInit) != HAL_OK)
  {
    return BSP_ERROR_PERIPH_FAILURE;
  }
  IsSPI2MspCbValid = 1;
  return BSP_ERROR_NONE;  
}
int32_t BSP_SPI2_RegisterDefaultMspCallbacks ( void ) { __HAL_SPI_RESET_HANDLE_STATE ( & hspi2 ) ; if ( HAL_SPI_RegisterCallback ( & hspi2 , HAL_SPI_MSPINIT_CB_ID , SPI2_MspInit ) != HAL_OK ) { return BSP_ERROR_PERIPH_FAILURE ; } if ( HAL_SPI_RegisterCallback ( & hspi2 , HAL_SPI_MSPDEINIT_CB_ID , SPI2_MspDeInit ) != HAL_OK ) { return BSP_ERROR_PERIPH_FAILURE ; } IsSPI2MspCbValid = 1 ; return BSP_ERROR_NONE ; }
@brief Register Default BSP SPI2 Bus Msp Callbacks
 @retval BSP status
@brief Register Default BSP SPI2 Bus Msp Callbacks @retval BSP status
/* Register MspInit Callback */ /* Register MspDeInit Callback */