From ab65b898b0ab531a71f1cd7afb0ddfdfb89f340a Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Fri, 15 May 2015 16:20:13 +0200 Subject: ucoo/{intf,hal/spi}: make enable and disable part of the interface --- ucoo/intf/spi_master.hh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ucoo/intf') 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) -- cgit v1.2.3