|
|
|
@ -6,11 +6,20 @@
|
|
|
|
|
template <typename Derived>
|
|
|
|
|
struct SPI
|
|
|
|
|
{
|
|
|
|
|
uint8_t trx_u8(const uint8_t& data);
|
|
|
|
|
uint8_t trx_u8(const uint8_t& data)
|
|
|
|
|
{
|
|
|
|
|
return static_cast<Derived*>(this)->trx_u8Impl(data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void tx(const uint8_t& data);
|
|
|
|
|
void tx(const uint8_t& data)
|
|
|
|
|
{
|
|
|
|
|
static_cast<Derived*>(this)->txImpl(data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint8_t rx();
|
|
|
|
|
uint8_t rx()
|
|
|
|
|
{
|
|
|
|
|
return static_cast<Derived*>(this)->rxImpl();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // _SPI_HPP_
|
|
|
|
|