33 lines
405 B
C++
33 lines
405 B
C++
#pragma once
|
|
|
|
#include "config.hpp"
|
|
#include "hardware.hpp"
|
|
#include "software.hpp"
|
|
|
|
#include "../io/io.hpp"
|
|
|
|
namespace spi {
|
|
|
|
template <class Driver>
|
|
class Spi {
|
|
public:
|
|
static void init()
|
|
{
|
|
Driver::init();
|
|
}
|
|
|
|
static uint8_t transfer(uint8_t ui8Data)
|
|
{
|
|
return Driver::transfer(ui8Data);
|
|
}
|
|
|
|
static void select(bool bSelect)
|
|
{
|
|
Driver::select(bSelect);
|
|
}
|
|
|
|
private:
|
|
};
|
|
|
|
} // namespace spi
|