mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-08-06 10:27:34 +00:00
Added I2C support for raspi & first rework of debugging
This commit is contained in:
47
include/sta/bus/spi/spi.hpp
Normal file
47
include/sta/bus/spi/spi.hpp
Normal file
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief SPI bus software interface.
|
||||
*/
|
||||
#ifndef STA_CORE_SPI_SPI_HPP
|
||||
#define STA_CORE_SPI_SPI_HPP
|
||||
|
||||
#include <sta/bus/interface.hpp>
|
||||
#include <sta/bus/spi/settings.hpp>
|
||||
#include <sta/mutex.hpp>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
namespace sta
|
||||
{
|
||||
/**
|
||||
* @brief Interface class for %SPI hardware.
|
||||
*
|
||||
* Represents a single %SPI bus that can be shared by multiple devices.
|
||||
*
|
||||
* @ingroup sta_core_spi
|
||||
*/
|
||||
class SPI : public Interface
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @param settings %SPI bus settings
|
||||
* @param mutex Mutex object for managing shared access. Pass nullptr for no access control
|
||||
*/
|
||||
SPI(const SPISettings & settings, Mutex * mutex = nullptr);
|
||||
|
||||
/**
|
||||
* @brief Get %SPI interface settings.
|
||||
*
|
||||
* @return %SPI settings
|
||||
*/
|
||||
const SPISettings & settings();
|
||||
|
||||
private:
|
||||
SPISettings settings_; /**< %SPI settings */
|
||||
};
|
||||
} // namespace sta
|
||||
|
||||
|
||||
#endif // STA_CORE_SPI_SPI_HPP
|
Reference in New Issue
Block a user