Src/custom_bus.c
int32_t  BSP_SPI2_Recv(uint8_t *pData, uint16_t Length)
{
  int32_t ret = BSP_ERROR_UNKNOWN_FAILURE;
  
  if(HAL_SPI_Receive(&hspi2, pData, Length, BUS_SPI1_POLL_TIMEOUT) == HAL_OK)
  {
      ret = BSP_ERROR_NONE;
  }
  return ret;
}
/**
  * @brief  Receive Data from SPI BUS
  * @param  pData: Pointer to data buffer to receive
  * @param  Length: Length of data in byte
  * @retval BSP status
  */
@brief  Receive Data from SPI BUS
@param  pData: Pointer to data buffer to receive
@param  Length: Length of data in byte
@retval BSP status
@brief Receive Data from SPI BUS @param pData : Pointer to data buffer to receive @param Length : Length of data in byte @retval BSP status
int32_t  BSP_SPI2_Recv(uint8_t *pData, uint16_t Length)
{
  int32_t ret = BSP_ERROR_UNKNOWN_FAILURE;
  if(HAL_SPI_Receive(&hspi2, pData, Length, BUS_SPI1_POLL_TIMEOUT) == HAL_OK)
  {
      ret = BSP_ERROR_NONE;
  }
  return ret;
}
int32_t BSP_SPI2_Recv ( uint8_t * pData , uint16_t Length ) { int32_t ret = BSP_ERROR_UNKNOWN_FAILURE ; if ( HAL_SPI_Receive ( & hspi2 , pData , Length , BUS_SPI1_POLL_TIMEOUT ) == HAL_OK ) { ret = BSP_ERROR_NONE ; } return ret ; }
@brief  Receive Data from SPI BUS
 @param  pData: Pointer to data buffer to receive
 @param  Length: Length of data in byte
 @retval BSP status
@brief Receive Data from SPI BUS @param pData : Pointer to data buffer to receive @param Length : Length of data in byte @retval BSP status