aboutsummaryrefslogtreecommitdiffstats
path: root/wirish/comm/HardwareSPI.h
diff options
context:
space:
mode:
Diffstat (limited to 'wirish/comm/HardwareSPI.h')
-rw-r--r--wirish/comm/HardwareSPI.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/wirish/comm/HardwareSPI.h b/wirish/comm/HardwareSPI.h
index 23fada2..d138910 100644
--- a/wirish/comm/HardwareSPI.h
+++ b/wirish/comm/HardwareSPI.h
@@ -75,6 +75,10 @@ public:
*/
HardwareSPI(uint32 spiPortNumber);
+ /*
+ * Set up/tear down
+ */
+
/**
* @brief Turn on a SPI port and set its GPIO pin modes for use as master.
*
@@ -112,6 +116,10 @@ public:
*/
void end(void);
+ /*
+ * I/O
+ */
+
/**
* @brief Return the next unread byte.
*
@@ -152,6 +160,30 @@ public:
*/
uint8 transfer(uint8 data);
+ /*
+ * Pin accessors
+ */
+
+ /**
+ * @brief Return the number of the MISO (master in, slave out) pin
+ */
+ uint8 misoPin(void);
+
+ /**
+ * @brief Return the number of the MOSI (master out, slave in) pin
+ */
+ uint8 mosiPin(void);
+
+ /**
+ * @brief Return the number of the SCK (serial clock) pin
+ */
+ uint8 sckPin(void);
+
+ /**
+ * @brief Return the number of the NSS (slave select) pin
+ */
+ uint8 nssPin(void);
+
/* -- The following methods are deprecated --------------------------- */
/**