Add LPC1768

Dependencies:   mbed-rtos mbed Xbus

Fork of MTi-1_example by Xsens

Revision:
52:e2197b38c029
Parent:
49:38ecfbff5391
Child:
53:3891f4259901
diff -r cce9990f102a -r e2197b38c029 main.cpp
--- a/main.cpp	Fri May 22 15:41:46 2015 +0200
+++ b/main.cpp	Fri May 22 15:45:18 2015 +0200
@@ -172,7 +172,7 @@
 	switch (response->mid)
 	{
 		case XMID_GotoConfigAck:
-			pc.printf("Device went to config mode.\n");
+			pc.printf("Device went to config mode.\r\n");
 			break;
 
 		case XMID_Error:
@@ -180,7 +180,7 @@
 			break;
 
 		default:
-			pc.printf("Received response MID=%X, length=%d\n", response->mid, response->length);
+			pc.printf("Received response MID=%X, length=%d\r\n", response->mid, response->length);
 			break;
 	}
 }
@@ -203,7 +203,7 @@
 	}
 	else
 	{
-		pc.printf("Timeout waiting for response.\n");
+		pc.printf("Timeout waiting for response.\r\n");
 	}
 }
 
@@ -310,11 +310,11 @@
 	{
 		if (outputConfRsp->mid == XMID_OutputConfig)
 		{
-			pc.printf("Output configuration set to:\n");
+			pc.printf("Output configuration set to:\r\n");
 			OutputConfiguration* conf = (OutputConfiguration*)outputConfRsp->data;
 			for (int i = 0; i < outputConfRsp->length; ++i)
 			{
-				pc.printf("\t%s: %d Hz\n", XbusMessage_dataDescription(conf->dtype), conf->freq);
+				pc.printf("\t%s: %d Hz\r\n", XbusMessage_dataDescription(conf->dtype), conf->freq);
 				++conf;
 			}
 			return true;
@@ -326,7 +326,7 @@
 	}
 	else
 	{
-		pc.printf("Failed to set output configuration.\n");
+		pc.printf("Failed to set output configuration.\r\n");
 	}
 	return false;
 }
@@ -347,15 +347,15 @@
 
 	if (deviceId)
 	{
-		pc.printf("Found device with ID: %08X.\n", deviceId);
+		pc.printf("Found device with ID: %08X.\r\n", deviceId);
 		if (!XsDeviceId_isMtMk4_X(deviceId))
 		{
-			pc.printf("Device is not an MTi-1 series.\n");
+			pc.printf("Device is not an MTi-1 series.\r\n");
 			return false;
 		}
 
 		DeviceFunction function = XsDeviceId_getFunction(deviceId);
-		pc.printf("Device is an MTi-%d: %s.\n", function, XsDeviceId_functionDescription(function));
+		pc.printf("Device is an MTi-%d: %s.\r\n", function, XsDeviceId_functionDescription(function));
 
 		if (function == DF_IMU)
 		{
@@ -418,7 +418,7 @@
 {
 	XbusMessage ack = {XMID_WakeupAck};
 	sendMessage(&ack);
-	pc.printf("Device ready for operation.\n");
+	pc.printf("Device ready for operation.\r\n");
 }
 
 /*!
@@ -440,7 +440,7 @@
 		mt.putc(0xDE);
 	}
 	while (!waitForWakeup(1));
-	pc.printf("done\n");
+	pc.printf("done\r\n");
 
 	sendWakeupAck();
 }
@@ -466,14 +466,14 @@
 
 static void printIntroMessage(void)
 {
-	pc.printf("\n\n\n\n\n");
-	pc.printf("MTi-1 series embedded example firmware.\n");
+	pc.printf("\r\n\r\n\r\n\r\n\r\n");
+	pc.printf("MTi-1 series embedded example firmware.\r\n");
 }
 
 static void printUsageInstructions(void)
 {
-	pc.printf("\n");
-	pc.printf("Press 'm' to start measuring and 'c' to return to config mode.\n");
+	pc.printf("\r\n");
+	pc.printf("Press 'm' to start measuring and 'c' to return to config mode.\r\n");
 }
 
 /*!
@@ -516,7 +516,7 @@
 	{
 		pc.printf(" Status:%X", status);
 	}
-	pc.printf("\n");
+	pc.printf("\r\n");
 }
 
 
@@ -553,7 +553,7 @@
 	}
 	else
 	{
-		pc.printf("Failed to configure motion tracker.\n");
+		pc.printf("Failed to configure motion tracker.\r\n");
 		return -1;
 	}
 }