summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ucoo/hal/spi/spi_soft.hh4
-rw-r--r--ucoo/intf/spi_master.hh4
2 files changed, 6 insertions, 2 deletions
diff --git a/ucoo/hal/spi/spi_soft.hh b/ucoo/hal/spi/spi_soft.hh
index 2dc1a64..b162d75 100644
--- a/ucoo/hal/spi/spi_soft.hh
+++ b/ucoo/hal/spi/spi_soft.hh
@@ -36,9 +36,9 @@ class SpiSoftMaster : public SpiMaster
SpiSoftMaster (Io &sck, Io &mosi, Io &miso);
/// Destructor, disable.
~SpiSoftMaster ();
- /// Enable and setup.
+ /// See SpiMaster::enable.
void enable (int speed_hz, SpiMode mode = SPI_MODE_0);
- /// Disable.
+ /// See SpiMaster::disable.
void disable ();
/// See SpiMaster::send_and_recv.
void send_and_recv (const char *tx_buf, char *rx_buf, int count);
diff --git a/ucoo/intf/spi_master.hh b/ucoo/intf/spi_master.hh
index c46fff7..03349bb 100644
--- a/ucoo/intf/spi_master.hh
+++ b/ucoo/intf/spi_master.hh
@@ -48,6 +48,10 @@ enum SpiMode
class SpiMaster
{
public:
+ /// Enable and setup.
+ virtual void enable (int speed_hz, SpiMode mode = SPI_MODE_0) = 0;
+ /// Disable.
+ virtual void disable () = 0;
/// Send and receive COUNT bytes of data. Send data from TX_BUF, store
/// received data in RX_BUF. TX_BUF and RX_BUF can be the same memory.
virtual void send_and_recv (const char *tx_buf, char *rx_buf, int count)