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.
29 lines
549 B
29 lines
549 B
#ifndef _SPIDUMMY_HPP_
|
|
#define _SPIDUMMY_HPP_
|
|
|
|
#include <iostream>
|
|
//#include "../../interfaces/spi.hpp"
|
|
#include <stdint.h>
|
|
|
|
struct SPI_dummy : SPI<SPI_dummy>
|
|
{
|
|
uint8_t trx_u8Impl(const uint8_t& data)
|
|
{
|
|
std::cout << "spi trx: tx " << data << " rx: " << +0 << std::endl;
|
|
return 0;
|
|
}
|
|
|
|
void txImpl(const uint8_t& data)
|
|
{
|
|
std::cout << "spi tx: " << +data << std::endl;
|
|
}
|
|
|
|
uint8_t rxImpl()
|
|
{
|
|
std::cout << "spi rx: " << +1 << std::endl;
|
|
return 1;
|
|
}
|
|
};
|
|
|
|
#endif // _SPIDUMMY_HPP_
|