Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of ShiftOut by
Revision 5:8146d68f743e, committed 2017-08-03
- Comitter:
- untung
- Date:
- Thu Aug 03 07:57:28 2017 +0000
- Parent:
- 4:7333dc6fca5c
- Commit message:
- export for Marten
Changed in this revision
| ShiftOut.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/ShiftOut.h Tue Jul 14 07:33:26 2015 +0000
+++ b/ShiftOut.h Thu Aug 03 07:57:28 2017 +0000
@@ -40,6 +40,16 @@
}
*latchout = 1;
}
+
+ void write(uint64_t data) {
+ *latchout = 0;
+ for (int i = registerCount - 1; i >= 0; i--) {
+ *clkout = 0;
+ *dataout = (data & (1 << i)) != 0;
+ *clkout = 1;
+ }
+ *latchout = 1;
+ }
private :
DigitalOut *clkout;
