work on spi interface

interrupts
polymurph 4 years ago
parent 0f28a8480f
commit adfb08bc3d

@ -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_

Loading…
Cancel
Save