summaryrefslogtreecommitdiff
path: root/ucoo/intf
diff options
context:
space:
mode:
authorNicolas Schodet2015-05-15 16:20:13 +0200
committerNicolas Schodet2019-10-07 00:44:50 +0200
commitab65b898b0ab531a71f1cd7afb0ddfdfb89f340a (patch)
treec1adb80874575c454cb5c0087d4b536f6059a102 /ucoo/intf
parentcf79cc36fd3b1a302cf2c5df20dc0c2db388c5e3 (diff)
ucoo/{intf,hal/spi}: make enable and disable part of the interface
Diffstat (limited to 'ucoo/intf')
-rw-r--r--ucoo/intf/spi_master.hh4
1 files changed, 4 insertions, 0 deletions
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)