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:1311e7af0a5c, committed 2014-11-16
- Comitter:
- manumaet
- Date:
- Sun Nov 16 10:04:00 2014 +0000
- Parent:
- 0:f50e671ffff7
- Child:
- 2:16e45ff70baf
- Commit message:
- no more work, before revert
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sun Nov 16 09:53:25 2014 +0000
+++ b/main.cpp Sun Nov 16 10:04:00 2014 +0000
@@ -27,9 +27,10 @@
dw.readRegister(DW1000_SYS_CFG, 0, (uint8_t*)&conf, 4);
pc.printf("%d System Configuration: %X\r\n", i, conf);
-# if 1 // to make one node sender and one receiver
+# if 0 // to make one node sender and one receiver
// Send something
uint8_t message[13] = "HELLO WORLD!"; // fill buffer
+ //sprintf((char*)message, "%d World!!", i);
dw.writeRegister(DW1000_TX_BUFFER, 0, message, 13);
uint8_t messagecheck[13];
dw.readRegister(DW1000_TX_BUFFER, 0, messagecheck, 13);
@@ -38,7 +39,7 @@
uint16_t framelength = 13; // put length of frame
dw.writeRegister(DW1000_TX_FCTRL, 0, (uint8_t*)&framelength, 1);
- if (i == 4) {
+ if ((i % 2) == 0) {
uint8_t txstart = 0x02; // trigger sending process
dw.writeRegister(DW1000_SYS_CTRL, 0, &txstart, 1);
}