/** ************************************************************************************************** * @file spi.h * @author Kerem Yollu & Edwin Koch * @date 12.03.2022 * @version 1.0 ************************************************************************************************** * @brief This is the genral interface for spi. * * **Detailed Description :** * This the spi interface and belongs to the interface layer. * ************************************************************************************************** */ #ifndef _SPI_H_ #define _SPI_H_ #ifdef __cplusplus extern "C" { #endif #include #include "hardwareDescription.h" /** This is the spi hardware channel class*/ void spi_init(spiCH_t spi_hw_ch); /*! * @brief Transmits and receives on byte of data * @param spi_hw_ch SPI hardware channel * @param tx_data 'tx_data' The byte to be transmitted" * @return The received data */ uint8_t spi_trx(spiCH_t spi_hw_ch, uint8_t tx_data); #ifdef __cplusplus } #endif #endif // _SPI_H_