Add LPC1768

Dependencies:   mbed-rtos mbed Xbus

Fork of MTi-1_example by Xsens

Revision:
57:c3c85ebb7375
Parent:
56:041d3d9c300a
Child:
58:db60ef0a0d16
--- a/main.cpp	Tue May 26 08:41:24 2015 +0000
+++ b/main.cpp	Thu Jun 11 12:35:57 2015 +0200
@@ -65,6 +65,17 @@
 #include "xbusmessage.h"
 #include "xsdeviceid.h"
 
+#ifdef TARGET_NUCLEO_F302R8
+#define PC_TX PA_2
+#define PC_RX PA_3
+#define MT_TX PB_9
+#define MT_RX PB_8
+#define MT_NRESET PA_10
+#else
+#error "Support for selected mbed platform has not been added."
+#endif
+
+
 /*!
  * \brief Baudrate used to communicate with host PC.
  */
@@ -95,15 +106,15 @@
 #define MAX_XBUS_DATA_SIZE (128)
 
 /*! \brief Serial port for communication with the host PC. */
-static Serial pc(PA_2, PA_3);
+static Serial pc(PC_TX, PC_RX);
 /*! \brief Serial port for communication with the MT. */
-static Serial mt(PB_9, PB_8);
+static Serial mt(MT_TX, MT_RX);
 /*!
  * \brief MT reset line.
  *
  * MT is held in reset on startup.
  */
-static DigitalOut mtReset(PA_10, 0);
+static DigitalOut mtReset(MT_NRESET, 0);
 /*! \brief XbusParser used to parse incoming Xbus messages from the MT. */
 static XbusParser* xbusParser;