rikbeuncode
Dependencies: mbed-rtos mbed Xbus
Fork of MTi-1_example by
Revision 20:38560fa3d2eb, committed 2015-05-19
- Comitter:
- Alex Young
- Date:
- Tue May 19 15:51:47 2015 +0200
- Parent:
- 19:46e88d37ecef
- Child:
- 21:6015b8be3a00
- Commit message:
- Add simple command to read device Id
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue May 19 15:49:29 2015 +0200
+++ b/main.cpp Tue May 19 15:51:47 2015 +0200
@@ -42,6 +42,10 @@
case 'm':
sendCommand(XMID_GotoMeasurement);
break;
+
+ case 'd':
+ sendCommand(XMID_ReqDid);
+ break;
}
}
@@ -76,6 +80,10 @@
}
pc.printf("\n");
}
+ else if (message->mid == XMID_DeviceId)
+ {
+ pc.printf("Device ID: %8X\n", *(uint32_t*)message->data);
+ }
else
{
pc.printf("Received Xbus message. MID=%X, length=%d\n", message->mid, message->length);
