aboutsummaryrefslogtreecommitdiffstats
path: root/wirish
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-03-11 20:43:59 -0500
committerMarti Bolivar <mbolivar@leaflabs.com>2011-03-11 20:43:59 -0500
commit9579e9487c2039df38cc4fd0ac2846ef07cc0947 (patch)
tree54cac899207aa6f2251b08309138e608db5c537a /wirish
parentc442df4d8d724076fb8cc27567c6684b91e954e8 (diff)
downloadlibrambutan-9579e9487c2039df38cc4fd0ac2846ef07cc0947.tar.gz
librambutan-9579e9487c2039df38cc4fd0ac2846ef07cc0947.zip
shiftOut(), docs fixes
Diffstat (limited to 'wirish')
-rw-r--r--wirish/io.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/wirish/io.h b/wirish/io.h
index d2e4d2d..8dad1d1 100644
--- a/wirish/io.h
+++ b/wirish/io.h
@@ -216,5 +216,21 @@ uint8 isButtonPressed();
*/
uint8 waitForButtonPress(uint32 timeout_millis);
+/**
+ * Shift out a byte of data, one bit at a time.
+ *
+ * This function starts at either the most significant or least
+ * significant bit in a byte value, and shifts out each byte in order
+ * onto a data pin. After each bit is written to the data pin, a
+ * separate clock pin is pulsed to indicate that the new bit is
+ * available.
+ *
+ * @param dataPin Pin to shift data out on
+ * @param clockPin Pin to pulse after each bit is shifted out
+ * @param bitOrder Either MSBFIRST (big-endian) or LSBFIRST (little-endian).
+ * @param val Value to shift out
+ */
+void shiftOut(uint8 dataPin, uint8 clockPin, uint8 bitOrder, uint8 value);
+
#endif