You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
KED/ked/csl/interfaces/spi.h

46 lines
1.0 KiB

/**
**************************************************************************************************
* @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 <stdint.h>
#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_