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.
Revision 1:14c0250ab954, committed 2012-01-16
- Comitter:
- allanw
- Date:
- Mon Jan 16 21:16:23 2012 +0000
- Parent:
- 0:d308aef39cfa
- Commit message:
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Jan 16 21:10:27 2012 +0000
+++ b/main.cpp Mon Jan 16 21:16:23 2012 +0000
@@ -1,27 +1,16 @@
-#include "mbed.h"
-
-SPI spi(p11, p12, p13);
-DigitalOut latchpin(p10);
-
-void latch() {
- latchpin = 1;
- latchpin = 1;
- latchpin = 1;
- latchpin = 1;
- latchpin = 1;
- latchpin = 1;
- latchpin = 0;
-}
-
-int main() {
- spi.format(12, 0);
- spi.frequency(16 * 1000 * 1000);
-
- latchpin = 0;
- while (1) {
- for (int i = 0; i < 100; i++) {
- spi.write(0);
- }
- latch();
- }
+#include "mbed.h"
+
+SPI spi(p11, p12, p13);
+DigitalOut latchpin(p10);
+
+int main() {
+ spi.format(8, 0);
+ spi.frequency(16 * 1000 * 1000);
+
+ latchpin = 0;
+ while (1) {
+ latchpin = 1;
+ spi.write(0);
+ latchpin = 0;
+ }
}
\ No newline at end of file
--- a/mbed.bld Mon Jan 16 21:10:27 2012 +0000 +++ b/mbed.bld Mon Jan 16 21:16:23 2012 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/3991a86798e3 +http://mbed.org/users/mbed_official/code/mbed/builds/5364839841bd