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