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.
Dependencies: FastPWM GMD_template_lib mbed
Diff: main.cpp
- Revision:
- 5:9d1b1948a9b6
- Parent:
- 4:894559ccce05
- Child:
- 6:004e6174445a
diff -r 894559ccce05 -r 9d1b1948a9b6 main.cpp
--- a/main.cpp Sun Jul 03 02:33:31 2016 +0000
+++ b/main.cpp Sun Jul 03 03:15:31 2016 +0000
@@ -11,11 +11,11 @@
};
char address = 0;
- size_t address_offset = 4;
+ size_t address_offset = 0x08 << 1;
for (size_t i = 0; i < din_num; ++i) {
- address |= din[i].read() << (i + address_offset);
+ address |= din[i].read() << (i + 1);
}
- return address;
+ return address + address_offset;
}
int main(){