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: mbed-rtos mbed Xbus
Fork of MTi-1_example by
Diff: main.cpp
- Revision:
- 22:3eab999c5076
- Parent:
- 20:38560fa3d2eb
- Child:
- 24:2cc49dc854e3
--- a/main.cpp Tue May 19 16:59:11 2015 +0200
+++ b/main.cpp Tue May 19 16:59:53 2015 +0200
@@ -46,6 +46,10 @@
case 'd':
sendCommand(XMID_ReqDid);
break;
+
+ case 'o':
+ sendCommand(XMID_ReqOutputConfig);
+ break;
}
}
@@ -84,6 +88,16 @@
{
pc.printf("Device ID: %8X\n", *(uint32_t*)message->data);
}
+ else if (message->mid == XMID_OutputConfig)
+ {
+ pc.printf("Output configuration:\n");
+ struct OutputConfiguration* conf = (struct OutputConfiguration*)message->data;
+ for (int i = 0; i < message->length; ++i)
+ {
+ pc.printf("\t%s: %d Hz\n", XbusMessage_dataDescription(conf->dtype), conf->freq);
+ ++conf;
+ }
+ }
else
{
pc.printf("Received Xbus message. MID=%X, length=%d\n", message->mid, message->length);
