text: /**
    ******************************************************************************
    * @file    stm8s_spi.spi_receivedata.c
    * @author  MCD Application Team
    * @version V2.2.0
    * @date    30-September-2014
    * @brief   This file contains all the functions for the SPI peripheral.
     ******************************************************************************
    * @attention
    *
    * <h2><center>&copy; COPYRIGHT 2014 STMicroelectronics</center></h2>
    *
    * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
    * You may not use this file except in compliance with the License.
    * You may obtain a copy of the License at:
    *
    *        http://www.st.com/software_license_agreement_liberty_v2
    *
    * Unless required by applicable law or agreed to in writing, software 
    * distributed under the License is distributed on an "AS IS" BASIS, 
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
    *
    ******************************************************************************
    */
  
  /* Includes ------------------------------------------------------------------*/
  #include "stm8s_spi.h"
  
  /** @addtogroup STM8S_StdPeriph_Driver
    * @{
    */
    
  /* Private define ------------------------------------------------------------*/
  /* Private macro -------------------------------------------------------------*/
  /* Private variables ---------------------------------------------------------*/
  /* Private function prototypes -----------------------------------------------*/
  /* Private functions ---------------------------------------------------------*/
  
  /** @addtogroup SPI_Public_Functions
    * @{
    */
  
  /**
    * @brief  Returns the most recent received data by the SPI peripheral.
    * @param  None
    * @retval The value of the received data.
    */
  uint8_t SPI_ReceiveData(void)
  {
    return ((uint8_t)SPI->DR); /* Return the data in the DR register*/
  }
  
  /**
    * @}
    */
    
  /**
    * @}
    */
    
  
  /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
  